60js加密轻混url加密-AES

This commit is contained in:
luzhisheng 2023-02-23 00:46:59 +08:00
parent fcb746b36f
commit 86394ed812
2 changed files with 32 additions and 23 deletions

View File

@ -1,23 +1,33 @@
const CryptoJS = require("crypto-js");
let value = "5"; //待加密的字符串
let secret_value = "aiding88";
// 密匙和向量处理
let secret = CryptoJS.enc.Utf8.parse(secret_value);
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 = CryptoJS;
continue;
case '3':
var S = 'aiding88';
continue;
case '4':
var D = Y['AES']['encrypt'](j, d, {
'mode': Y['mode']['ECB'],
'padding': Y['pad']['Pkcs7']
});
console.log(D);
continue;
}
break;
}
}
// 加密
let encrypted = CryptoJS.AES.encrypt(value, secret, {
// mode 支持 CBC, CFB,CTB,ECB,OFB,OFB, 默认CBC
mode: CryptoJS.mode.ECB,
// NoPadding, zeropadding 默认Pkcs7 即 pkcs5
padding: CryptoJS.pad.Pkcs7
});
// 将加密结果转换为字符串
encrypted = encrypted.toString();
console.log(secret);
console.log(value);
console.log(encrypted);
console.log(L('1'));

View File

@ -6,6 +6,7 @@ def challenge60(page, encrypted_text):
url = f"https://www.python-spider.com/api/challenge60/{encrypted_text}"
print(url)
payload = f"page={page}"
print(payload)
session = requests.session()
headers = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
@ -17,14 +18,12 @@ def challenge60(page, encrypted_text):
def run():
data_num = 0
for page in range(5, 101):
print('aiding88', str(page))
for page in range(1, 101):
encrypted_text = encrypt('aiding88', str(page))
print(encrypted_text)
response_json = challenge60(page, encrypted_text)
data_list = response_json.get('data')
print(data_list)
print(response_json)
exit()
data_list = response_json.get('data')
for data in data_list:
data_num += int(data.get('value'))
print(data_num)