好友
阅读权限10
听众
最后登录1970-1-1
|
cv14
发表于 2023-8-20 19:53
https://github.com/JSREI/ast-hook-for-js-RE写在前面 纯纯偷懒的 不建议使用 大佬轻喷根据上面的开源项目 安装 再使用十一姐分享的Proxy SwitchyOmega浏览器插件进行代{过}{滤}理 配置如下
js代码如下
[JavaScript] 纯文本查看 复制代码 function cc11001100_hook(name, value, type) {
return value;
}
function decode(str) {
cc11001100_hook("str", str, "function-parameter");
var CryptoJS = cc11001100_hook("CryptoJS", require("crypto-js"), "var-init");
var KEY = cc11001100_hook("KEY", 'aiding6666666666', "var-init");
var key = cc11001100_hook("key", CryptoJS.enc.Utf8.parse(KEY), "var-init");
var decrypted = cc11001100_hook("decrypted", CryptoJS.AES.decrypt(str, key, {
// iv: iv,
mode: cc11001100_hook("mode", CryptoJS.mode.ECB, "object-key-init"),
padding: cc11001100_hook("padding", CryptoJS.pad.Pkcs7, "object-key-init")
}), "var-init");
return decrypted.toString(CryptoJS.enc.Utf8);
} py代码[Python] 纯文本查看 复制代码 import json
import execjs
import requests
cookies = {
'sessionid': 'zjbapxhv7ws8p1a2o94apav9elnf8dqk',
'no-alert': 'true',
}
headers = {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Origin': 'https://www.python-spider.com',
'Pragma': 'no-cache',
'Referer': 'https://www.python-spider.com/challenge/55',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203',
'X-Requested-With': 'XMLHttpRequest',
'sec-ch-ua': '"Not/A)Brand";v="99", "Microsoft Edge";v="115", "Chromium";v="115"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
}
num = []
for i in range(1, 101):
data = {
'page': i
}
response = requests.post('https://www.python-spider.com/api/challenge55', headers=headers, cookies=cookies,
data=data)
str = response.json()["result"]
with open("55.js", "r", encoding='utf-8') as f:
js_code = f.read()
js_call1 = execjs.compile(js_code)
js_call = js_call1.call('decode', str)
data = json.loads(js_call)
d = data["data"]
for v in d:
num.append(v["value"])
cleaned_d = [int(x.replace('\r', '')) for x in num]
total_sum = sum(cleaned_d)
print(total_sum)
# js = json.load(js_call)
# print(js) |
免费评分
-
查看全部评分
|