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