|
|
Password protecting your pages
This archived discussion is "read only".
» ali_baba - Password Protecting HTML Pages Password protecting a page using JavaScript is not recommended becauses this type of protection is merely an illusion. It's not a real protection technique. However, if you want to password protect a page on your personal home page, then JavaScript techniques may help you out. But remember, whatever protection mechanism you apply with JavaScript is easily breakable. The method I am going to explain doesn't show the password when you view the source code. But anyone having experience in a programming language can read this code for 5 minutes and easily break it.The basic idea is to encode every input from the user and compare it with the encoded password. The password is alibaba, which is encoded as 65767366656665. Now, if you enter baab, the encoded message will be 66656566, which is not equal to the encoded password. The viewer of the html source cannot guess the original password by looking at 65767366656665. But somebody knowing programming can see the logic behind the code and generate the original password from the encoded number. Moreover, one can always see the URL pointed to by the password verifier and can directly type it in his browser window. The code is given below only for educational purpose - don't base on it for real implementation: Please copy and paste this code in a blank html file and load it into your web browser to see how this works! I am waiting for any further queries. -- posted by ali_baba » rashidBhuiya - Re: Password Protecting HTML Pages In response to message posted by ali_baba:hey man.. -- posted by rashidBhuiya » rashidBhuiya - Re: Password Protecting HTML Pages In response to message posted by ali_baba:hey man.. -- posted by rashidBhuiya » rashidBhuiya - Password Protecting HTML Pages i have used your javascript, and tested it out. i now what it to show me the page after i enter the password. but i don't seem to know how. i'm not every well known with HTML, can you tell me how i can do that?-- posted by rashidBhuiya
Please follow the guidelines set forth in the Suite101 Posting Etiquette when adding to the discussion. |
|
|
|
|
|
|
|