环境
win10 chrome106
目标站:aHR0cHM6Ly93d3cuZ205OS5jb20v
加密参数 password: K6YEmQrNy%2FQgdnacXhdIZ1upCj4UU562IW89oOZquLkZ%2F16JDNyMqEU7pGVemvQzjfAlOzh7nSOLPkJp3kxbTm8XtWrHp9K%2BmMClOmmhkbdjAyax5xLBWC6PJiD6o8H
随便输入一些信息,触发登录,抓包找到接口
明显分析出a.encode就是加密方法
webpack必有一个加载模块的方法:call或apply,找到加载器先抠出来
function e(s) {
if (i[s])
return i[s].exports;
var n = i[s] = {
exports: {},
id: s,
loaded: !1
};
return t[s].call(n.exports, n, n.exports, e),
}
在控制台调试一下缺什么补什么
!function(t) {
function e(s) {
var i = {};
if (i[s])
return i[s].exports;
var n = i[s] = {
exports: {},
id: s,
loaded: !1
};
return t[s].call(n.exports, n, n.exports, e),
}
}()
在a.encode处下断点,跟进去找到最终的加密方法
分析得知jsencrypt.encrypt就是最终的加密方法
将jsencrypt.encrypt的方法整段扣出来,然后作为参数填入自执行加载器中,然后在将调用jsencrypt.encrypt的方法也抠出来
代码太长就不贴了,最终的格式就是下面的样子,
!(function(t) {
var i = {};
function e(s) {
if (i[s]) return i[s].exports;
var n = i[s] = {
exports: {},
id: s,
loaded: !1
};
return t[s].call(n.exports, n, n.exports, e), n.loaded = !0, n.exports
}
_e = e;
})({
encrypt: function(t, e, i) {},
diaoyong: function(t, e, i) {}
});
var _e;
!(function(t) {
var i = {};
function e(s) {
if (i[s]) return i[s].exports;
var n = i[s] = {
exports: {},
id: s,
loaded: !1
};
return t[s].call(n.exports, n, n.exports, e), n.loaded = !0, n.exports
}
_e = e;
})({
encrypt: function(t, e, i) {},
diaoyong: function(t, e, i) {}
});
function getkey(pass, time) {
var diaoyong= _e("diaoyong");
//这儿需要new一下调用方法,不然获取不到方法属性
var new_diaoyong = (new diaoyong);
return new_diaoyong.encode(pass, time)
}
https://download.csdn.net/download/qq_38154948/87253109
本文仅供学习交流使用,如侵立删! |
---|
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有