老论坛搜索到的,但是年份久远不能用了。这里改进一下!
感谢各位开源前辈~!
import console;
import web.rest.client;
import process
var http = web.rest.client();
http.get("https://oa.tongda2000.com")
var yzmimg = http.get("https://oa.tongda2000.com/module/captcha/captcha_output.php?random=0.3797159275569404")
string.save("r:\yzm.jpg", yzmimg)
process.execute("r:\yzm.jpg")
var yzm = console.getText( "请输入验证码:" )
var html = http.api("https://oa.tongda2000.com/logincheck.php").post(
UNAME="lijia";
CAPTCHA=yzm;
encode_type=1;
);
console.log(html)
console.pause()
console.pause(true);
登录提示:正在进入OA系统,即是成功~!