Skip to content

Instantly share code, notes, and snippets.

@makeding
Created January 21, 2018 09:06
Show Gist options
  • Save makeding/e623f93b7bcb93dddcf24cef6f0713ad to your computer and use it in GitHub Desktop.
Save makeding/e623f93b7bcb93dddcf24cef6f0713ad to your computer and use it in GitHub Desktop.
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);
})
})
}
@Helio609
Copy link

Helio609 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