Created
January 21, 2018 09:06
-
-
Save makeding/e623f93b7bcb93dddcf24cef6f0713ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
绍兴市安全教育平台做一下吧😂