(转)post登陆一例
By
admin
at 2019-10-06 • 0人收藏 • 2136人看过
该代码来源于aardio群 tkf分享 , 收藏学习
问题:这个网页post登陆的,出现一个奇怪的问题
网页那边的抓包和AAR这边的抓包可以看到提交的内容加密后是一样的
但网页那边提交是正常登陆成功
而AAR这边提交登陆却提示验证码不正确
import win.ui; /*DSG{{*/ var winform = win.form(text="aardio form";right=487;bottom=357) winform.add( button={cls="button";text="Button";left=139;top=188;right=263;bottom=234;z=1}; edit={cls="edit";left=174;top=124;right=242;bottom=148;edge=1;z=3}; plus={cls="plus";left=149;top=37;right=281;bottom=81;z=2} ) /*}}*/ import inet.http var http = inet.http() http.disableCache() http.addHeaders = "x-requested-with:XMLHttpRequest" import console; import string.base64 import web.script var wbs = web.script() wbs.addCode(http.get("https://ez-k.enzuo77.com/Public/TPL01/JS/deflate.js?v=11646")) //http.post("https://ez-k.enzuo77.com/?s=/ApiPublic/getNewCaptcha/","zipinfo=U1ICAA%3D%3D") winform.plus.setBackground(http.get("https://ez-k.enzuo77.com/?s=/Captcha/&t=0.703325592311695")) var zip_deflate = function(str){ return wbs.script.zip_deflate(str); } var base64_encode = function(str){ return wbs.script.base64_encode(str) } import web.json winform.button.oncommand = function(id,event){ console.log(string.unescape(http.post("https://ez-k.enzuo77.com/?s=/ApiPublic/login/","zipinfo="+inet.url.encode(base64_encode(zip_deflate(web.json.stringify({ user_account = "123123"; user_password = "123123"; login_mode = "0"; captcha = winform.edit.text; }))))))) } winform.show() win.loopMessage();
上面利用了它自带的js函数deflate文件进行加解密
登录后方可回帖