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: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Javascript Password Encrypter

 
0
  #1
Jul 21st, 2009
I need a code that encrypts the password, please if anyone knows it please post.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Re: Javascript Password Encrypter

 
0
  #2
Jul 21st, 2009
Here, instead of encrypting a password, make the password a super-hard math problem.

Like this

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <script language='javascript'>
  4. var foo = 5 + 5 * 5;
  5. var moo = foo * 2 * 4;
  6. var goo = moo + foo % 7;
  7. var too = goo * foo + moo;
  8. var hoo = 6 / 2 + too * foo - moo + goo;
  9. var poo = hoo / 50 * 0.04 - 80 % 9.9;
  10. var doo = poo / 5 * 0.3 + 2 / 8;
  11. var koo = doo * poo + hoo - foo % 7 / 8 * 3 / 500 % 29 / 5000 / 5 / 3 - 200000;
  12. var yoo = doo + koo * 500000 / 6.1543 % 8.2543 / 4.4151 + 3135;
  13. var voo = yoo * koo * 44252.45245 * poo * hoo * too * goo * moo * foo / 13.1345 % 170.908;
  14. var joo = voo * 154213451.5245245 % 151.114354 / 4154.5454 + 27527272572.75272;
  15. var noo = joo * 252542.245245 * 25254245.4524245 % 15.5135 / 2542.4524525;
  16. var pass = noo * 52424532543245245 * 5245252425435 * 453435435 / 13 * 2152175621375.1534348343483;
  17. </script>
  18. </head>
  19. <body>
  20. <script language='javascript'>
  21. function check(x)
  22. {
  23. if(x==pass){
  24. alert('Correct Password');
  25. window.location='';
  26. }else{
  27. alert('Incorrect Password');
  28. }
  29. }
  30. </script>
  31. <center><p>Please enter the password:</p><br /><input type="password" id="pass" value="" size='50' /><br />
  32. <input type='button' onclick="check(document.getElementById('pass').value)" value='Check Password'>
  33. </body>
  34. </html>

Oh, and by the way, the password is:

7.114267799844692e+46
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Javascript Password Encrypter

 
1
  #3
Jul 21st, 2009
But the problem about this, is that the viewer( user ) can simply view the souce-code on their browser and thats it. Everything is wasted...
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Javascript Password Encrypter

 
0
  #4
Jul 21st, 2009
It's still can be caculated by the user and the fact that the actual process inside 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...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Re: Javascript Password Encrypter

 
0
  #5
Jul 21st, 2009
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

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var foo = 5 + 5 * 5;
  2. var moo = foo * 2 * 4;
  3. var goo = moo + foo % 7;
  4. var too = goo * foo + moo;
  5. var hoo = 6 / 2 + too * foo - moo + goo;
  6. var poo = hoo / 50 * 0.04 - 80 % 9.9;
  7. var doo = poo / 5 * 0.3 + 2 / 8;
  8. var koo = doo * poo + hoo - foo % 7 / 8 * 3 / 500 % 29 / 5000 / 5 / 3 - 200000;
  9. var yoo = doo + koo * 500000 / 6.1543 % 8.2543 / 4.4151 + 3135;
  10. var voo = yoo * koo * 44252.45245 * poo * hoo * too * goo * moo * foo / 13.1345 % 170.908;
  11. var joo = voo * 154213451.5245245 % 151.114354 / 4154.5454 + 27527272572.75272;
  12. var noo = joo * 252542.245245 * 25254245.4524245 % 15.5135 / 2542.4524525;
  13. var pass = noo * 52424532543245245 * 5245252425435 * 453435435 / 13 * 2152175621375.1534348343483;
  14. document.write(pass);
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Javascript Password Encrypter

 
0
  #6
Jul 21st, 2009
Anyways, its just my opinion and the whole thing still up to you, if you prefer to claim it using this method, .

Good luck...

essential
Last edited by essential; Jul 21st, 2009 at 1:54 pm.
Dev.Opera — FOLLOW THE STANDARDS, BREAK THE RULES...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Re: Javascript Password Encrypter

 
0
  #7
Jul 21st, 2009
I'm still looking for an encrypter, that's why this isn't marked as solved yet
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Javascript Password Encrypter

 
0
  #8
Jul 21st, 2009
Do you still need some code? Ok i'll post back later...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Re: Javascript Password Encrypter

 
0
  #9
Jul 21st, 2009
Ok
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: DealthRune is an unknown quantity at this point 
Solved Threads: 0
DealthRune DealthRune is offline Offline
Light Poster

Re: Javascript Password Encrypter

 
0
  #10
Jul 21st, 2009
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.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <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>
  4. </head>
  5. <body>
  6. <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>
  7. <br /><br /><br /><br /><br /><br /><br /><br /><br />
  8. <center><table border='0' cellspacing='0' cellpadding='0'>
  9. <tr>
  10. <td align'center'>
  11. <fieldset>
  12. <legend>Please Enter The Password</legend><br />
  13. <input type="password" id="pass" value="" size='50' /><br />
  14. <input type='button' onclick="check(document.getElementById('pass').value)" value='Check Password'>
  15. </td>
  16. </tr>
  17. </fieldset>
  18. </table>
  19. </center>
  20. </body>
  21. </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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC