Skip to content

Instantly share code, notes, and snippets.

@makeding
Created Jan 21, 2018
Embed
What would you like to do?
var request= require('request');
var fs= require('fs');
let user=['user']
let j = request.jar()
let usercookie=[];
for (var ii = 0; ii < user.length; ii++) {
let i=ii;
let loginurl="https://fujianlogin.safetree.com.cn/LoginHandler.ashx?userName="+user[ii]+"&password=123456&checkcode=&type=login&loginType=1"
request({url: loginurl, jar: j}, function () {
let cookies = j.getCookieString(loginurl);
request({
url:"https://Yourcountry.safetree.com.cn/WebApi/SpecialService/FinishWork?jsoncallback=jQuery16105383346864184033_1512876689231&r=0.951077207429996&SpecialID=141&WorkStep=1&_=1512876703961",
headers: {
'Cookie': cookies
}
},function(err,req,body){
console.log(user[i]+" "+body);
})
})
}
@Erohal
Copy link

Erohal commented Mar 6, 2020

绍兴市安全教育平台做一下吧😂

@makeding
Copy link
Author

makeding commented Mar 6, 2020

绍兴市安全教育平台做一下吧😂

这只是参考代码(((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment