| | |
Javascript Password Encrypter
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2009
Posts: 39
Reputation:
Solved Threads: 0
Here, instead of encrypting a password, make the password a super-hard math problem.
Like this
Oh, and by the way, the password is:
7.114267799844692e+46
Like this
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <script language='javascript'> var foo = 5 + 5 * 5; var moo = foo * 2 * 4; var goo = moo + foo % 7; var too = goo * foo + moo; var hoo = 6 / 2 + too * foo - moo + goo; var poo = hoo / 50 * 0.04 - 80 % 9.9; var doo = poo / 5 * 0.3 + 2 / 8; var koo = doo * poo + hoo - foo % 7 / 8 * 3 / 500 % 29 / 5000 / 5 / 3 - 200000; var yoo = doo + koo * 500000 / 6.1543 % 8.2543 / 4.4151 + 3135; var voo = yoo * koo * 44252.45245 * poo * hoo * too * goo * moo * foo / 13.1345 % 170.908; var joo = voo * 154213451.5245245 % 151.114354 / 4154.5454 + 27527272572.75272; var noo = joo * 252542.245245 * 25254245.4524245 % 15.5135 / 2542.4524525; var pass = noo * 52424532543245245 * 5245252425435 * 453435435 / 13 * 2152175621375.1534348343483; </script> </head> <body> <script language='javascript'> function check(x) { if(x==pass){ alert('Correct Password'); window.location=''; }else{ alert('Incorrect Password'); } } </script> <center><p>Please enter the password:</p><br /><input type="password" id="pass" value="" size='50' /><br /> <input type='button' onclick="check(document.getElementById('pass').value)" value='Check Password'> </body> </html>
Oh, and by the way, the password is:
7.114267799844692e+46
It's still can be caculated by the user and the fact that the actual process inside
-no matter how hard we try to hide it, its still there...
if( password === password ) { /*Here's my answer... */} , i get the whole answer even w/o doing any of those math calculations.-no matter how hard we try to hide it, its still there...
Last edited by essential; Jul 21st, 2009 at 1:44 pm.
Dev.Opera — FOLLOW THE STANDARDS, BREAK THE RULES...
•
•
Join Date: Apr 2009
Posts: 39
Reputation:
Solved Threads: 0
True, that's why you shouldn't try to hide something important...
The user can easily take all the variables, and create a .js file that would show the answer
The user can easily take all the variables, and create a .js file that would show the answer
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var foo = 5 + 5 * 5; var moo = foo * 2 * 4; var goo = moo + foo % 7; var too = goo * foo + moo; var hoo = 6 / 2 + too * foo - moo + goo; var poo = hoo / 50 * 0.04 - 80 % 9.9; var doo = poo / 5 * 0.3 + 2 / 8; var koo = doo * poo + hoo - foo % 7 / 8 * 3 / 500 % 29 / 5000 / 5 / 3 - 200000; var yoo = doo + koo * 500000 / 6.1543 % 8.2543 / 4.4151 + 3135; var voo = yoo * koo * 44252.45245 * poo * hoo * too * goo * moo * foo / 13.1345 % 170.908; var joo = voo * 154213451.5245245 % 151.114354 / 4154.5454 + 27527272572.75272; var noo = joo * 252542.245245 * 25254245.4524245 % 15.5135 / 2542.4524525; var pass = noo * 52424532543245245 * 5245252425435 * 453435435 / 13 * 2152175621375.1534348343483; document.write(pass);
•
•
Join Date: Apr 2009
Posts: 39
Reputation:
Solved Threads: 0
I think I got it
The browser will turn the encrypted password to the original password so that it is unreadable by the human eye.
It also shows a fake password, incase the user 'thinks' they found the real one.
Again, the password is:
7.114267799844692e+46
The browser will turn the encrypted password to the original password so that it is unreadable by the human eye.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <script language=JavaScript>m='%3Cscript%20language%3D%27javascript%27%3E%0D%0Avar%20foo%20%3D%205%20+%205%20*%205%3B%0D%0Avar%20moo%20%3D%20foo%20*%202%20*%204%3B%0D%0Avar%20goo%20%3D%20moo%20+%20foo%20%25%207%3B%0D%0Avar%20too%20%3D%20goo%20*%20foo%20+%20moo%3B%0D%0Avar%20Dioo%20%3D%205%20+%205%20*%2010%3B%0D%0Avar%20hoo%20%3D%206%20/%202%20+%20too%20*%20foo%20-%20moo%20+%20goo%3B%20%0D%0Avar%20poo%20%3D%20hoo%20/%2050%20*%200.04%20-%2080%20%25%209.9%3B%20%0D%0Avar%20doo%20%3D%20poo%20/%205%20*%200.3%20+%202%20/%208%3B%0D%0Avar%20koo%20%3D%20doo%20*%20poo%20+%20hoo%20-%20foo%20%25%207%20/%208%20*%203%20/%20500%20%25%2029%20/%205000%20/%205%20/%203%20-%20200000%3B%0D%0Avar%20yoo%20%3D%20doo%20+%20koo%20*%20500000%20/%206.1543%20%25%208.2543%20/%204.4151%20+%203135%3B%0D%0Avar%20voo%20%3D%20yoo%20*%20koo%20*%2044252.45245%20*%20poo%20*%20hoo%20*%20too%20*%20goo%20*%20moo%20*%20foo%20/%2013.1345%20%25%20170.908%3B%0D%0Avar%20joo%20%3D%20voo%20*%20154213451.5245245%20%25%20151.114354%20/%204154.5454%20+%2027527272572.75272%3B%0D%0Avar%20noo%20%3D%20joo%20*%20252542.245245%20*%2025254245.4524245%20%25%2015.5135%20/%202542.4524525%3B%0D%0Avar%20ioo%20%3D%20noo%20*%2052424532543245245%20*%205245252425435%20*%20453435435%20/%2013%20*%202152175621375.1534348343483%3B%0D%0A%3C/script%3E';d=unescape(m);document.write(d);</script> </head> <body> <script language=JavaScript>m='%3Cscript%20language%3D%27javascript%27%3E%0D%0Afunction%20check%28x%29%0D%0A%7B%0D%0Aif%28x%3D%3Dioo%29%7B%0D%0Aalert%28%27Correct%20Password%27%29%3B%0D%0Awindow.location%3D%27%27%3B%0D%0A%7Delse%7B%0D%0Aalert%28%27Incorrect%20Password%27%29%3B%0D%0A%20%20%20%7D%0D%0A%7D%0D%0A%3C/script%3E';d=unescape(m);document.write(d);</script> <br /><br /><br /><br /><br /><br /><br /><br /><br /> <center><table border='0' cellspacing='0' cellpadding='0'> <tr> <td align'center'> <fieldset> <legend>Please Enter The Password</legend><br /> <input type="password" id="pass" value="" size='50' /><br /> <input type='button' onclick="check(document.getElementById('pass').value)" value='Check Password'> </td> </tr> </fieldset> </table> </center> </body> </html>
It also shows a fake password, incase the user 'thinks' they found the real one.
Again, the password is:
7.114267799844692e+46
Last edited by DealthRune; Jul 21st, 2009 at 7:52 pm. Reason: Forgot to change something to code
![]() |
Similar Threads
- Password Protect Problems (JavaScript / DHTML / AJAX)
- javascript code not working in firefox (JavaScript / DHTML / AJAX)
- Password protect code (JavaScript / DHTML / AJAX)
- password protecting (HTML and CSS)
- website password protection (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Getting multiple variables from AJAX
- Next Thread: Parcer XML with AJAX
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets array blackjack browser captcha captchaformproblem cart checkbox child class close codes date debugger dependent developer disablefirebug dom editor element embed engine events explorer ext file firefox flash form forms game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl maps marquee masterpage math matrixcaptcha media mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php position post programming prototype rated redirect runtime safari scale scriptlets scroll search security session shopping size software sources star stars stretch synchronous toggle tweet unicode variables web webservice window wysiwyg \n





