Login Register






Having a Login filter_list
Author
Message
Having a Login #1
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-

Reply

RE: Having a Login #2
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!

Reply

RE: Having a Login #3
(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

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!

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-

Reply

RE: Having a Login #4
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)
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

RE: Having a Login #5
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.

Reply

RE: Having a Login #6
(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.

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.

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

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)

Well, that would be the basic idea, but how do i integrate that with a website?

-NinjaKnight-

Reply

RE: Having a Login #7
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-L...-and-MySQL

Reply

RE: Having a Login #8
(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

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!

I sense a 1337 haxxorr :troll:







Reply

RE: Having a Login #9
(06-21-2014, 09:53 AM)Anima Templi Wrote: 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-L...-and-MySQL

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-

Reply

RE: Having a Login #10
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.

Reply