.版本 2
.支持库 spec
.程序集 窗口程序集_启动窗口
.子程序 __启动窗口_创建完毕
调试输出 (“By Tenacity”)
.子程序 getpwd, 文本型
.参数 p, 文本型
.局部变量 rt, QJS
.局部变量 ctx, QJS_Context
.局部变量 data, 文本型
rt.NewRunTime (, , )
ctx = rt.NewContext ()
ctx.Eval (#常量2, , ).free ()
rt.DealPromise ()
ctx.Eval (“test('” + p + “')”, , ).free ()
rt.DealPromise ()
data = ctx.Eval (“window.data”, , ).ToStringA (真)
ctx.free ()
rt.FreeRunTime ()
返回 (data)
.子程序 _按钮1_被单击
login (编辑框1.内容, 编辑框2.内容)
' 调试输出 (getpwd (“1232131”))
.子程序 login, 文本型
.参数 id, 文本型
.参数 p, 文本型
.局部变量 Http, WinHttpW
.局部变量 pwd, 文本型
.局部变量 shareData, 文本型
.局部变量 data, 文本型
.局部变量 json, zyJsonValue
.局部变量 csrf, 文本型
.局部变量 headers, 文本型
.局部变量 csrftoken, 文本型
.局部变量 Cookies, 文本型
.局部变量 checkpoint_url, 文本型
' Content-Length': str(len(data)),
' Content-Type': 'application/x-www-form-urlencoded',
' x-csrftoken': '5crvmhQdVTFeRanb67VGW4x9mPpASrth',
' x-ig-app-id': '936619743392459',
' x-ig-www-claim': '0',
' x-instagram-ajax': '923d197144b7',
' x-requested-with': 'XMLHttpRequest',
' user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'
pwd = getpwd (p) ' ''''''''''''''''''''''
data = 取文本 (“username=%s&enc_password=%s&queryParams=%7B%7D&optIntoOneTap=false”, URLEncode (id), URLEncode (pwd))
headers = 子文本替换 (#常量1, “H6YHktH11WZLaqJgSvHaRr7TV3zBuUdp”, “H6YHktH11WZLaqJgSvHaRr7TV3zB” + 文本_取随机字符串 (4, ), , , 真)
Http.Open (“POST”, “https://www.instagram.com/accounts/login/ajax/”)
Http.SetContentType (“application/x-www-form-urlencoded”)
Http.SetRequestHeader (“Content-Length”, 到文本 (取文本长度 (data)), )
Http.SetRequestHeaders (headers, )
Http.Send (data)
Cookies = Http.GetAllResponseCookies ()
.判断开始 (Http.GetStatus () = 429)
返回 (“IP频繁”)
.默认
.判断结束
.如果真 (Http.GetStatus () = 400)
.如果真 (json.解析 (Http.GetResponseText (), , , ) = 假)
返回 (“解析失败”)
.如果真结束
返回 (“疑似”)
.如果真结束
.如果真 (Http.GetStatus () = 200)
调试输出 (Http.GetResponseText ())
返回 (“登录成功\密码错误”)
.如果真结束
返回 (“”)