@
asvow 前几天发现 jegotrip 对部分 post 的 body 进行了 aes 加密,狗尾续貂,帮大佬改了几行代码,能继续使用了
signid = {"signConfigId":id};
body = JSON.stringify(Encrypt(signid));
function Encrypt(i) {
if (!i || "object" != typeof i) return {};
var t = "online_jego_h5",
r = "93EFE107DDE6DE51",
n = "01";
var o = function() {
var i = (new Date).getTime().toString() + Math.floor(900 * Math.random() + 100).toString(),
o = r + i,
s = CryptoJs.MD5(o).toString().toLowerCase().slice(8, 24),
c = CryptoJs.enc.Utf8.parse(t + ";" + i + ";" + n);
return {
key: s,
sec: CryptoJs.enc.Base64.stringify(c)
}
}(),
s = JSON.stringify(i),
c = CryptoJs.enc.Utf8.parse(o.key),
a = CryptoJs.AES.encrypt(s, c, {
mode: CryptoJs.mode.ECB,
padding: CryptoJs.pad.Pkcs7
}).toString();
return {
sec: o.sec,
body: a
}
}