爱奇艺登录之滑动验证源码

部分代码

.版本 2 .支持库 EThread .支持库 spec .支持库 BmpOperate .程序集 窗口程序集_启动窗口 .子程序 __启动窗口_创建完毕 .子程序 _登录按钮_被单击 滑块位置标签.标题 = “X: 0” 连续赋值 (0, 滑块X刻度标签.左边, 滑块图形按钮.左边, 验证码滑块条.位置) 连续赋值 (真, 滑块X刻度标签.可视, 滑块图形按钮.可视) 登录按钮.禁止 = 真 启动线程 (&子程序1, , ) .子程序 子程序1, , , 爱奇艺登录之滑块验证例子演示 .局部变量 js, JScript .局部变量 json, JSON___ .局部变量 http, WinHttp .局部变量 result, 文本型 .局部变量 code, 文本型 .局部变量 msg, 文本型 .局部变量 area_code, 文本型 .局部变量 email, 文本型 .局部变量 pwd, 文本型 .局部变量 passwd, 文本型 .局部变量 ua, 文本型 .局部变量 href, 文本型 .局部变量 ptid, 文本型 .局部变量 plat, 文本型 .局部变量 ver, 文本型 .局部变量 canvasFp, 文本型 .局部变量 webglFp, 文本型 .局部变量 guid, 文本型 .局部变量 QC005, 文本型 .局部变量 QC006, 文本型 .局部变量 dim, 文本型 .局部变量 sig, 文本型 .局部变量 dfp, 文本型 .局部变量 token, 文本型 .局部变量 secure, 文本型 .局部变量 sign, 文本型 .局部变量 sid, 文本型 .局部变量 sr, 文本型 .局部变量 cryptSrcData, 文本型 .局部变量 cryptVersion, 文本型 .局部变量 imageBgUrl, 文本型 .局部变量 iconUrl, 文本型 .局部变量 iconYOffset, 整数型 .局部变量 x, 文本型 .局部变量 redirect, 文本型 .局部变量 nickname, 文本型 area_code = “86” email = “134” + 文本_取随机数字 (8) ' mobile pwd = 文本_取随机数字 (9) ' password js.Reset () js.AddCode (#iqiyi_SEA) passwd = js.Run (“RSA_Encrypt”, pwd) ' 调试输出 (“passwd”, passwd) ua = “Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36” href = “//www.iqiyi.com/iframe/loginreg?show_back=1” http.SetUserAgent (ua) http.Open (#GET, href) http.Send () result = http.GetBodyUTF8 () ptid = “01010021010000000000” plat = “PCWEB” ver = “1.0” canvasFp = “c0a194c666b8c2f549511969047febd3” webglFp = “5c1ab9317b09bf18b2d387ef55c13ed5” guid = js.Run (“generateguid”) QC005 = js.Run (“generateQC005”) QC006 = js.Run (“generateQC006”) 调试输出 (“guid”, guid, “QC005”, QC005, “QC006”, QC006) dim = 编码_Base64编码 (到字节集 (子文本替换 (“{'jn':'” + ua + “','cm':'zh-CN','gu':24,'uf':1,'jr':[1920,1080],'di':[1920,1040],'zp':-480,'uh':1,'sh':1,'he':1,'rv':'unknown','nx':'Win32','iw':'unspecified','qm':[],'wr':'” + canvasFp + “','wg':'” + webglFp + “','fk':false,'rg':false,'xy':false,'jm':false,'ba':false,'tm':[0,false,false],'au':true,'mi':'” + guid + “','cl':'” + plat + “','sv':'” + ver + “','jg':'” + QC005 + “','fh':'” + QC006 + “','ifm':[false,null,null,null],'ex':'','pv':true}”, “'”, #引号, , , 真))) sig = js.Run (“HmacSHA1_Encrypt”, dim + plat + ver) 调试输出 (“sig”, sig) http.Open (#POST, “https://cook.iqiyi.com/security/dfp_pcw/sign”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“dim=” + dim + “&plat=” + plat + “&ver=” + ver + “&sig=” + sig + “&nifc=false”) result = http.GetBodyUTF8 () json.解析 (result) dfp = json.取文本 (“result.dfp”) 调试输出 (“dfp”, dfp) http.Open (#POST, “https://passport.iqiyi.com/apis/reglogin/login.action”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“email=” + email + “&fromSDK=1&sdk_version=1.0.0&passwd=” + passwd + “&agenttype=1&__NEW=1&checkExist=1&lang=&ptid=” + ptid + “&nr=2&verifyPhone=1&area_code=” + area_code + “&dfp=” + dfp) result = http.GetBodyUTF8 () json.解析 (result) code = json.取文本 (“code”) msg = json.取文本 (“msg”) token = json.取文本 (“data.data.token”) 调试输出 (“code”, code, “msg”, msg, “token”, token) ' “code” | “P00223” | “msg” | “安全校验不通过” ' “code” | “P00108” | “msg” | “密码错误,再错n次帐号将被锁定24小时” ' “code” | “P00108” | “msg” | “帐号或密码错误” .如果真 (code = #CHECK) secure = js.Run (“getSecure”) 调试输出 (“secure”, secure) http.Open (#POST, “//qcaptcha.iqiyi.com/api/outer/sbox/sbox_init_key”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“secure=” + secure + “&platform=web&lang=zh_cn&langVersion=7&dfp=undefined&authcookie=undefined&nifc=false”) result = http.GetBodyUTF8 () json.解析 (result) code = json.取文本 (“code”) msg = json.取文本 (“msg”) sign = json.取文本 (“data.sign”) sid = json.取文本 (“data.sid”) sr = json.取文本 (“data.sr”) 调试输出 (“code”, code, “msg”, msg, “sign”, sign, “sid”, sid, “sr”, sr) ' “code” | “A00000” | “msg” | “成功” .如果真 (code = #SUCCESS) cryptSrcData = js.Run (“get_cryptSrcData”, area_code, ptid, QC005, dfp, token, sr) cryptVersion = js.Run (“get_cryptVersion”, sid) 调试输出 (“cryptSrcData”, cryptSrcData, “cryptVersion”, cryptVersion) http.Open (#POST, “//qcaptcha.iqiyi.com/api/outer/verifycenter/initpage”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“cryptSrcData=” + cryptSrcData + “&cryptVersion=” + cryptVersion + “&platform=web&nifc=false”) result = http.GetBodyUTF8 () result = js.Run (“AES_Decrypt”, 文本_取左边 (result, “|”)) json.解析 (result) code = json.取文本 (“code”) msg = json.取文本 (“msg”) imageBgUrl = json.取文本 (“data.initData.imageBgUrl”) iconUrl = json.取文本 (“data.initData.iconUrl”) iconYOffset = json.取长整数 (“data.initData.iconYOffset”) 调试输出 (“code”, code, “msg”, msg, “imageBgUrl”, imageBgUrl, “iconUrl”, iconUrl, “iconYOffset”, iconYOffset) ' {"code":"A00000","msg":"成功","data":{"autoResult":null,"captchaType":"slidecode","initData":{"token":"490a8e17b89a4e6a8096a1b00cead673","autoResult":null,"captchaType":"slidecode","sourceType":"unUse","secondVerify":null,"secondToken":null,"secodVerify":null,"secodToken":null,"imageBgUrl":"/api/outer/image/bg/490a8e17b89a4e6a8096a1b00cead673a9a5ae3426a342ae80bb491fbfcf7247.jpg","imageBlockOffset":[[{"t1":12,"t2":0},{"t1":2,"t2":0},{"t1":3,"t2":0},{"t1":15,"t2":0},{"t1":18,"t2":0},{"t1":9,"t2":0},{"t1":6,"t2":0},{"t1":10,"t2":0},{"t1":14,"t2":0},{"t1":19,"t2":0},{"t1":1,"t2":0},{"t1":11,"t2":0},{"t1":7,"t2":0},{"t1":8,"t2":0},{"t1":17,"t2":0},{"t1":16,"t2":0},{"t1":13,"t2":0},{"t1":5,"t2":0},{"t1":0,"t2":0},{"t1":4,"t2":0}],[{"t1":0,"t2":1},{"t1":3,"t2":1},{"t1":5,"t2":1},{"t1":6,"t2":1},{"t1":2,"t2":1},{"t1":15,"t2":1},{"t1":9,"t2":1},{"t1":10,"t2":1},{"t1":18,"t2":1},{"t1":19,"t2":1},{"t1":13,"t2":1},{"t1":14,"t2":1},{"t1":17,"t2":1},{"t1":7,"t2":1},{"t1":11,"t2":1},{"t1":1,"t2":1},{"t1":12,"t2":1},{"t1":8,"t2":1},{"t1":4,"t2":1},{"t1":16,"t2":1}]],"imageWidth":360,"imageHeight":222,"imageBlockPerWidth":18,"imageBlockPerHeight":111,"iconUrl":"/api/outer/image/icon/490a8e17b89a4e6a8096a1b00cead673a9a5ae3426a342ae80bb491fbfcf7247.png","iconWidth":74,"iconHeight":74,"iconYOffset":38},"availableCaptchaList":[]}} ' “code” | “B00015” | “msg” | “缓存异常” .如果真 (code = #SUCCESS) http.Open (#GET, “//qcaptcha.iqiyi.com” + imageBgUrl) http.Send () 验证码图片框.图片 = BGRestore (http.GetBody (), result) http.Open (#GET, “//qcaptcha.iqiyi.com” + iconUrl) http.Send () 滑块图形按钮.正常图片 = 子程序2 (http.GetBody ()) 滑块图形按钮.顶边 = iconYOffset 验证码滑块条.禁止 = 假 .循环判断首 () sleep (100) .循环判断尾 (验证码滑块条.禁止 = 假) x = 到文本 (验证码滑块条.位置) 调试输出 (“x”, x) cryptSrcData = js.Run (“get_cryptSrcData_slide”, x, dfp, token) 调试输出 (“cryptSrcData”, cryptSrcData) http.Open (#POST, “//qcaptcha.iqiyi.com/api/outer/verifycenter/verify”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“cryptSrcData=” + cryptSrcData + “&cryptVersion=” + cryptVersion + “&platform=web&noCryptToken=undefined&nifc=false”) result = http.GetBodyUTF8 () result = js.Run (“AES_Decrypt”, 文本_取左边 (result, “|”)) json.解析 (result) code = json.取文本 (“code”) msg = json.取文本 (“msg”) 调试输出 (“code”, code, “msg”, msg) ' “code” | “A00000” | “msg” | “null” ' “code” | “B00006” | “msg” | “校验失败,请重试” ' “code” | “B00008” | “msg” | “行为校验异常,请重试” .如果真 (code = #SUCCESS) http.Open (#POST, “https://passport.iqiyi.com/apis/reglogin/login.action”) http.SetContent_Type (“application/x-www-form-urlencoded”) http.SetReferer (href) http.Send (“email=” + email + “&fromSDK=1&sdk_version=1.0.0&passwd=” + passwd + “&agenttype=1&__NEW=1&checkExist=1&lang=&ptid=” + ptid + “&nr=2&verifyPhone=1&area_code=” + area_code + “&env_token=” + token + “&dfp=” + dfp) result = http.GetBodyUTF8 () json.解析 (result) code = json.取文本 (“code”) msg = json.取文本 (“msg”) redirect = json.取文本 (“data.redirect”) nickname = json.取文本 (“data.nickname”) 调试输出 (“code”, code, “msg”, msg, “redirect”, redirect, “nickname”, nickname) ' {"msg":null,"code":"A00000","data":{"redirect":"//passport.pps.tv/user/relogin.php?keep=0&openurl=http%3A%2F%2Fwww.iqiyi.com%2Fu%2Faccountset&authcookie=......&agenttype=1","relogin":"//passport.pps.tv/user/relogin.php?keep=0&authcookie=......&agenttype=1","login_state":0,"icon":"https://img7.iqiyipic.com/passport/20200112/66/b0/passport_1227866194_157866265722924_130_130.jpg","nickname":"NLiger"}} ' “code” | “P00108” | “msg” | “帐号或密码错误” .如果真结束 .如果真结束 .如果真结束 .如果真结束 登录按钮.禁止 = 假 .子程序 BGRestore, 字节集, , 爱奇艺之滑块验证背景图还原算法 .参数 img, 字节集 .参数 data, 文本型 .局部变量 bmp, 字节集 .局部变量 bitmap_i, 位图 .局部变量 bitmap_j, 位图 .局部变量 json, JSON___ .局部变量 imgBpw, 整数型 .局部变量 imgBph, 整数型 .局部变量 imgBolen_i, 整数型 .局部变量 imgBolen_j, 整数型 .局部变量 imgBobj, JSON___ .局部变量 i, 整数型 .局部变量 j, 整数型 .局部变量 left, 整数型 .局部变量 top, 整数型 bmp = toBMP (img) bitmap_i.载入数据 (bmp) bitmap_j.创建 (bitmap_i.取宽度 (), bitmap_i.取高度 (), bitmap_i.取位深度 (), ) json.解析 (data) imgBpw = json.取长整数 (“data.initData.imageBlockPerWidth”) imgBph = json.取长整数 (“data.initData.imageBlockPerHeight”) imgBolen_i = json.取成员数 (“data.initData.imageBlockOffset”) - 1 .变量循环首 (0, imgBolen_i, 1, i) imgBolen_j = json.取成员数 (“data.initData.imageBlockOffset[” + 到文本 (i) + “]”) - 1 .变量循环首 (0, imgBolen_j, 1, j) imgBobj = json.取成员 (“data.initData.imageBlockOffset[” + 到文本 (i) + “]”, j) left = imgBobj.取长整数 (“t1”) × imgBpw top = imgBobj.取长整数 (“t2”) × imgBph bitmap_i.复制到 (left, top, imgBpw, imgBph, bitmap_j, j × imgBpw, i × imgBph, ) .变量循环尾 () .变量循环尾 () 返回 (bitmap_j.取位图数据 ()) .子程序 子程序2, 字节集, , 简易滑块透明处理 .参数 img, 字节集 .局部变量 bmp, 字节集 .局部变量 bitmap, 位图 .局部变量 x, 整数型 .局部变量 y, 整数型 bmp = toBMP (img) bitmap.载入数据 (bmp) .计次循环首 (bitmap.取宽度 (), x) .计次循环首 (bitmap.取高度 (), y) .如果真 (bitmap.取某点颜色 (x, y) ≥ 13000000) bitmap.置某点颜色 (x, y, #白色) .如果真结束 .计次循环尾 () .计次循环尾 () 返回 (bitmap.取位图数据 ()) .子程序 _验证码滑块条_位置被改变 滑块图形按钮.左边 = 验证码滑块条.位置 滑块X刻度标签.左边 = 滑块图形按钮.左边 滑块位置标签.标题 = “X: ” + 到文本 (验证码滑块条.位置) .子程序 _验证码滑块条_鼠标左键被放开, 逻辑型 .参数 横向位置, 整数型 .参数 纵向位置, 整数型 .参数 功能键状态, 整数型 验证码滑块条.禁止 = 真 .子程序 _时钟1_周期事件 .局部变量 color, 整数型, , "4" color [1] = #红色 color [2] = #绿色 color [3] = #蓝色 color [4] = #黄色 滑块X刻度标签.背景颜色 = color [取随机数 (1, 4)]
相关文件下载地址
©下载资源版权归作者所有;本站所有资源均来源于网络,仅供学习使用,请支持正版!

爱奇艺登录之滑动验证源码》有0个想法

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注