![]() |
|
Having a Login - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Design (https://sinister.li/Forum-Design) +--- Forum: Web Design (https://sinister.li/Forum-Web-Design) +--- Thread: Having a Login (/Thread-Having-a-Login) Pages:
1
2
|
Having a Login - NinjaKnight - 06-20-2014 Hello Hack Community, I have been making a website and I want it so that there is a log in. There doesn't need to be a password, but I want it to check for that, like maybe within a text file or something. How do I do it so that it isn't in the actual code. If anyone knows how to do that, please comment. -NinjaKnight- RE: Having a Login - The Real Slim Shady - 06-20-2014 having it in a text file is probably more insecure than having it in the code? lol but what do you mean you there doesnt need to be a password? you just want a username? that'll be piss easy to bruteforce! RE: Having a Login - NinjaKnight - 06-20-2014 (06-20-2014, 03:21 AM)Geoff Wrote: having it in a text file is probably more insecure than having it in the code? lol I just want it so that only a specific word can grant access to files. If you can show a way so that I can have both a username and password, feel free, but at this point, I just want something where it sees the username and/or password to see specific files. -NinjaKnight- RE: Having a Login - Ex094 - 06-20-2014 Here's a pseudo code Code: user = get input from user
for unique in my text file
if (user == unique)
grant_access()
else
redirect()This method is probably fail if you talk in terms of security, For the text file to not to be read by users chmod it to 750 (Guessed it correct it if em wrong) RE: Having a Login - Anima Templi - 06-20-2014 If you have to ask about code for such, you're not ready to work with it. It's not a simple task to write such parts of websites, since there's so much security to think about at the same time. It's a bad idea to store anything important in text files, data bases man, data bases. MySQL probably is going to be the easiest way (or SQLite or postgres) depends on what you're actually making your website with? Tell me a bit more about what technologies you're using, otherwise I would be able to find related examples and documentation. RE: Having a Login - NinjaKnight - 06-21-2014 (06-20-2014, 06:00 AM)Anima Templi Wrote: If you have to ask about code for such, you're not ready to work with it. It's not a simple task to write such parts of websites, since there's so much security to think about at the same time. Well, i just want to do a basic thing. It wont be a big website, it will just be something so i can access my work online. By technologies, if you mean what programming languages, i am using html, css, etc. I can continue adding languages. I don't mind learning new ones. -NinjaKnight- (06-20-2014, 05:42 AM)Ex094 Wrote: Here's a pseudo code Well, that would be the basic idea, but how do i integrate that with a website? -NinjaKnight- RE: Having a Login - Anima Templi - 06-21-2014 Have you even Google'd yourself? I googled, PHP login, here's what I found in the first two links. http://www.phpeasystep.com/workshopview.php?id=6 http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL RE: Having a Login - BlueCat - 06-22-2014 (06-20-2014, 03:21 AM)Geoff Wrote: having it in a text file is probably more insecure than having it in the code? lol I sense a 1337 haxxorr :troll: RE: Having a Login - NinjaKnight - 06-22-2014 (06-21-2014, 09:53 AM)Anima Templi Wrote: Have you even Google'd yourself? I have googled it, but i was not sure what language it should be in, so it was just if else statements with JS that was returned to me. -NinjaKnight- RE: Having a Login - Rye123_mybb_import20042 - 07-05-2014 JavaScript is mostly client-side. To use a server-side language, there are some options. For an easier language, choose PHP. Otherwise, other languages like ASP may work out for you. You will also need a database to store (surprise, surprise) data. Your webhost should provide a MySQL database. Learn MySQL in places like W3Schools. |