解决了,但是现在又报这个错误
execjs._exceptions.ProgramError: ReferenceError: document is not defined
但是我js调试过是正确的,这是为什么呢
python代码为import execjs
rndnum = "607374188.44535993"
starttime = "2022/4/21 14:25:20"
activityId = "129722188"
jqsign = execjs.compile(open(r"1.js", encoding='utf-8').read()).call('_0x156205',rndnum,starttime,activityId)
print(jqsign)
js代码为global.navigator={
userAgent: 'node.js',
};
function abcd1(_0xd7a12a) {
return abcd2(_0xd7a12a, 3597397);
}
function abcd2(_0x5d3f51, _0x2da958) {
if (!abcdx()) return;
var _0x17fe67 = 2147483648;
var _0x330f76 = 2147483647;
var _0x8c2ab2 = ~~(_0x5d3f51 / _0x17fe67);
var _0x33045d = ~~(_0x2da958 / _0x17fe67);
var _0xa5b0b1 = _0x5d3f51 & _0x330f76;
var _0x352369 = _0x2da958 & _0x330f76;
var _0x3f97b8 = _0x8c2ab2 ^ _0x33045d;
var _0x4307f8 = _0xa5b0b1 ^ _0x352369;
return _0x3f97b8 * _0x17fe67 + _0x4307f8;
}
function abcd3(_0x2a839f, _0x29778) {
if (_0x2a839f - 62 < 0) {
var _0x47bf41 = _0x29778["substr"](_0x2a839f, 1);
return _0x47bf41;
}
var _0x5aa264 = _0x2a839f % 62;
var _0xf91ae6 = parseInt(_0x2a839f / 62);
return abcd3(_0xf91ae6, _0x29778) + _0x29778["substr"](_0x5aa264, 1);
}
function abcd4(_0x2d1e33, _0x4ccbfe) {
if (!abcdx()) return;
var _0x39c799 = _0x4ccbfe["split"]("");
var _0x368c45 = _0x4ccbfe["length"];
for (var _0x2faa11 = 0; _0x2faa11 < _0x2d1e33["length"]; _0x2faa11++) {
var _0x1e44d9 = parseInt(_0x2d1e33[_0x2faa11]);
var _0x172ebc = _0x39c799[_0x1e44d9];
var _0x939174 = _0x39c799[_0x368c45 - 1 - _0x1e44d9];
_0x39c799[_0x1e44d9] = _0x939174;
_0x39c799[_0x368c45 - 1 - _0x1e44d9] = _0x172ebc;
}
_0x4ccbfe = _0x39c799["join"]("");
return _0x4ccbfe;
}
function abcd5(_0x30fc22) {
if (!abcdx()) return;
var _0x416034 = 0;
var _0x39f6f7 = _0x30fc22["split"]("");
for (var _0x3a1139 = 0; _0x3a1139 < _0x39f6f7["length"]; _0x3a1139++) {
_0x416034 += _0x39f6f7[_0x3a1139]["charCodeAt"]();
}
var _0x33f508 = _0x30fc22["length"];
var _0x51436b = _0x416034 % _0x33f508;
var _0xd1d5ab = [];
for (var _0x3a1139 = _0x51436b; _0x3a1139 < _0x33f508; _0x3a1139++) {
_0xd1d5ab["push"](_0x39f6f7[_0x3a1139]);
}
for (var _0x3a1139 = 0; _0x3a1139 < _0x51436b; _0x3a1139++) {
_0xd1d5ab["push"](_0x39f6f7[_0x3a1139]);
}
return _0xd1d5ab["join"]("");
}
function abcdu(_0x32b9a8) {
var _0x4ba9ab = -480;
var _0x1ce339 = new Date()["getTimezoneOffset"]();
var _0x2ab335 = _0x4ba9ab - _0x1ce339;
return _0x32b9a8["getTime"]() / 1000 + _0x2ab335 * 60;
}
function abcdx() {
if (navigator["webdriver"]) return ![];
if (document["$cdc_asdjflasutopfhvcZLmcfl_"]) return ![];
if (/PhantomJS/ ["test"](window["navigator"]["userAgent"])) return ![];
if (window["callPhantom"] || window["_phantom"]) return ![];
return !![];
}
function _0x156205(rndnum, starttime, activityId) {
var _0x4b9009 = rndnum["split"](".")[0]; //分隔rn 获取前置 给予_0x4b9009
var _0x37348b = abcd1(parseInt(_0x4b9009)); //abcd1处理_0x4b9009 给予_0x37348b
var _0x307a46 = (_0x37348b + "")["split"](""); //_0x37348b 给予_0x307a46
var _0x2f4e03 = starttime; //获取starttime 给予_0x2f4e03
var _0x17071c = abcdu(new Date(_0x2f4e03["replace"](new RegExp("-", "gm"), "/"))); //转换时间戳通过abcdu处理 给予_0x17071c
var _0x12e25a = _0x17071c + "";
if (_0x17071c % 10 > 0) _0x12e25a = _0x12e25a["split"]("")["reverse"]()["join"](""); //_0x17071c%10>0 处理
var _0x24bc24 = parseInt(_0x12e25a + "89123"); //时间戳 1650522320+89123 结果:165052232089123
var _0x307a46 = (_0x24bc24 + "" + (_0x37348b + ""))["split"](""); //分隔上面
var _0xd36323 = abcd4(_0x307a46, "kgESOLJUbB2fCteoQdYmXvF8j9IZs3K0i6w75VcDnG14WAyaxNqPuRlpTHMrhz"); //abcd4处理_0x307a46
var _0xc23193 = _0x24bc24 + _0x37348b + parseInt(activityId); //值得一提activityId打开页面的时候就处理了
jqParam = abcd3(_0xc23193, _0xd36323);
var _0x16feb7 = abcd5(jqParam);
jqParam = _0x16feb7;
return jqParam;
}
var rndnum = "607374188.44535993";
var starttime = "2022/4/21 14:25:20";
var activityId = "129722188";
_0x156205(rndnum, starttime, activityId)
|