逆向目标
题目1:抓取所有(5页)机票的价格,并计算所有机票价格的平均值,填入答案。
目标网址:https://match.yuanrenxue.cn/match/1
目标接口:https://match.yuanrenxue.cn/api/match/1?page=2&m=9a7e61f783bc3f037aa3f64e05292493%E4%B8%A81708507581
加密参数:m
逆向过程
老规矩,我们先抓包分析下,加密参数如下,没有什么难度
逆向分析
接下来我们先观察下启动器,加密逻辑不可能在jquery.min.js
文件中的,排除这个选项后,如下图VM216922:6
,我们直接点进去并打个断点
然后再点击下一页,发现断住了
上述加密文件总行数也就 193行
,并且主要是字符串编码混淆
,再结合作者要考察的目标
我们直接 AST
还原下,还原核心如下
const transform_literal = {
StringLiteral({node})
{
if (node.extra && /\\[ux]/gi.test(node.extra.raw)) {
node.extra = undefined;
}
},
}
完整还原代码
const parser = require("@babel/parser");
const traverse = require("@babel/traverse").default;
const types = require("@babel/types");
const generator = require("@babel/generator").default;
jscode = `
window['\x75\x72\x6c'] = '\x2f\x61\x70\x69\x2f' + '\x6d\x61\x74\x63\x68' + '\x2f\x31',
request = function() {
var _0x2268f9 = Date['\x70\x61\x72\x73\x65'](new Date()) + (16798545 + -72936737 + 156138192)
, _0x57feae = oo0O0(_0x2268f9['\x74\x6f\x53\x74\x72' + '\x69\x6e\x67']()) + window['\x66'];
const _0x5d83a3 = {};
_0x5d83a3['\x70\x61\x67\x65'] = window['\x70\x61\x67\x65'],
_0x5d83a3['\x6d'] = _0x57feae + '\u4e28' + _0x2268f9 / (-1 * 3483 + -9059 + 13542);
var _0xb89747 = _0x5d83a3;
$['\x61\x6a\x61\x78']({
'\x75\x72\x6c': window['\x75\x72\x6c'],
'\x64\x61\x74\x61\x54\x79\x70\x65': '\x6a\x73\x6f\x6e',
'\x61\x73\x79\x6e\x63': ![],
'\x64\x61\x74\x61': _0xb89747,
'\x74\x79\x70\x65': '\x47\x45\x54',
'\x62\x65\x66\x6f\x72\x65\x53\x65\x6e\x64': function(_0x4c488e) {},
'\x73\x75\x63\x63\x65\x73\x73': function(_0x131e59) {
_0x131e59 = _0x131e59['\x64\x61\x74\x61'];
let _0x354583 = ''
, _0x1b89ba = '\x3c\x64\x69\x76\x20' + '\x63\x6c\x61\x73\x73' + '\x3d\x22\x62\x2d\x61' + '\x69\x72\x66\x6c\x79' + '\x22\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x65' + '\x2d\x61\x69\x72\x66' + '\x6c\x79\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x22\x3e\x3c' + '\x64\x69\x76\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x63\x6f\x6c\x2d' + '\x74\x72\x69\x70\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x22\x3e\x3c\x64' + '\x69\x76\x20\x63\x6c' + '\x61\x73\x73\x3d\x22' + '\x73\x2d\x74\x72\x69' + '\x70\x22\x64\x61\x74' + '\x61\x2d\x72\x65\x61' + '\x63\x74\x69\x64\x3d' + '\x22\x2e\x31\x2e\x33' + '\x2e\x33\x2e\x32\x2e' + '\x30\x2e\x24\x4b\x4e' + '\x35\x39\x31\x31\x2e' + '\x30\x2e\x30\x2e\x30' + '\x22\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x63' + '\x6f\x6c\x2d\x61\x69' + '\x72\x6c\x69\x6e\x65' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x22\x3e\x3c\x64' + '\x69\x76\x20\x63\x6c' + '\x61\x73\x73\x3d\x22' + '\x64\x2d\x61\x69\x72' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x2e\x30\x3a\x24' + '\x30\x22\x3e\x3c\x64' + '\x69\x76\x20\x63\x6c' + '\x61\x73\x73\x3d\x22' + '\x61\x69\x72\x22\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x3a\x24\x30\x2e' + '\x30\x22\x3e\x3c\x73' + '\x70\x61\x6e\x20\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x3a\x24\x30\x2e' + '\x30\x2e\x31\x22\x3e' + '\u4e2d\u56fd\u8054\u5408\u822a' + '\u7a7a\x3c\x2f\x73\x70' + '\x61\x6e\x3e\x3c\x2f' + '\x64\x69\x76\x3e\x3c' + '\x64\x69\x76\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x6e\x75\x6d\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x30' + '\x2e\x30\x3a\x24\x30' + '\x2e\x31\x22\x3e\x3c' + '\x73\x70\x61\x6e\x20' + '\x63\x6c\x61\x73\x73' + '\x3d\x22\x6e\x22\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x3a\x24\x30\x2e' + '\x31\x2e\x30\x22\x3e' + '\x4b\x4e\x35\x39\x31' + '\x31\x3c\x2f\x73\x70' + '\x61\x6e\x3e\x3c\x73' + '\x70\x61\x6e\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x6e\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x30' + '\x3a\x24\x30\x2e\x31' + '\x2e\x31\x22\x3e\u6ce2' + '\u97f3\x37\x33\x37\x28' + '\u4e2d\x29\x3c\x2f\x73' + '\x70\x61\x6e\x3e\x3c' + '\x6e\x6f\x73\x63\x72' + '\x69\x70\x74\x20\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x30\x3a\x24\x30\x2e' + '\x31\x2e\x32\x22\x3e' + '\x3c\x2f\x6e\x6f\x73' + '\x63\x72\x69\x70\x74' + '\x3e\x3c\x2f\x64\x69' + '\x76\x3e\x3c\x2f\x64' + '\x69\x76\x3e\x3c\x6e' + '\x6f\x73\x63\x72\x69' + '\x70\x74\x20\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x31' + '\x22\x3e\x3c\x2f\x6e' + '\x6f\x73\x63\x72\x69' + '\x70\x74\x3e\x3c\x2f' + '\x64\x69\x76\x3e\x3c' + '\x64\x69\x76\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x63\x6f\x6c\x2d' + '\x74\x69\x6d\x65\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x31' + '\x22\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x73' + '\x65\x70\x2d\x6c\x66' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x31\x2e\x30\x22\x3e' + '\x3c\x68\x32\x20\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + ('\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x31\x2e' + '\x30\x2e\x30\x22\x3e' + '\x31\x33\x3a\x35\x30' + '\x3c\x2f\x68\x32\x3e' + '\x3c\x70\x20\x63\x6c' + '\x61\x73\x73\x3d\x22' + '\x61\x69\x72\x70\x6f' + '\x72\x74\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x30\x2e' + '\x30\x2e\x31\x2e\x30' + '\x2e\x31\x22\x3e\x3c' + '\x73\x70\x61\x6e\x20' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x31' + '\x2e\x30\x2e\x31\x2e' + '\x30\x22\x3e\u5927\u5174' + '\u56fd\u9645\u673a\u573a\x3c' + '\x2f\x73\x70\x61\x6e' + '\x3e\x3c\x73\x70\x61' + '\x6e\x20\x64\x61\x74' + '\x61\x2d\x72\x65\x61' + '\x63\x74\x69\x64\x3d' + '\x22\x2e\x31\x2e\x33' + '\x2e\x33\x2e\x32\x2e' + '\x30\x2e\x24\x4b\x4e' + '\x35\x39\x31\x31\x2e' + '\x30\x2e\x30\x2e\x30' + '\x2e\x31\x2e\x30\x2e' + '\x31\x2e\x31\x22\x3e' + '\x3c\x2f\x73\x70\x61' + '\x6e\x3e\x3c\x2f\x70' + '\x3e\x3c\x2f\x64\x69' + '\x76\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x73' + '\x65\x70\x2d\x63\x74' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x31\x2e\x31\x22\x3e' + '\x3c\x64\x69\x76\x20' + '\x63\x6c\x61\x73\x73' + '\x3d\x22\x72\x61\x6e' + '\x67\x65\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x30\x2e' + '\x30\x2e\x31\x2e\x31' + '\x2e\x30\x22\x3e\x33' + '\u5c0f\u65f6\x34\x30\u5206' + '\u949f\x3c\x2f\x64\x69' + '\x76\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x6c' + '\x69\x6e\x65\x22\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x2e\x31\x2e' + '\x31\x2e\x31\x22\x3e' + '\x3c\x2f\x64\x69\x76' + '\x3e\x3c\x2f\x64\x69' + '\x76\x3e\x3c\x64\x69' + '\x76\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x73' + '\x65\x70\x2d\x72\x74' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x31\x2e\x32\x22\x3e' + '\x3c\x6e\x6f\x73\x63' + '\x72\x69\x70\x74\x20' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x31' + '\x2e\x32\x2e\x30\x22' + '\x3e\x3c\x2f\x6e\x6f' + '\x73\x63\x72\x69\x70' + '\x74\x3e\x3c\x68\x32' + '\x20\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x31\x2e\x32\x2e\x31' + '\x22\x3e\x31\x37\x3a' + '\x33\x30\x3c\x2f\x68' + '\x32\x3e\x3c\x70\x20' + '\x63\x6c\x61\x73\x73' + '\x3d\x22\x61\x69\x72' + '\x70\x6f\x72\x74\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x30\x2e\x30\x2e\x31' + '\x2e\x32\x2e\x32\x22' + '\x3e\x3c\x73\x70\x61' + '\x6e\x20\x64\x61\x74' + '\x61\x2d\x72\x65\x61' + '\x63\x74\x69\x64\x3d' + '\x22\x2e\x31\x2e\x33' + '\x2e\x33\x2e\x32\x2e' + '\x30\x2e\x24\x4b\x4e' + '\x35\x39\x31\x31\x2e' + '\x30\x2e\x30\x2e\x30' + '\x2e\x31\x2e\x32\x2e' + '\x32\x2e\x30\x22\x3e' + '\u5b9d\u5b89\u673a\u573a\x3c' + '\x2f\x73\x70\x61\x6e' + '\x3e\x3c\x2f\x70\x3e' + '\x3c\x2f\x64\x69\x76' + '\x3e\x3c\x6e\x6f\x73' + '\x63\x72\x69\x70\x74' + '\x20\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x30\x2e\x30\x2e' + '\x31\x2e\x33\x22\x3e' + '\x3c\x2f\x6e\x6f\x73' + '\x63\x72\x69\x70\x74' + '\x3e\x3c\x2f\x64\x69' + '\x76\x3e\x3c\x2f\x64' + '\x69\x76\x3e\x3c\x2f' + '\x64\x69\x76\x3e\x3c' + '\x64\x69\x76\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x63\x6f\x6c\x2d' + '\x70\x72\x69\x63\x65' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x31\x22\x3e\x3c' + '\x70\x20\x63\x6c\x61' + '\x73\x73\x3d\x22\x70' + '\x72\x63\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x31\x2e' + '\x30\x22\x3e\x3c\x73' + '\x70\x61\x6e\x20\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31') + ('\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x31' + '\x2e\x30\x2e\x30\x22' + '\x3e\x3c\x69\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x72\x6d\x62\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x31\x2e\x30\x2e\x30' + '\x2e\x30\x22\x3e\x26' + '\x79\x65\x6e\x3b\x3c' + '\x2f\x69\x3e\x3c\x73' + '\x70\x61\x6e\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x66\x69\x78\x5f' + '\x70\x72\x69\x63\x65' + '\x22\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x30' + '\x2e\x31\x2e\x30\x2e' + '\x30\x2e\x31\x22\x3e' + '\x3c\x73\x70\x61\x6e' + '\x20\x63\x6c\x61\x73' + '\x73\x3d\x22\x70\x72' + '\x63\x5f\x77\x70\x22' + '\x73\x74\x79\x6c\x65' + '\x3d\x22\x77\x69\x64' + '\x74\x68\x3a\x34\x38' + '\x70\x78\x22\x3e\x70' + '\x72\x69\x63\x65\x5f' + '\x73\x6f\x6c\x65\x3c' + '\x2f\x73\x70\x61\x6e' + '\x3e\x3c\x2f\x73\x70' + '\x61\x6e\x3e\x3c\x2f' + '\x73\x70\x61\x6e\x3e' + '\x3c\x2f\x70\x3e\x3c' + '\x64\x69\x76\x20\x63' + '\x6c\x61\x73\x73\x3d' + '\x22\x76\x69\x6d\x22' + '\x64\x61\x74\x61\x2d' + '\x72\x65\x61\x63\x74' + '\x69\x64\x3d\x22\x2e' + '\x31\x2e\x33\x2e\x33' + '\x2e\x32\x2e\x30\x2e' + '\x24\x4b\x4e\x35\x39' + '\x31\x31\x2e\x30\x2e' + '\x31\x2e\x31\x22\x3e' + '\x3c\x73\x70\x61\x6e' + '\x20\x63\x6c\x61\x73' + '\x73\x3d\x22\x76\x20' + '\x64\x69\x73\x22\x64' + '\x61\x74\x61\x2d\x72' + '\x65\x61\x63\x74\x69' + '\x64\x3d\x22\x2e\x31' + '\x2e\x33\x2e\x33\x2e' + '\x32\x2e\x30\x2e\x24' + '\x4b\x4e\x35\x39\x31' + '\x31\x2e\x30\x2e\x31' + '\x2e\x31\x2e\x24\x30' + '\x22\x3e\x3c\x2f\x73' + '\x70\x61\x6e\x3e\x3c' + '\x2f\x64\x69\x76\x3e' + '\x3c\x2f\x64\x69\x76' + '\x3e\x3c\x64\x69\x76' + '\x20\x63\x6c\x61\x73' + '\x73\x3d\x22\x63\x6f' + '\x6c\x2d\x66\x6f\x6c' + '\x64\x22\x64\x61\x74' + '\x61\x2d\x72\x65\x61' + '\x63\x74\x69\x64\x3d' + '\x22\x2e\x31\x2e\x33' + '\x2e\x33\x2e\x32\x2e' + '\x30\x2e\x24\x4b\x4e' + '\x35\x39\x31\x31\x2e' + '\x30\x2e\x32\x22\x3e' + '\x3c\x70\x20\x63\x6c' + '\x61\x73\x73\x3d\x22' + '\x66\x64\x22\x64\x61' + '\x74\x61\x2d\x72\x65' + '\x61\x63\x74\x69\x64' + '\x3d\x22\x2e\x31\x2e' + '\x33\x2e\x33\x2e\x32' + '\x2e\x30\x2e\x24\x4b' + '\x4e\x35\x39\x31\x31' + '\x2e\x30\x2e\x32\x2e' + '\x30\x22\x3e\u6536\u8d77' + '\x3c\x2f\x70\x3e\x3c' + '\x2f\x64\x69\x76\x3e' + '\x3c\x2f\x64\x69\x76' + '\x3e\x3c\x6e\x6f\x73' + '\x63\x72\x69\x70\x74' + '\x20\x64\x61\x74\x61' + '\x2d\x72\x65\x61\x63' + '\x74\x69\x64\x3d\x22' + '\x2e\x31\x2e\x33\x2e' + '\x33\x2e\x32\x2e\x30' + '\x2e\x24\x4b\x4e\x35' + '\x39\x31\x31\x2e\x31' + '\x22\x3e\x3c\x2f\x6e' + '\x6f\x73\x63\x72\x69' + '\x70\x74\x3e\x3c\x2f' + '\x64\x69\x76\x3e')
, _0x548377 = ['\u4e2d\u56fd\u5357\u65b9\u822a' + '\u7a7a', '\u5409\u7965\u822a\u7a7a', '\u5965\u51ef\u822a\u7a7a', '\u4e5d\u5143\u822a\u7a7a', '\u957f\u9f99\u822a\u7a7a', '\u4e1c\u65b9\u822a\u7a7a', '\u4e2d\u56fd\u56fd\u9645\u822a' + '\u7a7a', '\u6df1\u5733\u822a\u7a7a', '\u6d77\u5357\u822a\u7a7a', '\u6625\u79cb\u822a\u7a7a', '\u4e0a\u6d77\u822a\u7a7a', '\u897f\u90e8\u822a\u7a7a', '\u91cd\u5e86\u822a\u7a7a', '\u897f\u85cf\u822a\u7a7a', '\u4e2d\u56fd\u8054\u5408\u822a' + '\u7a7a', '\u4e91\u5357\u7965\u9e4f\u822a' + '\u7a7a', '\u4e91\u5357\u82f1\u5b89\u822a' + '\u7a7a', '\u53a6\u95e8\u822a\u7a7a', '\u5929\u6d25\u822a\u7a7a', '\u5c71\u4e1c\u822a\u7a7a', '\u56db\u5ddd\u822a\u7a7a', '\u534e\u590f\u822a\u7a7a', '\u957f\u57ce\u822a\u7a7a', '\u6210\u90fd\u822a\u7a7a\u6709', '\u5317\u4eac\u9996\u90fd\u822a' + '\u7a7a', '\u4e2d\u534e\u822a\u7a7a', '\u610f\u5927\u5229\u56fd\u5bb6' + '\u822a\u7a7a\u516c\u53f8', '\u5370\u5ea6\u767e\u6377\u822a' + '\u7a7a', '\u8d8a\u5357\u822a\u7a7a', '\u8fdc\u4e1c\u822a\u7a7a', '\u5370\u5ea6\u822a\u7a7a\u516c' + '\u53f8', '\u5370\u5ea6\u6377\u7279\u822a' + '\u7a7a\u6709\u9650\u516c\u53f8', '\u4ee5\u8272\u5217\u822a\u7a7a' + '\u516c\u53f8', '\u610f\u5927\u5229\u822a\u7a7a', '\u4f0a\u6717\u822a\u7a7a\u516c' + '\u53f8', '\u5370\u5ea6\u5c3c\u897f\u4e9a' + '\u9e70\u822a\u7a7a\u516c\u53f8', '\u82f1\u56fd\u822a\u7a7a\u516c' + '\u53f8', '\u897f\u65b9\u5929\u7a7a\u822a' + '\u7a7a', '\u897f\u6377\u822a\u7a7a', '\u897f\u73ed\u7259\u6b27\u6d32' + '\u822a\u7a7a\u516c\u53f8', '\u897f\u73ed\u7259\u822a\u7a7a' + '\u516c\u53f8', '\u4e2d\u56fd\u5357\u65b9\u822a' + '\u7a7a', '\u5409\u7965\u822a\u7a7a', '\u5965\u51ef\u822a\u7a7a', '\u4e5d\u5143\u822a\u7a7a', '\u957f\u9f99\u822a\u7a7a', '\u4e1c\u65b9\u822a\u7a7a', '\u4e2d\u56fd\u56fd\u9645\u822a' + '\u7a7a', '\u6df1\u5733\u822a\u7a7a', '\u6d77\u5357\u822a\u7a7a', '\u6625\u79cb\u822a\u7a7a', '\u4e0a\u6d77\u822a\u7a7a', '\u897f\u90e8\u822a\u7a7a', '\u91cd\u5e86\u822a\u7a7a', '\u897f\u85cf\u822a\u7a7a', '\u4e2d\u56fd\u8054\u5408\u822a' + '\u7a7a', '\u4e91\u5357\u7965\u9e4f\u822a' + '\u7a7a', '\u4e91\u5357\u82f1\u5b89\u822a' + '\u7a7a', '\u53a6\u95e8\u822a\u7a7a', '\u5929\u6d25\u822a\u7a7a', '\u5c71\u4e1c\u822a\u7a7a', '\u56db\u5ddd\u822a\u7a7a', '\u534e\u590f\u822a\u7a7a', '\u957f\u57ce\u822a\u7a7a', '\u6210\u90fd\u822a\u7a7a\u6709', '\u5317\u4eac\u9996\u90fd\u822a' + '\u7a7a', '\u4e2d\u534e\u822a\u7a7a', '\u610f\u5927\u5229\u56fd\u5bb6' + '\u822a\u7a7a\u516c\u53f8', '\u5370\u5ea6\u767e\u6377\u822a' + '\u7a7a', '\u8d8a\u5357\u822a\u7a7a', '\u8fdc\u4e1c\u822a\u7a7a', '\u5370\u5ea6\u822a\u7a7a\u516c' + '\u53f8', '\u5370\u5ea6\u6377\u7279\u822a' + '\u7a7a\u6709\u9650\u516c\u53f8', '\u4ee5\u8272\u5217\u822a\u7a7a' + '\u516c\u53f8', '\u610f\u5927\u5229\u822a\u7a7a', '\u4f0a\u6717\u822a\u7a7a\u516c' + '\u53f8', '\u5370\u5ea6\u5c3c\u897f\u4e9a' + '\u9e70\u822a\u7a7a\u516c\u53f8', '\u82f1\u56fd\u822a\u7a7a\u516c' + '\u53f8', '\u897f\u65b9\u5929\u7a7a\u822a' + '\u7a7a', '\u897f\u6377\u822a\u7a7a', '\u897f\u73ed\u7259\u6b27\u6d32' + '\u822a\u7a7a\u516c\u53f8', '\u897f\u73ed\u7259\u822a\u7a7a' + '\u516c\u53f8']
, _0x5286d2 = 22 * 251 + -1721 + -3800
, _0xa24ff9 = ['\u5317\u4eac\u9996\u90fd\u56fd' + '\u9645\u673a\u573a', '\u4e0a\u6d77\u8679\u6865\u56fd' + '\u9645\u673a\u573a', '\u4e0a\u6d77\u6d66\u4e1c\u56fd' + '\u9645\u673a\u573a', '\u5929\u6d25\u6ee8\u6d77\u56fd' + '\u9645\u673a\u573a', '\u592a\u539f\u6b66\u5bbf\u673a' + '\u573a', '\u547c\u548c\u6d69\u7279\u767d' + '\u5854\u673a\u573a', '\u6c88\u9633\u6843\u4ed9\u56fd' + '\u9645\u673a\u573a', '\u5927\u8fde\u5468\u6c34\u5b50' + '\u56fd\u9645\u673a\u573a', '\u957f\u6625\u5927\u623f\u8eab' + '\u673a\u573a', '\u54c8\u5c14\u6ee8\u960e\u5bb6' + '\u5c97\u56fd\u9645\u673a\u573a', '\u9f50\u9f50\u54c8\u5c14\u4e09' + '\u5bb6\u5b50\u673a\u573a', '\u4f73\u6728\u65af\u4e1c\u90ca' + '\u673a\u573a', '\u53a6\u95e8\u9ad8\u5d0e\u56fd' + '\u9645\u673a\u573a', '\u798f\u5dde\u957f\u4e50\u56fd' + '\u9645\u673a\u573a', '\u676d\u5dde\u8427\u5c71\u56fd' + '\u9645\u673a\u573a', '\u5408\u80a5\u9a86\u5c97\u673a' + '\u573a', '\u5b81\u6ce2\u680e\u793e\u673a' + '\u573a', '\u5357\u4eac\u7984\u53e3\u56fd' + '\u9645\u673a\u573a', '\u5e7f\u5dde\u767d\u4e91\u56fd' + '\u9645\u673a\u573a', '\u6df1\u5733\u5b9d\u5b89\u56fd' + '\u9645\u673a\u573a', '\u957f\u6c99\u9ec4\u82b1\u673a' + '\u573a', '\u6d77\u53e3\u7f8e\u4e9a\u673a' + '\u573a', '\u6b66\u6c49\u5929\u6cb3\u673a' + '\u573a', '\u6d4e\u5357\u9065\u5899\u673a' + '\u573a', '\u9752\u5c9b\u6d41\u4ead\u673a' + '\u573a', '\u5357\u5b81\u5434\u589f\u673a' + '\u573a', '\u4e09\u4e9a\u51e4\u51f0\u56fd' + '\u9645\u673a\u573a', '\u91cd\u5e86\u6c5f\u5317\u56fd' + '\u9645\u673a\u573a', '\u6210\u90fd\u53cc\u6d41\u56fd' + '\u9645\u673a\u573a', '\u6606\u660e\u5deb\u5bb6\u575d' + '\u56fd\u9645\u673a\u573a', '\u6606\u660e\u957f\u6c34\u56fd' + '\u9645\u673a\u573a', '\u6842\u6797\u4e24\u6c5f\u56fd' + '\u9645\u673a\u573a', '\u897f\u5b89\u54b8\u9633\u56fd' + '\u9645\u673a\u573a', '\u5170\u5dde\u4e2d\u5ddd\u673a' + '\u573a', '\u8d35\u9633\u9f99\u6d1e\u5821' + '\u673a\u573a', '\u62c9\u8428\u8d21\u560e\u673a' + '\u573a', '\u4e4c\u9c81\u6728\u9f50\u5730' + '\u7a9d\u5821\u673a\u573a', '\u5357\u660c\u5411\u5858\u673a' + '\u573a', '\u90d1\u5dde\u65b0\u90d1\u673a' + '\u573a', '\u5317\u4eac\u9996\u90fd\u56fd' + '\u9645\u673a\u573a', '\u4e0a\u6d77\u8679\u6865\u56fd' + '\u9645\u673a\u573a', '\u4e0a\u6d77\u6d66\u4e1c\u56fd' + '\u9645\u673a\u573a', '\u5929\u6d25\u6ee8\u6d77\u56fd' + '\u9645\u673a\u573a', '\u592a\u539f\u6b66\u5bbf\u673a' + '\u573a', '\u547c\u548c\u6d69\u7279\u767d' + '\u5854\u673a\u573a', '\u6c88\u9633\u6843\u4ed9\u56fd' + '\u9645\u673a\u573a', '\u5927\u8fde\u5468\u6c34\u5b50' + '\u56fd\u9645\u673a\u573a', '\u957f\u6625\u5927\u623f\u8eab' + '\u673a\u573a', '\u54c8\u5c14\u6ee8\u960e\u5bb6' + '\u5c97\u56fd\u9645\u673a\u573a', '\u9f50\u9f50\u54c8\u5c14\u4e09' + '\u5bb6\u5b50\u673a\u573a', '\u4f73\u6728\u65af\u4e1c\u90ca' + '\u673a\u573a', '\u53a6\u95e8\u9ad8\u5d0e\u56fd' + '\u9645\u673a\u573a', '\u798f\u5dde\u957f\u4e50\u56fd' + '\u9645\u673a\u573a', '\u676d\u5dde\u8427\u5c71\u56fd' + '\u9645\u673a\u573a', '\u5408\u80a5\u9a86\u5c97\u673a' + '\u573a', '\u5b81\u6ce2\u680e\u793e\u673a' + '\u573a', '\u5357\u4eac\u7984\u53e3\u56fd' + '\u9645\u673a\u573a', '\u5e7f\u5dde\u767d\u4e91\u56fd' + '\u9645\u673a\u573a', '\u6df1\u5733\u5b9d\u5b89\u56fd' + '\u9645\u673a\u573a', '\u957f\u6c99\u9ec4\u82b1\u673a' + '\u573a', '\u6d77\u53e3\u7f8e\u4e9a\u673a' + '\u573a', '\u6b66\u6c49\u5929\u6cb3\u673a' + '\u573a', '\u6d4e\u5357\u9065\u5899\u673a' + '\u573a', '\u9752\u5c9b\u6d41\u4ead\u673a' + '\u573a', '\u5357\u5b81\u5434\u589f\u673a' + '\u573a', '\u4e09\u4e9a\u51e4\u51f0\u56fd' + '\u9645\u673a\u573a', '\u91cd\u5e86\u6c5f\u5317\u56fd' + '\u9645\u673a\u573a', '\u6210\u90fd\u53cc\u6d41\u56fd' + '\u9645\u673a\u573a', '\u6606\u660e\u5deb\u5bb6\u575d' + '\u56fd\u9645\u673a\u573a', '\u6606\u660e\u957f\u6c34\u56fd' + '\u9645\u673a\u573a', '\u6842\u6797\u4e24\u6c5f\u56fd' + '\u9645\u673a\u573a', '\u897f\u5b89\u54b8\u9633\u56fd' + '\u9645\u673a\u573a', '\u5170\u5dde\u4e2d\u5ddd\u673a' + '\u573a', '\u8d35\u9633\u9f99\u6d1e\u5821' + '\u673a\u573a', '\u62c9\u8428\u8d21\u560e\u673a' + '\u573a', '\u4e4c\u9c81\u6728\u9f50\u5730' + '\u7a9d\u5821\u673a\u573a', '\u5357\u660c\u5411\u5858\u673a' + '\u573a', '\u90d1\u5dde\u65b0\u90d1\u673a' + '\u573a'];
if (window['\x70\x61\x67\x65']) {} else
window['\x70\x61\x67\x65'] = 2333 * 3 + 458 * -5 + -4708;
$['\x65\x61\x63\x68'](_0x131e59, function(_0x282f1d, _0x4e0853) {
_0x354583 += _0x1b89ba['\x72\x65\x70\x6c\x61' + '\x63\x65']('\x70\x72\x69\x63\x65' + '\x5f\x73\x6f\x6c\x65', _0x4e0853['\x76\x61\x6c\x75\x65'])['\x72\x65\x70\x6c\x61' + '\x63\x65']('\u4e2d\u56fd\u8054\u5408\u822a' + '\u7a7a', _0x548377[_0x5286d2 * window['\x70\x61\x67\x65']])['\x72\x65\x70\x6c\x61' + '\x63\x65']('\u5927\u5174\u56fd\u9645', _0xa24ff9[parseInt(_0x5286d2 * window['\x70\x61\x67\x65'] / (659 + 785 * -7 + 4838)) + (5666 * 1 + 2 * -4161 + 2657)])['\x72\x65\x70\x6c\x61' + '\x63\x65']('\u5b9d\u5b89\u673a\u573a', _0xa24ff9[_0xa24ff9['\x6c\x65\x6e\x67\x74' + '\x68'] - parseInt(_0x5286d2 * window['\x70\x61\x67\x65'] / (8357 + -323 * 1 + -8032)) - (350 + -9 * 295 + 2306)]),
_0x5286d2 += -156 * -53 + -78 * -111 + -16925;
}),
$('\x2e\x6d\x2d\x61\x69' + '\x72\x66\x6c\x79\x2d' + '\x6c\x73\x74')['\x74\x65\x78\x74']('')['\x61\x70\x70\x65\x6e' + '\x64'](_0x354583);
},
'\x63\x6f\x6d\x70\x6c\x65\x74\x65': function() {},
'\x65\x72\x72\x6f\x72': function() {
alert('\u6570\u636e\u62c9\u53d6\u5931' + '\u8d25\u3002\u53ef\u80fd\u662f' + '\u89e6\u53d1\u4e86\u98ce\u63a7' + '\u7cfb\u7edf\uff0c\u82e5\u60a8' + '\u662f\u6b63\u5e38\u8bbf\u95ee' + '\uff0c\u8bf7\u4f7f\u7528\u8c37' + '\u6b4c\u6d4f\u89c8\u5668\u65e0' + '\u75d5\u6a21\u5f0f\uff0c\u5e76' + '\u4e14\u6821\u51c6\u7535\u8111' + '\u7684\u7cfb\u7edf\u65f6\u95f4' + '\u91cd\u65b0\u5c1d\u8bd5'),
alert('\u751f\u800c\u4e3a\u866b\uff0c' + '\u6211\u5f88\u62b1\u6b49\uff0c' + '\u8bf7\u5237\u65b0\u9875\u9762' + '\uff0c\u67e5\u770b\u95ee\u9898' + '\u662f\u5426\u5b58\u5728'),
$('\x2e\x70\x61\x67\x65' + '\x2d\x6d\x65\x73\x73' + '\x61\x67\x65')['\x65\x71'](17 * -94 + 1014 + -4 * -146)['\x61\x64\x64\x43\x6c' + '\x61\x73\x73']('\x61\x63\x74\x69\x76' + '\x65'),
$('\x2e\x70\x61\x67\x65' + '\x2d\x6d\x65\x73\x73' + '\x61\x67\x65')['\x72\x65\x6d\x6f\x76' + '\x65\x43\x6c\x61\x73' + '\x73']('\x61\x63\x74\x69\x76' + '\x65');
}
});
}
,
request();
`;
const transform_literal = {
StringLiteral({node})
{
if (node.extra && /\\[ux]/gi.test(node.extra.raw)) {
node.extra = undefined;
}
},
}
let _ast = parser.parse(jscode);
traverse(_ast, transform_literal);
let code = generator(_ast).code;
console.log(code);
还原结果如下:
window['url'] = '/api/' + 'match' + '/1', request = function () {
var _0x2268f9 = Date['parse'](new Date()) + (16798545 + -72936737 + 156138192),
_0x57feae = oo0O0(_0x2268f9['toStr' + 'ing']()) + window['f'];
const _0x5d83a3 = {};
_0x5d83a3['page'] = window['page'], _0x5d83a3['m'] = _0x57feae + '丨' + _0x2268f9 / (-1 * 3483 + -9059 + 13542);
var _0xb89747 = _0x5d83a3;
$['ajax']({
'url': window['url'],
'dataType': 'json',
'async': ![],
'data': _0xb89747,
'type': 'GET',
'beforeSend': function (_0x4c488e) {},
'success': function (_0x131e59) {
_0x131e59 = _0x131e59['data'];
let _0x354583 = '',
_0x1b89ba = '<div ' + 'class' + '="b-a' + 'irfly' + '"><di' + 'v cla' + 'ss="e' + '-airf' + 'ly"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0"><' + 'div c' + 'lass=' + '"col-' + 'trip"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0"><d' + 'iv cl' + 'ass="' + 's-tri' + 'p"dat' + 'a-rea' + 'ctid=' + '".1.3' + '.3.2.' + '0.$KN' + '5911.' + '0.0.0' + '"><di' + 'v cla' + 'ss="c' + 'ol-ai' + 'rline' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '0"><d' + 'iv cl' + 'ass="' + 'd-air' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '0.0:$' + '0"><d' + 'iv cl' + 'ass="' + 'air"d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.0' + '.0.0.' + '0:$0.' + '0"><s' + 'pan d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.0' + '.0.0.' + '0:$0.' + '0.1">' + '中国联合航' + '空</sp' + 'an></' + 'div><' + 'div c' + 'lass=' + '"num"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0.0.0' + '.0:$0' + '.1"><' + 'span ' + 'class' + '="n"d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.0' + '.0.0.' + '0:$0.' + '1.0">' + 'KN591' + '1</sp' + 'an><s' + 'pan c' + 'lass=' + '"n"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.0.' + '0.0.0' + ':$0.1' + '.1">波' + '音737(' + '中)</s' + 'pan><' + 'noscr' + 'ipt d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.0' + '.0.0.' + '0:$0.' + '1.2">' + '</nos' + 'cript' + '></di' + 'v></d' + 'iv><n' + 'oscri' + 'pt da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.0.' + '0.0.1' + '"></n' + 'oscri' + 'pt></' + 'div><' + 'div c' + 'lass=' + '"col-' + 'time"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0.0.1' + '"><di' + 'v cla' + 'ss="s' + 'ep-lf' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '1.0">' + '<h2 d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + ('2.0.$' + 'KN591' + '1.0.0' + '.0.1.' + '0.0">' + '13:50' + '</h2>' + '<p cl' + 'ass="' + 'airpo' + 'rt"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.0.' + '0.1.0' + '.1"><' + 'span ' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0.0.1' + '.0.1.' + '0">大兴' + '国际机场<' + '/span' + '><spa' + 'n dat' + 'a-rea' + 'ctid=' + '".1.3' + '.3.2.' + '0.$KN' + '5911.' + '0.0.0' + '.1.0.' + '1.1">' + '</spa' + 'n></p' + '></di' + 'v><di' + 'v cla' + 'ss="s' + 'ep-ct' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '1.1">' + '<div ' + 'class' + '="ran' + 'ge"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.0.' + '0.1.1' + '.0">3' + '小时40分' + '钟</di' + 'v><di' + 'v cla' + 'ss="l' + 'ine"d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.0' + '.0.1.' + '1.1">' + '</div' + '></di' + 'v><di' + 'v cla' + 'ss="s' + 'ep-rt' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '1.2">' + '<nosc' + 'ript ' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0.0.1' + '.2.0"' + '></no' + 'scrip' + 't><h2' + ' data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '1.2.1' + '">17:' + '30</h' + '2><p ' + 'class' + '="air' + 'port"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '0.0.1' + '.2.2"' + '><spa' + 'n dat' + 'a-rea' + 'ctid=' + '".1.3' + '.3.2.' + '0.$KN' + '5911.' + '0.0.0' + '.1.2.' + '2.0">' + '宝安机场<' + '/span' + '></p>' + '</div' + '><nos' + 'cript' + ' data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.0.0.' + '1.3">' + '</nos' + 'cript' + '></di' + 'v></d' + 'iv></' + 'div><' + 'div c' + 'lass=' + '"col-' + 'price' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.1"><' + 'p cla' + 'ss="p' + 'rc"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.1.' + '0"><s' + 'pan d' + 'ata-r' + 'eacti' + 'd=".1') + ('.3.3.' + '2.0.$' + 'KN591' + '1.0.1' + '.0.0"' + '><i c' + 'lass=' + '"rmb"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '1.0.0' + '.0">&' + 'yen;<' + '/i><s' + 'pan c' + 'lass=' + '"fix_' + 'price' + '"data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.0' + '.1.0.' + '0.1">' + '<span' + ' clas' + 's="pr' + 'c_wp"' + 'style' + '="wid' + 'th:48' + 'px">p' + 'rice_' + 'sole<' + '/span' + '></sp' + 'an></' + 'span>' + '</p><' + 'div c' + 'lass=' + '"vim"' + 'data-' + 'react' + 'id=".' + '1.3.3' + '.2.0.' + '$KN59' + '11.0.' + '1.1">' + '<span' + ' clas' + 's="v ' + 'dis"d' + 'ata-r' + 'eacti' + 'd=".1' + '.3.3.' + '2.0.$' + 'KN591' + '1.0.1' + '.1.$0' + '"></s' + 'pan><' + '/div>' + '</div' + '><div' + ' clas' + 's="co' + 'l-fol' + 'd"dat' + 'a-rea' + 'ctid=' + '".1.3' + '.3.2.' + '0.$KN' + '5911.' + '0.2">' + '<p cl' + 'ass="' + 'fd"da' + 'ta-re' + 'actid' + '=".1.' + '3.3.2' + '.0.$K' + 'N5911' + '.0.2.' + '0">收起' + '</p><' + '/div>' + '</div' + '><nos' + 'cript' + ' data' + '-reac' + 'tid="' + '.1.3.' + '3.2.0' + '.$KN5' + '911.1' + '"></n' + 'oscri' + 'pt></' + 'div>'),
_0x548377 = ['中国南方航' + '空', '吉祥航空', '奥凯航空', '九元航空', '长龙航空', '东方航空', '中国国际航' + '空', '深圳航空', '海南航空', '春秋航空', '上海航空', '西部航空', '重庆航空', '西藏航空', '中国联合航' + '空', '云南祥鹏航' + '空', '云南英安航' + '空', '厦门航空', '天津航空', '山东航空', '四川航空', '华夏航空', '长城航空', '成都航空有', '北京首都航' + '空', '中华航空', '意大利国家' + '航空公司', '印度百捷航' + '空', '越南航空', '远东航空', '印度航空公' + '司', '印度捷特航' + '空有限公司', '以色列航空' + '公司', '意大利航空', '伊朗航空公' + '司', '印度尼西亚' + '鹰航空公司', '英国航空公' + '司', '西方天空航' + '空', '西捷航空', '西班牙欧洲' + '航空公司', '西班牙航空' + '公司', '中国南方航' + '空', '吉祥航空', '奥凯航空', '九元航空', '长龙航空', '东方航空', '中国国际航' + '空', '深圳航空', '海南航空', '春秋航空', '上海航空', '西部航空', '重庆航空', '西藏航空', '中国联合航' + '空', '云南祥鹏航' + '空', '云南英安航' + '空', '厦门航空', '天津航空', '山东航空', '四川航空', '华夏航空', '长城航空', '成都航空有', '北京首都航' + '空', '中华航空', '意大利国家' + '航空公司', '印度百捷航' + '空', '越南航空', '远东航空', '印度航空公' + '司', '印度捷特航' + '空有限公司', '以色列航空' + '公司', '意大利航空', '伊朗航空公' + '司', '印度尼西亚' + '鹰航空公司', '英国航空公' + '司', '西方天空航' + '空', '西捷航空', '西班牙欧洲' + '航空公司', '西班牙航空' + '公司'],
_0x5286d2 = 22 * 251 + -1721 + -3800,
_0xa24ff9 = ['北京首都国' + '际机场', '上海虹桥国' + '际机场', '上海浦东国' + '际机场', '天津滨海国' + '际机场', '太原武宿机' + '场', '呼和浩特白' + '塔机场', '沈阳桃仙国' + '际机场', '大连周水子' + '国际机场', '长春大房身' + '机场', '哈尔滨阎家' + '岗国际机场', '齐齐哈尔三' + '家子机场', '佳木斯东郊' + '机场', '厦门高崎国' + '际机场', '福州长乐国' + '际机场', '杭州萧山国' + '际机场', '合肥骆岗机' + '场', '宁波栎社机' + '场', '南京禄口国' + '际机场', '广州白云国' + '际机场', '深圳宝安国' + '际机场', '长沙黄花机' + '场', '海口美亚机' + '场', '武汉天河机' + '场', '济南遥墙机' + '场', '青岛流亭机' + '场', '南宁吴墟机' + '场', '三亚凤凰国' + '际机场', '重庆江北国' + '际机场', '成都双流国' + '际机场', '昆明巫家坝' + '国际机场', '昆明长水国' + '际机场', '桂林两江国' + '际机场', '西安咸阳国' + '际机场', '兰州中川机' + '场', '贵阳龙洞堡' + '机场', '拉萨贡嘎机' + '场', '乌鲁木齐地' + '窝堡机场', '南昌向塘机' + '场', '郑州新郑机' + '场', '北京首都国' + '际机场', '上海虹桥国' + '际机场', '上海浦东国' + '际机场', '天津滨海国' + '际机场', '太原武宿机' + '场', '呼和浩特白' + '塔机场', '沈阳桃仙国' + '际机场', '大连周水子' + '国际机场', '长春大房身' + '机场', '哈尔滨阎家' + '岗国际机场', '齐齐哈尔三' + '家子机场', '佳木斯东郊' + '机场', '厦门高崎国' + '际机场', '福州长乐国' + '际机场', '杭州萧山国' + '际机场', '合肥骆岗机' + '场', '宁波栎社机' + '场', '南京禄口国' + '际机场', '广州白云国' + '际机场', '深圳宝安国' + '际机场', '长沙黄花机' + '场', '海口美亚机' + '场', '武汉天河机' + '场', '济南遥墙机' + '场', '青岛流亭机' + '场', '南宁吴墟机' + '场', '三亚凤凰国' + '际机场', '重庆江北国' + '际机场', '成都双流国' + '际机场', '昆明巫家坝' + '国际机场', '昆明长水国' + '际机场', '桂林两江国' + '际机场', '西安咸阳国' + '际机场', '兰州中川机' + '场', '贵阳龙洞堡' + '机场', '拉萨贡嘎机' + '场', '乌鲁木齐地' + '窝堡机场', '南昌向塘机' + '场', '郑州新郑机' + '场'];
if (window['page']) {} else window['page'] = 2333 * 3 + 458 * -5 + -4708;
$['each'](_0x131e59, function (_0x282f1d, _0x4e0853) {
_0x354583 += _0x1b89ba['repla' + 'ce']('price' + '_sole', _0x4e0853['value'])['repla' + 'ce']('中国联合航' + '空', _0x548377[_0x5286d2 * window['page']])['repla' + 'ce']('大兴国际', _0xa24ff9[parseInt(_0x5286d2 * window['page'] / (659 + 785 * -7 + 4838)) + (5666 * 1 + 2 * -4161 + 2657)])['repla' + 'ce']('宝安机场', _0xa24ff9[_0xa24ff9['lengt' + 'h'] - parseInt(_0x5286d2 * window['page'] / (8357 + -323 * 1 + -8032)) - (350 + -9 * 295 + 2306)]), _0x5286d2 += -156 * -53 + -78 * -111 + -16925;
}), $('.m-ai' + 'rfly-' + 'lst')['text']('')['appen' + 'd'](_0x354583);
},
'complete': function () {},
'error': function () {
alert('数据拉取失' + '败。可能是' + '触发了风控' + '系统,若您' + '是正常访问' + ',请使用谷' + '歌浏览器无' + '痕模式,并' + '且校准电脑' + '的系统时间' + '重新尝试'), alert('生而为虫,' + '我很抱歉,' + '请刷新页面' + ',查看问题' + '是否存在'), $('.page' + '-mess' + 'age')['eq'](17 * -94 + 1014 + -4 * -146)['addCl' + 'ass']('activ' + 'e'), $('.page' + '-mess' + 'age')['remov' + 'eClas' + 's']('activ' + 'e');
}
});
}, request();
有点javascript
基础的应该基本都能看懂这段 js
代码,加密逻辑如下:
var _0x2268f9 = Date['parse'](new Date()) + (16798545 + -72936737 + 156138192),
_0x57feae = oo0O0(_0x2268f9['toStr' + 'ing']()) + window['f'];
我们在浏览器新建个无痕模式,把上述代码拷贝过来然后执行一下
控制台输入函数名并且点击跟进去
我们直接把函数拷贝至新建的代码段中执行,然后控制台输出加密逻辑的几个变量,如下
控制台执行下加密方法
result = eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27'));
OUTPUT: 'a0e14e4c34abf348b92ccd957e48fbcc'
atob()
方法用于解码使用 base-64
编码的字符串,我们对window['b']
解码后如下
var hexcase = 0;
var b64pad = "";
var chrsz = 16;
function hex_md5(a) {
return binl2hex(core_md5(str2binl(a), a.length * chrsz))
}
function b64_md5(a) {
return binl2b64(core_md5(str2binl(a), a.length * chrsz))
}
function str_md5(a) {
return binl2str(core_md5(str2binl(a), a.length * chrsz))
}
function hex_hmac_md5(a, b) {
return binl2hex(core_hmac_md5(a, b))
}
function b64_hmac_md5(a, b) {
return binl2b64(core_hmac_md5(a, b))
}
function str_hmac_md5(a, b) {
return binl2str(core_hmac_md5(a, b))
}
function md5_vm_test() {
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"
}
function core_md5(p, k) {
p[k >> 5] |= 128 << ((k) % 32);
p[(((k + 64) >>> 9) << 4) + 14] = k;
var o = 1732584193;
var n = -271733879;
var m = -1732584194;
var l = 271733878;
for (var g = 0; g < p.length; g += 16) {
var j = o;
var h = n;
var f = m;
var e = l;
o = md5_ff(o, n, m, l, p[g + 0], 7, -680976936);
l = md5_ff(l, o, n, m, p[g + 1], 12, -389564586);
m = md5_ff(m, l, o, n, p[g + 2], 17, 606105819);
n = md5_ff(n, m, l, o, p[g + 3], 22, -1044525330);
o = md5_ff(o, n, m, l, p[g + 4], 7, -176418897);
l = md5_ff(l, o, n, m, p[g + 5], 12, 1200080426);
m = md5_ff(m, l, o, n, p[g + 6], 17, -1473231341);
n = md5_ff(n, m, l, o, p[g + 7], 22, -45705983);
o = md5_ff(o, n, m, l, p[g + 8], 7, 1770035416);
l = md5_ff(l, o, n, m, p[g + 9], 12, -1958414417);
m = md5_ff(m, l, o, n, p[g + 10], 17, -42063);
n = md5_ff(n, m, l, o, p[g + 11], 22, -1990404162);
o = md5_ff(o, n, m, l, p[g + 12], 7, 1804660682);
l = md5_ff(l, o, n, m, p[g + 13], 12, -40341101);
m = md5_ff(m, l, o, n, p[g + 14], 17, -1502002290);
n = md5_ff(n, m, l, o, p[g + 15], 22, 1236535329);
o = md5_gg(o, n, m, l, p[g + 1], 5, -165796510);
l = md5_gg(l, o, n, m, p[g + 6], 9, -1069501632);
m = md5_gg(m, l, o, n, p[g + 11], 14, 643717713);
n = md5_gg(n, m, l, o, p[g + 0], 20, -373897302);
o = md5_gg(o, n, m, l, p[g + 5], 5, -701558691);
l = md5_gg(l, o, n, m, p[g + 10], 9, 38016083);
m = md5_gg(m, l, o, n, p[g + 15], 14, -660478335);
n = md5_gg(n, m, l, o, p[g + 4], 20, -405537848);
o = md5_gg(o, n, m, l, p[g + 9], 5, 568446438);
l = md5_gg(l, o, n, m, p[g + 14], 9, -1019803690);
m = md5_gg(m, l, o, n, p[g + 3], 14, -187363961);
n = md5_gg(n, m, l, o, p[g + 8], 20, 1163531501);
o = md5_gg(o, n, m, l, p[g + 13], 5, -1444681467);
l = md5_gg(l, o, n, m, p[g + 2], 9, -51403784);
m = md5_gg(m, l, o, n, p[g + 7], 14, 1735328473);
n = md5_gg(n, m, l, o, p[g + 12], 20, -1921207734);
o = md5_hh(o, n, m, l, p[g + 5], 4, -378558);
l = md5_hh(l, o, n, m, p[g + 8], 11, -2022574463);
m = md5_hh(m, l, o, n, p[g + 11], 16, 1839030562);
n = md5_hh(n, m, l, o, p[g + 14], 23, -35309556);
o = md5_hh(o, n, m, l, p[g + 1], 4, -1530992060);
l = md5_hh(l, o, n, m, p[g + 4], 11, 1272893353);
m = md5_hh(m, l, o, n, p[g + 7], 16, -155497632);
n = md5_hh(n, m, l, o, p[g + 10], 23, -1094730640);
o = md5_hh(o, n, m, l, p[g + 13], 4, 681279174);
l = md5_hh(l, o, n, m, p[g + 0], 11, -358537222);
m = md5_hh(m, l, o, n, p[g + 3], 16, -722881979);
n = md5_hh(n, m, l, o, p[g + 6], 23, 76029189);
o = md5_hh(o, n, m, l, p[g + 9], 4, -640364487);
l = md5_hh(l, o, n, m, p[g + 12], 11, -421815835);
m = md5_hh(m, l, o, n, p[g + 15], 16, 530742520);
n = md5_hh(n, m, l, o, p[g + 2], 23, -995338651);
o = md5_ii(o, n, m, l, p[g + 0], 6, -198630844);
l = md5_ii(l, o, n, m, p[g + 7], 10, 11261161415);
m = md5_ii(m, l, o, n, p[g + 14], 15, -1416354905);
n = md5_ii(n, m, l, o, p[g + 5], 21, -57434055);
o = md5_ii(o, n, m, l, p[g + 12], 6, 1700485571);
l = md5_ii(l, o, n, m, p[g + 3], 10, -1894446606);
m = md5_ii(m, l, o, n, p[g + 10], 15, -1051523);
n = md5_ii(n, m, l, o, p[g + 1], 21, -2054922799);
o = md5_ii(o, n, m, l, p[g + 8], 6, 1873313359);
l = md5_ii(l, o, n, m, p[g + 15], 10, -30611744);
m = md5_ii(m, l, o, n, p[g + 6], 15, -1560198380);
n = md5_ii(n, m, l, o, p[g + 13], 21, 1309151649);
o = md5_ii(o, n, m, l, p[g + 4], 6, -145523070);
l = md5_ii(l, o, n, m, p[g + 11], 10, -1120210379);
m = md5_ii(m, l, o, n, p[g + 2], 15, 718787259);
n = md5_ii(n, m, l, o, p[g + 9], 21, -343485551);
o = safe_add(o, j);
n = safe_add(n, h);
m = safe_add(m, f);
l = safe_add(l, e)
}
return Array(o, n, m, l)
}
function md5_cmn(h, e, d, c, g, f) {
return safe_add(bit_rol(safe_add(safe_add(e, h), safe_add(c, f)), g), d)
}
function md5_ff(g, f, k, j, e, i, h) {
return md5_cmn((f & k) | ((~f) & j), g, f, e, i, h)
}
function md5_gg(g, f, k, j, e, i, h) {
return md5_cmn((f & j) | (k & (~j)), g, f, e, i, h)
}
function md5_hh(g, f, k, j, e, i, h) {
return md5_cmn(f ^ k ^ j, g, f, e, i, h)
}
function md5_ii(g, f, k, j, e, i, h) {
return md5_cmn(k ^ (f | (~j)), g, f, e, i, h)
}
function core_hmac_md5(c, f) {
var e = str2binl(c);
if (e.length > 16) {
e = core_md5(e, c.length * chrsz)
}
var a = Array(16)
, d = Array(16);
for (var b = 0; b < 16; b++) {
a[b] = e[b] ^ 909522486;
d[b] = e[b] ^ 1549556828
}
var g = core_md5(a.concat(str2binl(f)), 512 + f.length * chrsz);
return core_md5(d.concat(g), 512 + 128)
}
function safe_add(a, d) {
var c = (a & 65535) + (d & 65535);
var b = (a >> 16) + (d >> 16) + (c >> 16);
return (b << 16) | (c & 65535)
}
function bit_rol(a, b) {
return (a << b) | (a >>> (32 - b))
}
function str2binl(d) {
var c = Array();
var a = (1 << chrsz) - 1;
for (var b = 0; b < d.length * chrsz; b += chrsz) {
c[b >> 5] |= (d.charCodeAt(b / chrsz) & a) << (b % 32)
}
return c
}
function binl2str(c) {
var d = "";
var a = (1 << chrsz) - 1;
for (var b = 0; b < c.length * 32; b += chrsz) {
d += String.fromCharCode((c[b >> 5] >>> (b % 32)) & a)
}
return d
}
function binl2hex(c) {
var b = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var d = "";
for (var a = 0; a < c.length * 4; a++) {
d += b.charAt((c[a >> 2] >> ((a % 4) * 8 + 4)) & 15) + b.charAt((c[a >> 2] >> ((a % 4) * 8)) & 15)
}
return d
}
function binl2b64(d) {
var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var f = "";
for (var b = 0; b < d.length * 4; b += 3) {
var e = (((d[b >> 2] >> 8 * (b % 4)) & 255) << 16) | (((d[b + 1 >> 2] >> 8 * ((b + 1) % 4)) & 255) << 8) | ((d[b + 2 >> 2] >> 8 * ((b + 2) % 4)) & 255);
for (var a = 0; a < 4; a++) {
if (b * 8 + a * 6 > d.length * 32) {
f += b64pad
} else {
f += c.charAt((e >> 6 * (3 - a)) & 63)
}
}
}
return f
}
;window.f = hex_md5('1708499710000')
其实就是自定义了md5
,和使用加密库crypto-js
生成的结果是不同的,感兴趣的可以自己测试一下
逆向结果
至此整个逆向分析过程全部结束了,接下来我们用python
实现完整的请求流程,完整代码如下,需要的自取
js
加密逻辑:
// yuanrenxue.js
window = global;
var hexcase = 0;
var b64pad = "";
var chrsz = 16;
function hex_md5(a) {
return binl2hex(core_md5(str2binl(a), a.length * chrsz))
}
function b64_md5(a) {
return binl2b64(core_md5(str2binl(a), a.length * chrsz))
}
function str_md5(a) {
return binl2str(core_md5(str2binl(a), a.length * chrsz))
}
function hex_hmac_md5(a, b) {
return binl2hex(core_hmac_md5(a, b))
}
function b64_hmac_md5(a, b) {
return binl2b64(core_hmac_md5(a, b))
}
function str_hmac_md5(a, b) {
return binl2str(core_hmac_md5(a, b))
}
function md5_vm_test() {
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"
}
function core_md5(p, k) {
p[k >> 5] |= 128 << ((k) % 32);
p[(((k + 64) >>> 9) << 4) + 14] = k;
var o = 1732584193;
var n = -271733879;
var m = -1732584194;
var l = 271733878;
for (var g = 0; g < p.length; g += 16) {
var j = o;
var h = n;
var f = m;
var e = l;
o = md5_ff(o, n, m, l, p[g + 0], 7, -680976936);
l = md5_ff(l, o, n, m, p[g + 1], 12, -389564586);
m = md5_ff(m, l, o, n, p[g + 2], 17, 606105819);
n = md5_ff(n, m, l, o, p[g + 3], 22, -1044525330);
o = md5_ff(o, n, m, l, p[g + 4], 7, -176418897);
l = md5_ff(l, o, n, m, p[g + 5], 12, 1200080426);
m = md5_ff(m, l, o, n, p[g + 6], 17, -1473231341);
n = md5_ff(n, m, l, o, p[g + 7], 22, -45705983);
o = md5_ff(o, n, m, l, p[g + 8], 7, 1770035416);
l = md5_ff(l, o, n, m, p[g + 9], 12, -1958414417);
m = md5_ff(m, l, o, n, p[g + 10], 17, -42063);
n = md5_ff(n, m, l, o, p[g + 11], 22, -1990404162);
o = md5_ff(o, n, m, l, p[g + 12], 7, 1804660682);
l = md5_ff(l, o, n, m, p[g + 13], 12, -40341101);
m = md5_ff(m, l, o, n, p[g + 14], 17, -1502002290);
n = md5_ff(n, m, l, o, p[g + 15], 22, 1236535329);
o = md5_gg(o, n, m, l, p[g + 1], 5, -165796510);
l = md5_gg(l, o, n, m, p[g + 6], 9, -1069501632);
m = md5_gg(m, l, o, n, p[g + 11], 14, 643717713);
n = md5_gg(n, m, l, o, p[g + 0], 20, -373897302);
o = md5_gg(o, n, m, l, p[g + 5], 5, -701558691);
l = md5_gg(l, o, n, m, p[g + 10], 9, 38016083);
m = md5_gg(m, l, o, n, p[g + 15], 14, -660478335);
n = md5_gg(n, m, l, o, p[g + 4], 20, -405537848);
o = md5_gg(o, n, m, l, p[g + 9], 5, 568446438);
l = md5_gg(l, o, n, m, p[g + 14], 9, -1019803690);
m = md5_gg(m, l, o, n, p[g + 3], 14, -187363961);
n = md5_gg(n, m, l, o, p[g + 8], 20, 1163531501);
o = md5_gg(o, n, m, l, p[g + 13], 5, -1444681467);
l = md5_gg(l, o, n, m, p[g + 2], 9, -51403784);
m = md5_gg(m, l, o, n, p[g + 7], 14, 1735328473);
n = md5_gg(n, m, l, o, p[g + 12], 20, -1921207734);
o = md5_hh(o, n, m, l, p[g + 5], 4, -378558);
l = md5_hh(l, o, n, m, p[g + 8], 11, -2022574463);
m = md5_hh(m, l, o, n, p[g + 11], 16, 1839030562);
n = md5_hh(n, m, l, o, p[g + 14], 23, -35309556);
o = md5_hh(o, n, m, l, p[g + 1], 4, -1530992060);
l = md5_hh(l, o, n, m, p[g + 4], 11, 1272893353);
m = md5_hh(m, l, o, n, p[g + 7], 16, -155497632);
n = md5_hh(n, m, l, o, p[g + 10], 23, -1094730640);
o = md5_hh(o, n, m, l, p[g + 13], 4, 681279174);
l = md5_hh(l, o, n, m, p[g + 0], 11, -358537222);
m = md5_hh(m, l, o, n, p[g + 3], 16, -722881979);
n = md5_hh(n, m, l, o, p[g + 6], 23, 76029189);
o = md5_hh(o, n, m, l, p[g + 9], 4, -640364487);
l = md5_hh(l, o, n, m, p[g + 12], 11, -421815835);
m = md5_hh(m, l, o, n, p[g + 15], 16, 530742520);
n = md5_hh(n, m, l, o, p[g + 2], 23, -995338651);
o = md5_ii(o, n, m, l, p[g + 0], 6, -198630844);
l = md5_ii(l, o, n, m, p[g + 7], 10, 11261161415);
m = md5_ii(m, l, o, n, p[g + 14], 15, -1416354905);
n = md5_ii(n, m, l, o, p[g + 5], 21, -57434055);
o = md5_ii(o, n, m, l, p[g + 12], 6, 1700485571);
l = md5_ii(l, o, n, m, p[g + 3], 10, -1894446606);
m = md5_ii(m, l, o, n, p[g + 10], 15, -1051523);
n = md5_ii(n, m, l, o, p[g + 1], 21, -2054922799);
o = md5_ii(o, n, m, l, p[g + 8], 6, 1873313359);
l = md5_ii(l, o, n, m, p[g + 15], 10, -30611744);
m = md5_ii(m, l, o, n, p[g + 6], 15, -1560198380);
n = md5_ii(n, m, l, o, p[g + 13], 21, 1309151649);
o = md5_ii(o, n, m, l, p[g + 4], 6, -145523070);
l = md5_ii(l, o, n, m, p[g + 11], 10, -1120210379);
m = md5_ii(m, l, o, n, p[g + 2], 15, 718787259);
n = md5_ii(n, m, l, o, p[g + 9], 21, -343485551);
o = safe_add(o, j);
n = safe_add(n, h);
m = safe_add(m, f);
l = safe_add(l, e)
}
return Array(o, n, m, l)
}
function md5_cmn(h, e, d, c, g, f) {
return safe_add(bit_rol(safe_add(safe_add(e, h), safe_add(c, f)), g), d)
}
function md5_ff(g, f, k, j, e, i, h) {
return md5_cmn((f & k) | ((~f) & j), g, f, e, i, h)
}
function md5_gg(g, f, k, j, e, i, h) {
return md5_cmn((f & j) | (k & (~j)), g, f, e, i, h)
}
function md5_hh(g, f, k, j, e, i, h) {
return md5_cmn(f ^ k ^ j, g, f, e, i, h)
}
function md5_ii(g, f, k, j, e, i, h) {
return md5_cmn(k ^ (f | (~j)), g, f, e, i, h)
}
function core_hmac_md5(c, f) {
var e = str2binl(c);
if (e.length > 16) {
e = core_md5(e, c.length * chrsz)
}
var a = Array(16)
, d = Array(16);
for (var b = 0; b < 16; b++) {
a[b] = e[b] ^ 909522486;
d[b] = e[b] ^ 1549556828
}
var g = core_md5(a.concat(str2binl(f)), 512 + f.length * chrsz);
return core_md5(d.concat(g), 512 + 128)
}
function safe_add(a, d) {
var c = (a & 65535) + (d & 65535);
var b = (a >> 16) + (d >> 16) + (c >> 16);
return (b << 16) | (c & 65535)
}
function bit_rol(a, b) {
return (a << b) | (a >>> (32 - b))
}
function str2binl(d) {
var c = Array();
var a = (1 << chrsz) - 1;
for (var b = 0; b < d.length * chrsz; b += chrsz) {
c[b >> 5] |= (d.charCodeAt(b / chrsz) & a) << (b % 32)
}
return c
}
function binl2str(c) {
var d = "";
var a = (1 << chrsz) - 1;
for (var b = 0; b < c.length * 32; b += chrsz) {
d += String.fromCharCode((c[b >> 5] >>> (b % 32)) & a)
}
return d
}
function binl2hex(c) {
var b = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var d = "";
for (var a = 0; a < c.length * 4; a++) {
d += b.charAt((c[a >> 2] >> ((a % 4) * 8 + 4)) & 15) + b.charAt((c[a >> 2] >> ((a % 4) * 8)) & 15)
}
return d
}
function binl2b64(d) {
var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var f = "";
for (var b = 0; b < d.length * 4; b += 3) {
var e = (((d[b >> 2] >> 8 * (b % 4)) & 255) << 16) | (((d[b + 1 >> 2] >> 8 * ((b + 1) % 4)) & 255) << 8) | ((d[b + 2 >> 2] >> 8 * ((b + 2) % 4)) & 255);
for (var a = 0; a < 4; a++) {
if (b * 8 + a * 6 > d.length * 32) {
f += b64pad
} else {
f += c.charAt((e >> 6 * (3 - a)) & 63)
}
}
}
return f
};
function encryptMD5()
{
let ts = Date['parse'](new Date()) + (16798545 + -72936737 + 156138192);
let md5_str = hex_md5(ts.toString()) + '丨' + ts / (-1 * 3483 + -9059 + 13542);
return md5_str;
}
python
业务逻辑
# -*- coding: utf-8 -*-
# 需要把cookies替换成自己的
import requests
import execjs
import time
headers = {
"accept": "application/json, text/javascript, */*; q=0.01",
"referer": "https://match.yuanrenxue.cn/match/1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
"x-requested-with": "XMLHttpRequest"
}
cookies = {
"Hm_lvt_434c501fe98c1a8ec74b813751d4e3e3": "1708221175",
"Hm_lpvt_434c501fe98c1a8ec74b813751d4e3e3": "1708221175",
"Hm_lvt_9bcbda9cbf86757998a2339a0437208e": "1708221183",
"Hm_lvt_c99546cf032aaa5a679230de9a95c7db": "1708221183",
"no-alert3": "true",
"tk": "-7806231074693334694",
"sessionid": "74aljygbe5e9y97k7d2tiz3ick61nlbl",
"Hm_lpvt_9bcbda9cbf86757998a2339a0437208e": "1708407704",
"Hm_lpvt_c99546cf032aaa5a679230de9a95c7db": "1708416142"
}
url = "https://match.yuanrenxue.cn/api/match/1"
with open('yuanrenxue.js', 'r') as f:
jscode = f.read()
ctx = execjs.compile(jscode)
m = ctx.call('encryptMD5')
total = 0
num = 0
for page in range(1, 6):
params = {
"page": str(page),
"m": m
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)
if response.status_code == 200:
print('请求第 {} 页结果:'.format(page), response.json())
items = response.json()['data']
for item in items:
total += item['value']
num += len(items)
time.sleep(1)
print('所有机票价格的平均值: ', total / num)
填入上述计算的结果即可,如下图