Python爬虫如何解决提交参数js加密

注意!!!!

仅做知识储备莫拿去违法乱纪,有问题指出来,纯做笔记记录

由于¥%............&&%#%** 所以!@#¥......&*......*

啥也不说直接上代码

python 复制代码
import execjs
js_jiemi = '''
    var token = "J7J82pdS36i87lOT99I75j0k578W1mZy13pInE6n1823ImH78819Enu6l92X32vX938I21k1Q4C535407q71hw97naM82VE12F68i422F42bUKoR3E218g6OOv5fK0x613MxH0X6f7RzVkF5IC9e832F62s4180keM19O5306722924C3ae653YCO0Ad74jxG71x00389xV70cD60913c7kt903163i4hL173Y095MJqC733dg7s9prdY541qaXfBDHfS79u9nW08X39JP8nFfL8vBRSTi89DG4M2xTL46B39JyJZDZe9q1847bN512R9rdW1Sr6S7j5e6O99k0veOP637SJq94485T98U2UX9oD37j263KZXujjv73HH67WDy74aCV7cvNQ3zV26d9Z246o0m0lh0e3gmVje95302X43MKI23t7T8Fo5tqt3aYjQPtO4LE4By85BlQ452164hYD68uLzOW8mt31LfE875CG3D56QteurFV05N2K61Y6786qaLw9k0tfWk0bS6J1Hw2Hi72h5p66Rokxo4Pk794C426w5Q900I6i6kV66656OVJV260Z0lPIrc5q9wE35uLJD8V7drb2LjV47aX8j7h7sMQ1cKecP06eko0Xe09w64MV1E1V1q0dy9n9N028hgqLTpPZsy91YOAWa6F9e0gc0r3BlyN93g4D680yKI86c619XB87ow3M558a5yFlti06q512OvMu4n1I3G9k5b6l888st0259P2I8bi72So05r3350S95ZNDd2d5Ea7iz1952spS471cV9U49E3J4694h413EMF933441L69d6r1cQ5z8963mSaGTF2x430ORD1938940EY00592f282091fcH977Yn45eFT671STU38C3XWHc7Sl362MX88l30rSvW84gxkD6Cy721d556gm94r4j11UUm97jIxD93l77FRH1Q52h09wiO7174WuArYl0WV3wM61q81DI754areT849a5R86J69GV71537Lj4VeR4506NN87CY985L1K8xQH7214M1e2Y8p0636qNX3620Mp6lw53F1CmU6Q8H0ed9k39x47ws492O64l3DOfF0363x9X447nU47yf5dB8Z1U0MwRKpB3W9rgI1u8y202z15346l3xey5WLja6491Q7221BAsPCK1Z8kxOuau4eSAp4zr28JLHL9MI0088NBt2T69Odv5YR370o0F45L5l8E1501DDi2CRp26j7yre38if4Fmzj5Y72A606pA5Q51dioH43j9327iGOqT4M2x25542VJ6994ZL29EE1kR3i7ntT0O04ezZu424744U7nf2uO2v67wX9ef55H7eE5MI7yo7DnTJ05p5O47f89n3c48E043WIh4wP4070b461pm40jAk124WR95b8a3175PONrp002513509Z437GmZ7Emq37Ekv89CgkDn61qML9js2y7fx1iP8uE35on04WQD8KBHHXd5QLu530cA7kiR4450gJ00312O9854074D6r4000QQC5FSh7N6Upf9m47FOp4877667T3J8uf10Y73Hf9945T3UqV499Ktyn1929059Ypc4he4c2CC6J510ifBG8rJ90mq4510trUu5asl6x1OT5qdj36Dl0BP1o6E2yQVeS3Cp52T4nhL3rhZ0i4q3O9bd7OF8XH2704lLt65iS5243934LsnbEh80o33s0C5fa3Z2u0uHS5J89Nq9B0MQ082zcJ613m633v7SmKUJ4JDb372ZIT0A8Q1hI2v1e5f7Q712mCx7wlyI403J4cvgD2AXjg36fDW6JrU85Y9519PV5lk810Y1TFmwk24z9446rX5780FS4oG9253A7279nkftXyC8JKv03496v1yxaSM9963863w058wqM7I4WBWP8B016SXdv3ROr600OD7BSnN0wwWuRRI8d1yky8IbjUPld4833ZoE552J9y84E40luaV44bHn7998088NC";
var _0xodF = 'jsjiami.com.v6'
  , _0x550c = [_0xodF, '\x70\x61\x72\x73\x65', '\x74\x6f\x53\x74\x72\x69\x6e\x67', '\x67\x65\x74\x46\x75\x6c\x6c\x59\x65\x61\x72', '\x67\x65\x74\x44\x61\x74\x65', '\x73\x75\x62\x73\x74\x72', '\x72\x61\x6e\x64\x6f\x6d', '\x6a\x4c\x73\x79\x5a\x6a\x52\x69\x61\x6d\x68\x56\x69\x54\x62\x41\x47\x67\x4f\x53\x2e\x53\x50\x63\x6f\x6d\x2e\x76\x36\x3d\x3d'];
var _0x56ae = function(_0xefe0b8, _0x3df0f9) {
    _0xefe0b8 = ~~'0x'['concat'](_0xefe0b8);
    var _0x37e7a4 = _0x550c[_0xefe0b8];
    return _0x37e7a4;
};
(function(_0x1c3c28, _0x40a8eb) {
    var _0x149307 = 0x0;
    for (_0x40a8eb = _0x1c3c28['shift'](_0x149307 >> 0x2); _0x40a8eb && _0x40a8eb !== (_0x1c3c28['pop'](_0x149307 >> 0x3) + '')['replace'](/[LyZRhVTbAGgOSSP=]/g, ''); _0x149307++) {
        _0x149307 = _0x149307 ^ 0x759e7;
    }
}(_0x550c, _0x56ae));
function createCode() {
    var _0x2d8f05 = Date[_0x56ae('0')](new Date())[_0x56ae('1')]();
    var _0x36c6a6 = new Date();
    var _0x33748d = _0x36c6a6[_0x56ae('2')]();
    var _0x5c685e = _0x36c6a6[_0x56ae('3')]();
    var _0x1e9e81 = _0x33748d * _0x5c685e % 0x3e8;
    var _0x292610 = token[_0x56ae('4')](_0x1e9e81, 0x4);
    var _0x558098 = randomCode(0x2, 0x8) + '\x63' + _0x2d8f05[_0x56ae('4')](0x0, 0x3) + '\x72' + randomCode(0x3, 0x2) + '\x65' + _0x2d8f05[_0x56ae('4')](0x3, 0x1) + '\x64' + randomCode(0x3, 0x7) + '\x69' + _0x2d8f05[_0x56ae('4')](0x4, 0x2) + '\x74' + randomCode(0x2, 0x6) + '\x71' + _0x2d8f05[_0x56ae('4')](0x6, 0x2) + '\x77' + randomCode(0x2, 0x6) + '\x65' + _0x292610 + '\x72' + randomCode(0x3, 0x5) + '\x6c' + _0x2d8f05[_0x56ae('4')](0x8, 0x2) + '\x6f' + randomCode(0x2, 0x8) + '\x76' + _0x2d8f05[_0x56ae('4')](0xa, 0x2) + '\x65' + randomCode(0x2, 0x1) + '\x66' + _0x2d8f05[_0x56ae('4')](0xc, 0x1) + '\x66' + randomCode(0x3, 0x3);
    return _0x558098;
}
function randomCode(_0x4ce2f1, _0x333808) {
    return Math[_0x56ae('5')]()[_0x56ae('1')](0x24)[_0x56ae('4')](_0x4ce2f1, _0x333808);
}
;_0xodF = 'jsjiami.com.v6';

        '''
ctx = execjs.compile(js_jiemi)
code = ctx.call("createCode")
print(code)

如何找到这块单独出来的js 代码需要有一定的前端打断点的知识,在这里我就不指出了😅。

草稿箱里很古早的一篇也忘记后面有没有后续了,就先发布了。有问题在更新修复

相关推荐
有梦想的刺儿4 分钟前
webWorker基本用法
前端·javascript·vue.js
萧鼎28 分钟前
Python并发编程库:Asyncio的异步编程实战
开发语言·数据库·python·异步
学地理的小胖砸29 分钟前
【一些关于Python的信息和帮助】
开发语言·python
疯一样的码农29 分钟前
Python 继承、多态、封装、抽象
开发语言·python
清灵xmf1 小时前
TypeScript 类型进阶指南
javascript·typescript·泛型·t·infer
全栈开发圈1 小时前
新书速览|Java网络爬虫精解与实践
java·开发语言·爬虫
小白学大数据1 小时前
JavaScript重定向对网络爬虫的影响及处理
开发语言·javascript·数据库·爬虫
Python大数据分析@1 小时前
python操作CSV和excel,如何来做?
开发语言·python·excel
黑叶白树1 小时前
简单的签到程序 python笔记
笔记·python
qq_390161771 小时前
防抖函数--应用场景及示例
前端·javascript