Guest User

Untitled

a guest
May 1st, 2016
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 $("#login_button").click(function() {
  2.                     var username = $("#username").val();
  3.                     var password = $("#password").val();
  4.                     // Verify the inputted password, so that attackers can't get in
  5.                     if(username == "admin" && CryptoJS.SHA256(password).toString() == "7de7b2fed84fd29656dff73bc98daef391b0480efdb0f2e3034e7598b5a412ce") {
  6.                         // If they have the correct password go to the admin page.
  7.                         // For extra security, the hash of the password is added into the name
  8.                         window.location.href = "admin_" + CryptoJS.SHA256(password).toString() + ".html";
  9.                     }
  10.                 })
  11.             })
Add Comment
Please, Sign In to add comment