巨潮资讯(硬抠代码)
抓取网址:https://webapi.cninfo.com.cn/#/marketDataDate
抓取目标:影片相关信息
网页分析
打开网页后,按F12
打开开发者工具,然后切换时间。
对接口进行分析,存在加密字段
交叉搜索定位关键字位置(增加一个路径)
定位关键字
跟步进入方法内部,发现有混淆
抠代码
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 28 29 30 31 32 33
| const _0x3ca339 = require("E:\\WAWS_ENV\\nodejs\\node_modules\\crypto-js")
localStorage = { "tempenc": "1234567887654321", "G_access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOjQ0LCJleHBpcmVzX2F0IjoxNzI1MzcwNDUzOTI4LCJkZXZpY2VfaWQiOiJrbGluZUFsbDIuaHRtbGJ0N2RlMG56LnAwbjFjYzVsaDcudXZ2byIsInVzZXJfaWQiOiI2MzczMTI5MTc1OTU3MjU2MzA4IiwiZGV2aWNlX3R5cGUiOiIyMDEiLCJjbGllbnRfaWQiOiJTWlhTSlpYXzQ1IiwiaG9zdF9pZGVudGlmaWVyIjoiNDc1YjFkOWIwMjhiNTVkMzk2ZDkyZWM2YWU4ZWVhMTMiLCJqdGkiOiI5MDc4ZDM2Mi0zNjMzLTQyNmYtYWI5OS1lN2Y3MTE4N2Q3NzgifQ.sQ0CTVPbOOU2vCFsujbPsCF1UKMlzNJ2muuvvkNe3oA", "accept-cookie": "1", "point": "point-eaa720e0-acf2-4d3d-a8f9-d1e0b906da68", "G_localHttp": "https://gzdatasdk.mktdata.cn/application/", "device_id_internal": "8ce74182-4979-4e37-af2e-86745d8cc188", "slider": "slider-eaa720e0-acf2-4d3d-a8f9-d1e0b906da68", "isLogin": "false", "uniqueId": "bt7de0nz.p0n1cc5lh7.uvvo", "Hm_lvt_489bd07e99fbfc5f12cbb4145adb0a9b": "1756863270509|1725327254", "G_userid": "6373129175957256308", "getItem":function (){} }
_0x5441b9 = { 'WrFQL': function(_0x20da6a, _0x4036c9) { return _0x20da6a / _0x4036c9; }, }
function getResCode() { var _0xa8f94c = _0x3ca339['AES']['encrypt'](_0x3ca339['enc']['Utf8']['parse'](Math['floor'](_0x5441b9['WrFQL'](new Date()['getTime'](), -0x1 * -0x76f + 0x1419 + 0x7e * -0x30))), _0x3ca339['enc']['Utf8']['parse'](localStorage['getItem'](_0x5441b9['OygmB']) || _0x5441b9['NabjT']), { 'iv': _0x3ca339['enc']['Utf8']['parse'](_0x5441b9['NabjT']), 'mode': _0x3ca339['mode']["CBC"], 'padding': _0x3ca339["pad"]['Pkcs7'] }); return _0x3ca339['enc']['Base64']['stringify'](_0xa8f94c['ciphertext']); }
console.log(getResCode())
|
遇到的问题
- 对象在复制的时候,可能出现复制不全的情况,需要到代码中进行观察
结果