某建桥学院登录接口JavaScript逆向
JavaScript逆向某建桥学院登录接口请求头 Cookie、请求参数 password、execution
目标网站
1 | aHR0cHM6Ly9jYXMuZ2VuY2guZWR1LmNuL2Nhcy9sb2dpbg== |
逆向目标
请求头 Cookie:
请求参数 password、execution:
逆向分析
Cookie
第一次请求返回的响应头中有 set-cookie,而且这是一个get请求:
execution
在 Elements 按 Ctrl + F 搜索 execution:
password
按 Ctrl + Shift + F 搜索 password:
进入后打断点重新登陆:
result 就是要找的 password,它是 RSAUtils.encryptedString 方法,接收 key、thisPwd 两个参数
key 是 RSAUtils.getKeyPair 方法,接收3个固定值
thisPwd 是密码 abc123
进入 RSAUtils.encryptedString 方法:
将 security.js 代码全部复制下来:
部分代码,完整代码见仓库:
1 | const RSA = function (password) { |
结果与浏览器一致: