1
2
3
4
5
6
7
8
9
10
11
12
13
var i = R['nsYGK'] + L(c['toString']())
, o = {
'page': String(c)
};
$['ajax']({
'url': i,
'dataType': R['MFPgf'],
'async': !![],
'data': o,
'type': R['zDNUy'],
'beforeSend': function(j) {
(function() {}());
},
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function L(j) {
var I = '2|3|0|4|1'['split']('|')
, J = 0xd * -0x4 + 0x1f35 * -0x1 + -0x2db * -0xb;
while (!![]) {
switch (I[J++]) {
case '0':
var d = Y['enc']['Utf8']['parse'](S);
continue;
case '1':
return D['toString']();
case '2':
var Y = V(R['SnZfo']);
continue;
case '3':
var S = 'aiding88';
continue;
case '4':
var D = Y['AES']['encrypt'](j, d, {
'mode': Y['mode']['ECB'],
'padding': Y['pad']['Pkcs7']
});
continue;
}
break;
}
}
var i = R['nsYGK'] + L(c['toString']())
1
2
3
4
5
6
7
8
9
function L(j) {
var Y = V(R['SnZfo']);
var S = 'aiding88';
var d = Y['enc']['Utf8']['parse'](S);
var D = Y['AES']['encrypt'](j, d, {
'mode': Y['mode']['ECB'],
'padding': Y['pad']['Pkcs7']
});
return D['toString']();}

使用cryptojs 尝试重写代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const CryptoJS = require('crypto-js');

const text = "1";
const key = CryptoJS.enc.Utf8.parse("aiding88");


let keys = CryptoJS.enc.Utf8.parse(key)
let encrypt = CryptoJS.AES.encrypt(text, keys, {
mode: CryptoJS.mode.ECB, //ECB模式
padding: CryptoJS.pad.Pkcs7 //padding处理
});


console.log(CryptoJS.enc.Base64.stringify(encrypt.ciphertext))
console.log(encrypt.ciphertext.toString());

//9X1+H/MyjceoBXn2nphj7g==
//f57d7e1ff3328dc7a80579f69e9863ee

发现结果和在网页上的结果不一样

1


https://kingjem.github.io/2024/10/14/猿人学/猿人学Web61题实战/
作者
Ruhai
发布于
2024年10月14日
许可协议