Guest User

Untitled

a guest
Apr 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <script>
  2. function checkPass()
  3. {
  4. var p1 = "bewareoftheenigmagroupunderground";
  5. var p2 = "betterofftohacktherealownersboxes";
  6. var p3 = "wassaidbyadudepseudodpsychomarine";
  7. var confirmPass = document.login.password.value;
  8. var chk0 = 0;
  9. var pass = "";
  10. var base = "";
  11. for ( a = 0; a < p1.length; ++a )
  12. {
  13. var blah = confirmPass.substring ( chk0, chk0 + 1 );
  14.  
  15. var chk1 = p1.substring ( a, a + 1 );
  16. var chk2 = p2.substring ( a, a + 1 );
  17. var chk3 = p3.substring ( a, a + 1 );
  18.  
  19. if ( chk1 == chk3 ) {
  20. if ( chk1 == blah) {
  21. base = base + chk1;
  22. alert("A");
  23. } else {
  24. break;
  25. }
  26. chk0++;
  27. }
  28.  
  29. if ( chk2 == chk1 ) {
  30. if ( chk2 == blah) {
  31. base = base + chk2;
  32. alert("B");
  33. } else {
  34. break;
  35. }
  36. chk0++;
  37. }
  38.  
  39. if ( chk3 == chk2 ) {
  40. if ( chk3 == blah) {
  41. base = base + chk3;
  42. alert("C");
  43. } else {
  44. break;
  45. }
  46. chk0++;
  47. }
  48.  
  49. alert("base is: " + base);
  50.  
  51. ( p1.length == a + 1 ) ? pass = base : false;
  52. }
  53. ( confirmPass != '' && confirmPass == pass ) ? window.location.href=pass+".php" : alert( "Wrong! Please try again." );
  54. }
  55. </script>
  56. <form id="login" method="post" action="" name="login">
  57. Password:
  58. <input id="password" type="password" maxlength="30" size="30" value="" name="password">
  59. <input id="submit" type="button" onclick="checkPass()" value="Click to Login" name="submit">
  60. </form>
Add Comment
Please, Sign In to add comment