反爬(某企业信用信息) Js逆向分析过程

请先关闭 ROBOTSTXT_OBEY

如果 ROBOTSTXT_OBEY 是打开的,下载器会先请求 http://www.gsxt.gov.cn/robots.txt, 第一次请求会被服务器携带 Set-Cookie

scrapy shell 启动

第一次请求

携带User-Agent 头:

1
scrapy shell -s USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0" 'http://www.gsxt.gov.cn/'

分析响应:

  • Header: Set-Cookie
1
2
>>> response.headers['Set-Cookie']
b'__jsluid_h=f088bf0fa4b4588e67d2978a7d0f294c; max-age=31536000; path=/; HttpOnly'
1
jsluid_h = response.headers['Set-Cookie'].decode('utf-8').split('=')[1].split(';')[0]
  • body
1
2
>>> view(response)
True
1
2
3
4
<script>
document.cookie=('_')+('_')+('j')+('s')+('l')+('_')+('c')+('l')+('e')+('a')+('r')+('a')+('n')+('c')+('e')+('=')+(-~{}+'')+(6+'')+(~~false+'')+((+false)+'')+(-~[2]+'')+((2^1)+'')+((1|2)+'')+(-~(4)+'')+(0+1+0+1+'')+(~~{}+'')+('.')+(6+'')+('|')+('-')+(-~[]+'')+('|')+('t')+('A')+('i')+('Q')+('L')+('L')+('f')+(1+6+'')+('k')+('d')+('c')+('f')+('Y')+('N')+('f')+('b')+('J')+('Z')+(9-1*2+'')+('f')+('R')+('Q')+('O')+('o')+('M')+('g')+('c')+('%')+((1+[2]>>2)+'')+('D')+(';')+('m')+('a')+('x')+('-')+('a')+('g')+('e')+('=')+((1|2)+'')+(';')+('p')+('a')+('t')+('h')+('=')+('/');
location.href=location.pathname+location.search
</script>

解析:

1
2
3
4
5
6
7
8
import execjs

js_src = response.css('script::text').get()
js_func_body = js_src.replace('document.cookie', 'let cookie').replace('location.href=location.pathname+location.search', 'return cookie;')
js_func = 'function getCookie() {' + js_func_body + '}'
jscontext = execjs.compile(js_func)
cookie_str = jscontext.call("getCookie")
jsl_clearance = cookie_str.split('=')[1].split(';')[0]

整理:

1
2
3
4
5
6
7
8
9
10
11
12
import execjs

def getJsCookie1T(self, response):
jsluid_h = response.headers['Set-Cookie'].decode('utf-8').split('=')[1].split(';')[0]
js_src = response.css('script::text').get()
js_func_body = js_src.replace('document.cookie', 'let cookie').replace('location.href=location.pathname+location.search', 'return cookie;')
js_func = 'function getCookie() {' + js_func_body + '}'
jscontext = execjs.compile(js_func)
cookie_str = jscontext.call("getCookie")
jsl_clearance = cookie_str.split('=')[1].split(';')[0]
js_cookie = f"__jsluid_h={jsluid_h}; __jsl_clearance={jsl_clearance}"
return js_cookie

第二次请求

携带User-Agent 和 第一次生成的 Cookie:

1
2
3
4
5
>>> request = request.replace(headers={'User-Agent': request.headers['User-Agent'], 'Cookie': js_cookie})
>>> request
<GET http://www.gsxt.gov.cn/>
>>> fetch(request)
>>>
  • body
1
<script>var _0x1e2d=['woXDjngl','Q25WXA==','Wm0zFg==','w58hwojCuQ==','HsOMMGg=','KMOwPlM=','PcO6AGg=','eFc0KQ==','wqMRBcKq','w73DvcKuMg==','wpZafMOQ','w7/CnnNQ','wqomw5HDpw==','BcKsw7bDhA==','w5LDrsK+Gw==','wqoOBsKX','w7XDssOaw6c=','aWDDtR4=','wokowq1+','w5PDswRu','w6Vbw4zDuQ==','w6PDnsOHw6A=','JExpwrY=','Lxlyw4E=','EMOsTMKA','w6twwqkG','w79dw5HCpQ==','w5zDjsK2wo0=','wr05OMK6','TjPCn8O4','BcK6BHA=','w6oSFVE=','wpgfEcKn','wpPCggMu','dhfCtnw=','w7nClSrDlA==','woYHw4TDpg==','FMOpZcKE','V3h9ew==','Fy0s','w7nCvlx0','w4jDjMK3fA==','w6dsw7vCkg==','wpXChMOFw60=','AFZNwrI=','5oGG55q66K2C5rCh','FcKow7/Dhg==','w7N4w6jChQ==','w41laEo=','wpXCoMOFw5M=','TkpVTQ==','wo9Sw7gl','w6TDscKKGA==','JsKsLkA=','w7dIZFc=','wpETw7fDqg==','w7t+w7bCjg==','wr5fw7kF','BcKow57Dgw==','UzfCv24=','wrcSw5HDvA==','HsKYwrLDhg==','wp8rF8KU','wqTDoiUP','OsK3w4zDmQ==','wpPCr8O2Kw==','Nm13wqE=','w5TDmsKYwrw=','UMOZwrDDnQ==','woNsw7Qr','PcK7Dg==','w4TCuwLDlg==','w7/DrMOJw6Y=','w71cw4XCjQ==','OhUfwoA=','w5tOw6/Dsg==','woUaKMKz','w5/Drwpr','ZQfDhsKA','w6DClGNR','VErDlMOG','w6VKwok8','w7t7wqIX','w6vDlMOdw5I=','wq8Xw5PDsg==','w77ClGFQ','VwrCgUw=','G8O8CHs=','w6Vyw7rCgg==','Ailiw40=','Kgxhw7k=','w5YlA0Y=','ZRPChsON','wrxZwps=','wroOw5jDrA==','TRHDicKn','wpfDgHwp','VEhgQQ==','wpbCtScx','wqPCiHU=','ewnDmsKY','STfCo1Y=','w7nDrgR4','wqogaRg=','DWVCwq4=','wq7CjcOkHQ==','woQlw5HDlw==','IsOpQcKw','w7IXEmM=','w5vDoRFv','BicTwpY=','E8Kbw7DDtg==','wqvCucOQw5g=','bnhaZw==','ayDCiUY=','ZsObwqLDrQ==','U1XCk8K5','wq0bwrzDmA==','w6DDtsOjw4k=','w6AkD0I=','wp4Sw7vDpg==','UDXCu20=','E1hBwrE=','IcOhXMKC','w5vCsQzDmg==','wocEwptP','DsKuLUo=','wqHCnsO1FA==','a2HDoRg=','wq7CgSUJ','w5LDvMKNMw==','ZTbDlcK3','Qi/DncKV','HBcowoI=','RVoywrs=','wqA0w5rDiQ==','wo7DgmAA','Xh59wo0=','LsKPwp3Drg==','IcOhQ8KZ','w6rDmsK9wpw=','w7jDlsKIwoI=','BsKtQsO6','w57CsFlg','w68ED3k=','wrl+wqTDkA==','I8KTwrDDug==','wqgPw4nDjA==','w6fCkAHDvw==','LsKPE3A=','wojCgCMP','w6vChVN9','w6zDtcKFXQ==','w5M6wqjCmQ==','wqPCvz0/','w4/DtQdz','TloNwoQ=','w6Jqw7rDsw==','FVRowpk=','w5YFDWQ=','w75dw73CrQ==','RATDocKF','w4FJw6vCug==','fHTDjsOT','U2HDliI=','772H6KyN56iV56+m','w7bDrcKICA==','w5k3J3s=','w5PDjcKLwqc=','w6rDk8KPwrs=','dj/ClWU=','HsKTdcOZ','w5Fmw4zDmw==','w6jDvcKBKA==','wpoJFcKj','cnTDoCc=','wr/CmMOIw5A=','HEVKwrk=','woEZw43Djg==','w7wIBUE=','w4MbA1A=','fcOZwoPDog==','BHBbwrk=','wo1qfsO1','FA9Aw4w=','wrcrwoVL','b35Gag==','wq0Gwo9A','5q285Zym6ai+6K6t','wpjDjR8O','QX5JYA==','dSvCvMOy','HcOKMHI=','wqtBe8O8','IsKJw6zDlQ==','w4jDjMOew48=','wrvDr2UN','woU3w5nDnA==','bzPCgkA=','QjTDp8K1','wodQw5EG','T2/Dvgo=','wqrChcOENA==','w6nDhMKXXg==','w4LCgxLDgA==','w7TDt8KEZg==','wow/wqFx','VRzCg34=','wprDmHYM','w5FRwr8m','w5kJCFI=','wpHCrQQJ','w7ArwoLCuw==','HsKjCUw=','RcOZwq3Drw==','w6HDrsKpOQ==','w4PDvsOhw68=','w6jCoMOuw5A=','w6jDm8O3w4s=','wq3Dlw8f','TXQKwpY=','w6HDi8K7Hw==','McOOK04=','w7vDs8KwbQ==','w4JCw6fDuA==','wrdPU8OU','wpdGwp7DgA==','w4rDriJy','wrFhw5ER','w4UpJHo=','dX0qwqg=','w5pqw5TDvg==','D8OCwpko','woLClcOsw7c=','YnvDgsO5','w7hfw4/DvQ==','UDbCu0s=','S2cMCQ==','YSTDqMKX','w70/Llg=','eDTDmMKk','wqfCkjc6','w6XDsgpo','w63DowZw','woc5wrA=','EcOOwoEq','w4V+w5fCnQ==','D8Okwrka','w5cEOmI=','GMKKw57Dnw==','wo1Ww5QR','Zl7Dlx4=','O8KJwp3DuA==','w7XDlsK9PQ==','w6dAw6bDrA==','w7o2w5vDvA==','w7kfC3k=','QGMLFQ==','w67DtMKvwp4=','W00xKg==','wq1GwrDDpA==','w7fDncKnwrc=','wrPCqsOCw4U=','6K6R5rGj6aqD6Kyg','QCZLw7Y=','wrwbIcKg','w5o8Hk8=','D2RWwoY=','w6/DkcO+w4g=','w78PBGg=','UWnCmMKe','ZWTDngY=','E8OVHFo=','w7xKw5HDlw==','wpHDqUw5','YXnDisO2','ATJrw6s=','wp3Djmg6','b8Ovw6XDlQ==','w65KwpgB','XikZwp0=','w7TDvcO5w4o=','wqEUwrV8','wpLCozQJ','w7k+wqrCmQ==','w5rCpFl3','w55Yw7bDpQ==','EcKKdsON','w57DmcOlw7s=','woM1w6vDmQ==','ZhvCpls=','HsOrRMK9','DQY4wpg=','Uw0Swp4=','wpo6bw4=','wqtWw5sG','TjnCt2E=','w7fCpXBK','w57DkMKcOA==','w7HCgwXDog==','RWbCvcKM','aWgZHg==','H8OrEFQ=','woR6w5Qk','J8OpJkw=','V0nDksO0','w4EiDw==','bjHCsnk=','NcOOwo4p','TV7DowA=','w5V+w7bCmA==','w7U8C3k=','w7d/X1g=','w5M4Omw=','B8OYJXk=','wrY3w5nDlg==','wo3Cs8OFw5k=','wqPDrm0r','G8KMw4TDgA==','w6LCvA7DkA==','w4jCkTHDkA==','CsKYG1w=','w4/DrA51','wpzCj8OvGQ==','wofDrwIc','w7cdLXI=','w75OwqkQ'];(function(_0x11c8af,_0x1e2d46){var _0x2a36e1=function(_0x2deff6){while(--_0x2deff6){_0x11c8af['push'](_0x11c8af['shift']());}};_0x2a36e1(++_0x1e2d46);}(_0x1e2d,0xae));var _0x2a36=function(_0x11c8af,_0x1e2d46){_0x11c8af=_0x11c8af-0x0;var _0x2a36e1=_0x1e2d[_0x11c8af];if(_0x2a36['psKvjD']===undefined){(function(){var _0x4a8f21=function(){var _0x1ff210;try{_0x1ff210=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x4c5d5d){_0x1ff210=window;}return _0x1ff210;};var _0xfc5d6=_0x4a8f21();var _0x188c96='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc5d6['atob']||(_0xfc5d6['atob']=function(_0x3187ab){var _0x5ce0e1=String(_0x3187ab)['replace'](/=+$/,'');var _0x1d557c='';for(var _0x1b84f3=0x0,_0x4be7a4,_0x4f43fc,_0x2758b0=0x0;_0x4f43fc=_0x5ce0e1['charAt'](_0x2758b0++);~_0x4f43fc&&(_0x4be7a4=_0x1b84f3%0x4?_0x4be7a4*0x40+_0x4f43fc:_0x4f43fc,_0x1b84f3++%0x4)?_0x1d557c+=String['fromCharCode'](0xff&_0x4be7a4>>(-0x2*_0x1b84f3&0x6)):0x0){_0x4f43fc=_0x188c96['indexOf'](_0x4f43fc);}return _0x1d557c;});}());var _0x589164=function(_0xdbee88,_0x63b65c){var _0x474830=[],_0x357f79=0x0,_0x2ed50a,_0x255f5d='',_0x8ff92a='';_0xdbee88=atob(_0xdbee88);for(var _0x391402=0x0,_0x42bac6=_0xdbee88['length'];_0x391402<_0x42bac6;_0x391402++){_0x8ff92a+='%'+('00'+_0xdbee88['charCodeAt'](_0x391402)['toString'](0x10))['slice'](-0x2);}_0xdbee88=decodeURIComponent(_0x8ff92a);var _0x376a21;for(_0x376a21=0x0;_0x376a21<0x100;_0x376a21++){_0x474830[_0x376a21]=_0x376a21;}for(_0x376a21=0x0;_0x376a21<0x100;_0x376a21++){_0x357f79=(_0x357f79+_0x474830[_0x376a21]+_0x63b65c['charCodeAt'](_0x376a21%_0x63b65c['length']))%0x100;_0x2ed50a=_0x474830[_0x376a21];_0x474830[_0x376a21]=_0x474830[_0x357f79];_0x474830[_0x357f79]=_0x2ed50a;}_0x376a21=0x0;_0x357f79=0x0;for(var _0x33ae0c=0x0;_0x33ae0c<_0xdbee88['length'];_0x33ae0c++){_0x376a21=(_0x376a21+0x1)%0x100;_0x357f79=(_0x357f79+_0x474830[_0x376a21])%0x100;_0x2ed50a=_0x474830[_0x376a21];_0x474830[_0x376a21]=_0x474830[_0x357f79];_0x474830[_0x357f79]=_0x2ed50a;_0x255f5d+=String['fromCharCode'](_0xdbee88['charCodeAt'](_0x33ae0c)^_0x474830[(_0x474830[_0x376a21]+_0x474830[_0x357f79])%0x100]);}return _0x255f5d;};_0x2a36['nxKrzs']=_0x589164;_0x2a36['UiEgdJ']={};_0x2a36['psKvjD']=!![];}var _0x2deff6=_0x2a36['UiEgdJ'][_0x11c8af];if(_0x2deff6===undefined){if(_0x2a36['ocpJYT']===undefined){_0x2a36['ocpJYT']=!![];}_0x2a36e1=_0x2a36['nxKrzs'](_0x2a36e1,_0x1e2d46);_0x2a36['UiEgdJ'][_0x11c8af]=_0x2a36e1;}else{_0x2a36e1=_0x2deff6;}return _0x2a36e1;};function hash(_0x35c1cd){var _0xf34289={};_0xf34289[_0x2a36('0x74','pbz1')+'f']=function(_0x1f0188,_0x4ac636){return _0x1f0188<<_0x4ac636;};_0xf34289[_0x2a36('0x29','g$*4')+'i']=function(_0x38f103,_0x12efab){return _0x38f103>>>_0x12efab;};_0xf34289[_0x2a36('0x91','fj6o')+'w']=function(_0xf343,_0x114e91){return _0xf343-_0x114e91;};_0xf34289[_0x2a36('0x43','0hl%')+'I']=function(_0x1474c9,_0x223269){return _0x1474c9&_0x223269;};_0xf34289[_0x2a36('0x58','1W0i')+'v']=function(_0x1a673f,_0x1cb0ee){return _0x1a673f|_0x1cb0ee;};_0xf34289[_0x2a36('0x97','@GHf')+'S']=function(_0x450deb,_0xd5bbe6){return _0x450deb^_0xd5bbe6;};_0xf34289[_0x2a36('0x1','RX*q')+'S']=function(_0xe0fdca,_0x35e756){return _0xe0fdca^_0x35e756;};_0xf34289[_0x2a36('0x135','hp^w')+'E']=function(_0x3d6d08,_0x242474){return _0x3d6d08^_0x242474;};_0xf34289[_0x2a36('0xc7','ET&B')+'a']=function(_0x1c85f9,_0x58e7a8){return _0x1c85f9^_0x58e7a8;};_0xf34289[_0x2a36('0xc4','1W0i')+'b']=function(_0x451449,_0x12e8bd){return _0x451449^_0x12e8bd;};_0xf34289[_0x2a36('0x71','*VyA')+'T']=function(_0x23a788,_0x49e51f){return _0x23a788^_0x49e51f;};_0xf34289[_0x2a36('0xd3','ET&B')+'H']=function(_0x390f3d,_0x432bf5){return _0x390f3d&_0x432bf5;};_0xf34289[_0x2a36('0x42','Um^)')+'J']=function(_0x41c1a4,_0x3f0211){return _0x41c1a4+_0x3f0211;};_0xf34289[_0x2a36('0xf1','(Gcy')+'x']=function(_0x579556,_0x242cdc){return _0x579556|_0x242cdc;};_0xf34289[_0x2a36('0x93','w@7h')+'w']=function(_0x2a0b11,_0x9010d4){return _0x2a0b11^_0x9010d4;};_0xf34289[_0x2a36('0x140','@GHf')+'U']=function(_0x409885,_0x704bba,_0x37a21f){return _0x409885(_0x704bba,_0x37a21f);};_0xf34289[_0x2a36('0x4d','RX*q')+'w']=function(_0x261197,_0x5f3c73,_0x234f30){return _0x261197(_0x5f3c73,_0x234f30);};_0xf34289[_0x2a36('0xea','RKPm')+'N']=_0x2a36('0x111','nHo#')+'h';_0xf34289[_0x2a36('0x2f','g$*4')+'J']=function(_0x4320c3,_0x35b352,_0x3021b5){return _0x4320c3(_0x35b352,_0x3021b5);};_0xf34289[_0x2a36('0x39','WUwR')+'d']=function(_0x438b8c,_0xc5f374,_0x59b4c7){return _0x438b8c(_0xc5f374,_0x59b4c7);};_0xf34289[_0x2a36('0x44','#XP9')+'Q']=function(_0x2898b7,_0x11b9ec,_0x12a8a9,_0x681d1b){return _0x2898b7(_0x11b9ec,_0x12a8a9,_0x681d1b);};_0xf34289[_0x2a36('0xf','74L%')+'M']=function(_0x5c2181,_0x551ed1,_0x584c0d){return _0x5c2181(_0x551ed1,_0x584c0d);};_0xf34289[_0x2a36('0x12a','XR!r')+'w']=function(_0x118b0d,_0x486489){return _0x118b0d/_0x486489;};_0xf34289[_0x2a36('0xb0','MJC2')+'r']=function(_0x3de0b7,_0x1d9340){return _0x3de0b7%_0x1d9340;};_0xf34289[_0x2a36('0xac','#XP9')+'c']=function(_0x33e29b,_0x1c7898){return _0x33e29b*_0x1c7898;};_0xf34289[_0x2a36('0x6c','Mza$')+'R']=function(_0x5d9c01,_0x2f24ff){return _0x5d9c01%_0x2f24ff;};_0xf34289[_0x2a36('0x13f','g$*4')+'F']=function(_0x5f5181,_0xb502d7){return _0x5f5181!==_0xb502d7;};_0xf34289[_0x2a36('0x21','pbz1')+'i']=function(_0x4296d6,_0x36439d){return _0x4296d6+_0x36439d;};_0xf34289[_0x2a36('0xbf','54hK')+'X']=function(_0xa0a146,_0x1cc99c){return _0xa0a146/_0x1cc99c;};_0xf34289[_0x2a36('0xd5','NK!y')+'o']=function(_0x5804e4,_0x531ca7){return _0x5804e4-_0x531ca7;};_0xf34289[_0x2a36('0xe0','fj6o')+'H']=function(_0x207b6f,_0x57dd46){return _0x207b6f%_0x57dd46;};_0xf34289[_0x2a36('0xed','NK!y')+'L']=function(_0x38cfd1,_0x4f618c){return _0x38cfd1(_0x4f618c);};_0xf34289[_0x2a36('0xe5','!lad')+'k']=function(_0x484790,_0x448098){return _0x484790<_0x448098;};_0xf34289[_0x2a36('0xae','8mW]')+'b']=function(_0x29977d,_0x2198dc){return _0x29977d*_0x2198dc;};_0xf34289[_0x2a36('0x31','&1fo')+'v']=function(_0x36ddc4,_0x345d57){return _0x36ddc4|_0x345d57;};_0xf34289[_0x2a36('0xb1','CT)o')+'D']=function(_0x57cb55,_0x4be60d){return _0x57cb55-_0x4be60d;};_0xf34289[_0x2a36('0xef','pbz1')+'P']=function(_0x460203,_0xbcdbc9){return _0x460203&_0xbcdbc9;};_0xf34289[_0x2a36('0x11c','Um^)')+'H']=function(_0xed0374,_0x284a97){return _0xed0374>>>_0x284a97;};_0xf34289[_0x2a36('0x104','CT)o')+'F']=function(_0x44e43a,_0x34aa1a){return _0x44e43a+_0x34aa1a;};_0xf34289[_0x2a36('0x24','w*YK')+'Y']=function(_0x4f6764,_0x3e66ce){return _0x4f6764+_0x3e66ce;};_0xf34289[_0x2a36('0x35','#XP9')+'p']=function(_0x501ecf){return _0x501ecf();};_0xf34289[_0x2a36('0x2e','hp^w')+'S']=function(_0x3db756,_0x422431){return _0x3db756<_0x422431;};_0xf34289[_0x2a36('0x13b','(Gcy')+'J']=function(_0x242d9d,_0x1582cc){return _0x242d9d+_0x1582cc;};_0xf34289[_0x2a36('0xbd','nHo#')+'t']=function(_0x5304f3,_0x251af6,_0x291883,_0x2af5ad,_0x23d468,_0x39a52b,_0x3abfee,_0x19e686){return _0x5304f3(_0x251af6,_0x291883,_0x2af5ad,_0x23d468,_0x39a52b,_0x3abfee,_0x19e686);};_0xf34289[_0x2a36('0x137','k9V8')+'f']=function(_0xee2df3,_0x3b43a4){return _0xee2df3+_0x3b43a4;};_0xf34289[_0x2a36('0x10c','8sr^')+'g']=function(_0x18c11b,_0xe8adca){return _0x18c11b+_0xe8adca;};_0xf34289[_0x2a36('0x115','fj6o')+'d']=function(_0xa2e388,_0x26e10d,_0x160212,_0x4a73b3,_0x108d7e,_0x299234,_0x5041c6,_0x28ca4d){return _0xa2e388(_0x26e10d,_0x160212,_0x4a73b3,_0x108d7e,_0x299234,_0x5041c6,_0x28ca4d);};_0xf34289[_0x2a36('0x130','6dCB')+'M']=function(_0x5a48d3,_0x4b1a01,_0x3f3811,_0x570205,_0xe19c31,_0xeba9ab,_0x1f2395,_0x361a29){return _0x5a48d3(_0x4b1a01,_0x3f3811,_0x570205,_0xe19c31,_0xeba9ab,_0x1f2395,_0x361a29);};_0xf34289[_0x2a36('0xb','Mza$')+'Z']=function(_0x42dc91,_0x51eb99){return _0x42dc91+_0x51eb99;};_0xf34289[_0x2a36('0x32','WUwR')+'C']=function(_0x420979,_0xd6741){return _0x420979+_0xd6741;};_0xf34289[_0x2a36('0x8b','@GHf')+'Z']=function(_0x374544,_0x49e039){return _0x374544+_0x49e039;};_0xf34289[_0x2a36('0xcf','xz]x')+'c']=function(_0x548a02,_0xefd572){return _0x548a02+_0xefd572;};_0xf34289[_0x2a36('0x6d','0hl%')+'v']=function(_0x168f6f,_0x528579,_0xefc5d6,_0x1a0609,_0x41371d,_0x566757,_0xc834fe,_0x17937e){return _0x168f6f(_0x528579,_0xefc5d6,_0x1a0609,_0x41371d,_0x566757,_0xc834fe,_0x17937e);};_0xf34289[_0x2a36('0x133','0hl%')+'W']=function(_0x25e10a,_0x389eef,_0x39ba1f,_0x3ab948,_0x16fe0e,_0x5b6959,_0xb2ef61,_0x53035f){return _0x25e10a(_0x389eef,_0x39ba1f,_0x3ab948,_0x16fe0e,_0x5b6959,_0xb2ef61,_0x53035f);};_0xf34289[_0x2a36('0xd6','jG(h')+'j']=function(_0x51cd2d,_0xe10455,_0x3e55b4,_0x53339c,_0x1455d4,_0x4786dc,_0x1c85c0,_0x286f66){return _0x51cd2d(_0xe10455,_0x3e55b4,_0x53339c,_0x1455d4,_0x4786dc,_0x1c85c0,_0x286f66);};_0xf34289[_0x2a36('0x2d','74L%')+'s']=function(_0x9ef83c,_0x2c1f81,_0x208f1c,_0x38edc7,_0x31ce4,_0x4e3243,_0x12cc5d,_0x9b8fd8){return _0x9ef83c(_0x2c1f81,_0x208f1c,_0x38edc7,_0x31ce4,_0x4e3243,_0x12cc5d,_0x9b8fd8);};_0xf34289[_0x2a36('0x70','WUwR')+'t']=function(_0x1c3b1f,_0x479043){return _0x1c3b1f+_0x479043;};_0xf34289[_0x2a36('0x116','Mza$')+'Y']=function(_0x4397e0,_0x372c49,_0x2e4496,_0x188e89,_0x4b2a24,_0x1f994f,_0x160c27,_0xe750b8){return _0x4397e0(_0x372c49,_0x2e4496,_0x188e89,_0x4b2a24,_0x1f994f,_0x160c27,_0xe750b8);};_0xf34289[_0x2a36('0x72','8mW]')+'J']=function(_0x5c6b39,_0x514ddb,_0x313c86,_0x1660c1,_0x5e0720,_0x1e701c,_0x33189b,_0x3d256c){return _0x5c6b39(_0x514ddb,_0x313c86,_0x1660c1,_0x5e0720,_0x1e701c,_0x33189b,_0x3d256c);};_0xf34289[_0x2a36('0x11f','hp^w')+'x']=function(_0x437093,_0x4df60e,_0x3abedb,_0x353657,_0x5eee29,_0x67a1a2,_0x379851,_0x2ad8c9){return _0x437093(_0x4df60e,_0x3abedb,_0x353657,_0x5eee29,_0x67a1a2,_0x379851,_0x2ad8c9);};_0xf34289[_0x2a36('0x38','hp^w')+'u']=function(_0x1a217c,_0x155aa7,_0xdf6d5f,_0x3c8493,_0xc1379b,_0x2e2252,_0x51a743,_0x4d1cf2){return _0x1a217c(_0x155aa7,_0xdf6d5f,_0x3c8493,_0xc1379b,_0x2e2252,_0x51a743,_0x4d1cf2);};_0xf34289[_0x2a36('0x6a','7TrD')+'O']=function(_0x1ae7bb,_0x5c4c1d,_0x3b6dfc,_0x430d65,_0x1df203,_0x31cfb1,_0x2a9267,_0x5e07b1){return _0x1ae7bb(_0x5c4c1d,_0x3b6dfc,_0x430d65,_0x1df203,_0x31cfb1,_0x2a9267,_0x5e07b1);};_0xf34289[_0x2a36('0xff','#XP9')+'N']=function(_0x5a031b,_0x16a75f,_0x42b492,_0x5dca1e,_0x4a0598,_0x12f5fd,_0x47f3f4,_0x2f087a){return _0x5a031b(_0x16a75f,_0x42b492,_0x5dca1e,_0x4a0598,_0x12f5fd,_0x47f3f4,_0x2f087a);};_0xf34289[_0x2a36('0x22','KohP')+'y']=function(_0x416f55,_0x16de1c){return _0x416f55+_0x16de1c;};_0xf34289[_0x2a36('0x51','qlka')+'V']=function(_0x59c9de,_0x28f024){return _0x59c9de+_0x28f024;};_0xf34289[_0x2a36('0x13','SKmL')+'B']=function(_0x4c1e1d,_0x340417){return _0x4c1e1d+_0x340417;};_0xf34289[_0x2a36('0x4f','g$*4')+'I']=function(_0x542e6b,_0x519dd8,_0x3e4ae1,_0x1370d0,_0x368a0b,_0x16bdf5,_0x2102f6,_0x5beb42){return _0x542e6b(_0x519dd8,_0x3e4ae1,_0x1370d0,_0x368a0b,_0x16bdf5,_0x2102f6,_0x5beb42);};_0xf34289[_0x2a36('0x85','pbz1')+'O']=function(_0x9c14c4,_0x2027d7){return _0x9c14c4+_0x2027d7;};_0xf34289[_0x2a36('0x6','@GHf')+'Q']=function(_0xcd73e9,_0x52d0ce,_0x4a459c,_0xc5028d,_0x199d20,_0x503b04,_0x561dd1,_0x1c75f1){return _0xcd73e9(_0x52d0ce,_0x4a459c,_0xc5028d,_0x199d20,_0x503b04,_0x561dd1,_0x1c75f1);};_0xf34289[_0x2a36('0xbb','pbz1')+'s']=function(_0x43a6fb,_0x188636,_0x47e2e8,_0x734299,_0x4de0a0,_0x3c9246,_0x4124d9,_0x17dbde){return _0x43a6fb(_0x188636,_0x47e2e8,_0x734299,_0x4de0a0,_0x3c9246,_0x4124d9,_0x17dbde);};_0xf34289[_0x2a36('0x12d','fj6o')+'w']=function(_0x3d7b8e,_0x584185){return _0x3d7b8e+_0x584185;};_0xf34289[_0x2a36('0xb3','(Gcy')+'x']=function(_0x2220c3,_0x14c718){return _0x2220c3+_0x14c718;};_0xf34289[_0x2a36('0xa1','!lad')+'i']=function(_0xbf8950,_0x9a943a){return _0xbf8950+_0x9a943a;};_0xf34289[_0x2a36('0x41','@GHf')+'k']=function(_0x3a4375,_0x703ed4,_0x142dbc,_0x5088be,_0x3ec027,_0x25eff9,_0x5e487b,_0x15be78){return _0x3a4375(_0x703ed4,_0x142dbc,_0x5088be,_0x3ec027,_0x25eff9,_0x5e487b,_0x15be78);};_0xf34289[_0x2a36('0x3','k9V8')+'V']=function(_0x3830c6,_0x2848c0,_0x2e2955,_0x20539b,_0x5e062a,_0x4fc418,_0x3031fe,_0x624e53){return _0x3830c6(_0x2848c0,_0x2e2955,_0x20539b,_0x5e062a,_0x4fc418,_0x3031fe,_0x624e53);};_0xf34289[_0x2a36('0xa','MJC2')+'x']=function(_0xe78a19,_0x1c9fdc){return _0xe78a19+_0x1c9fdc;};_0xf34289[_0x2a36('0x121','KohP')+'p']=function(_0x22aeb4,_0x24b03b,_0x1271ab,_0x485402,_0x3163df,_0xd70fb1,_0x11fb17,_0x75ac14){return _0x22aeb4(_0x24b03b,_0x1271ab,_0x485402,_0x3163df,_0xd70fb1,_0x11fb17,_0x75ac14);};_0xf34289[_0x2a36('0x9','SKmL')+'L']=function(_0xe98eaa,_0x47a8ba,_0x598c80){return _0xe98eaa(_0x47a8ba,_0x598c80);};_0xf34289[_0x2a36('0xc1','6dCB')+'C']=function(_0x27ec67,_0x135c80){return _0x27ec67+_0x135c80;};_0xf34289[_0x2a36('0x62','8ePc')+'r']=function(_0x5317c2,_0x9a7e11){return _0x5317c2+_0x9a7e11;};_0xf34289[_0x2a36('0x3b','1W0i')+'g']=function(_0x384a33,_0x2d2d92){return _0x384a33(_0x2d2d92);};_0xf34289[_0x2a36('0x110','@GHf')+'E']=function(_0x2a70de,_0x1b0808){return _0x2a70de(_0x1b0808);};var _0x27b846=_0xf34289;function _0x34fe6c(_0x4bcb59,_0xb09178){return _0x27b846[_0x2a36('0xb6','[WEF')+'f'](_0x4bcb59,_0xb09178)|_0x27b846[_0x2a36('0xc5','k9V8')+'i'](_0x4bcb59,_0x27b846[_0x2a36('0x25','0hl%')+'w'](0x20,_0xb09178));}function _0x10618e(_0x4e10e7,_0x13e40d){var _0x1f127a=(_0x2a36('0x122','^EXY')+_0x2a36('0x10e','qlka')+_0x2a36('0xdb','hp^w')+_0x2a36('0xfc','fj6o'))[_0x2a36('0x3d','WUwR')+'t']('|');var _0x3dac0d=0x0;while(!![]){switch(_0x1f127a[_0x3dac0d++]){case'0':_0x36dc0d=_0x27b846[_0x2a36('0x30','8ePc')+'I'](_0x13e40d,0x40000000);continue;case'1':var _0x57768b,_0x36dc0d,_0x174eaf,_0x2969b3,_0x148e5a;continue;case'2':if(_0x27b846[_0x2a36('0x9b','MWa5')+'v'](_0x57768b,_0x36dc0d)){if(_0x148e5a&0x40000000)return _0x27b846[_0x2a36('0x77','7TrD')+'S'](_0x27b846[_0x2a36('0x1','RX*q')+'S'](_0x27b846[_0x2a36('0xd','Mza$')+'E'](_0x148e5a,0xc0000000),_0x174eaf),_0x2969b3);else return _0x27b846[_0x2a36('0xbe','CT)o')+'a'](_0x27b846[_0x2a36('0x103','NK!y')+'a'](_0x148e5a,0x40000000),_0x174eaf)^_0x2969b3;}else return _0x27b846[_0x2a36('0x88','(Gcy')+'a'](_0x148e5a,_0x174eaf)^_0x2969b3;continue;case'3':_0x57768b=_0x4e10e7&0x40000000;continue;case'4':if(_0x27b846[_0x2a36('0x9a','54hK')+'I'](_0x57768b,_0x36dc0d))return _0x27b846[_0x2a36('0x128','6dCB')+'b'](_0x27b846[_0x2a36('0x95','G]I%')+'T'](_0x148e5a,0x80000000)^_0x174eaf,_0x2969b3);continue;case'5':_0x2969b3=_0x27b846[_0x2a36('0xf3','MJC2')+'H'](_0x13e40d,0x80000000);continue;case'6':_0x148e5a=_0x27b846[_0x2a36('0xd7','!lad')+'J'](_0x27b846[_0x2a36('0x48','(Gcy')+'H'](_0x4e10e7,0x3fffffff),_0x27b846[_0x2a36('0x7e','Oo24')+'H'](_0x13e40d,0x3fffffff));continue;case'7':_0x174eaf=_0x27b846[_0x2a36('0xd3','ET&B')+'H'](_0x4e10e7,0x80000000);continue;}break;}}function _0x548d4d(_0x42b0d7,_0x2d08d2,_0x58fa82){return _0x27b846[_0x2a36('0x3c','Fn7$')+'x'](_0x42b0d7&_0x2d08d2,~_0x42b0d7&_0x58fa82);}function _0x342dc2(_0x3b78fb,_0xc85404,_0x3d4292){return _0x27b846[_0x2a36('0xa4','6dCB')+'x'](_0x27b846[_0x2a36('0xf3','MJC2')+'H'](_0x3b78fb,_0x3d4292),_0xc85404&~_0x3d4292);}function _0xb30f20(_0x2c79ef,_0x5589c0,_0x15f056){return _0x27b846[_0x2a36('0x5c','w*YK')+'w'](_0x2c79ef,_0x5589c0)^_0x15f056;}function _0x171e10(_0x32dd0d,_0x1e6891,_0x55e3bb){return _0x1e6891^_0x27b846[_0x2a36('0x7a','pbz1')+'x'](_0x32dd0d,~_0x55e3bb);}function _0x5f1ec4(_0x2adac3,_0x2b5312,_0x3d740e,_0x4d809a,_0x578f9a,_0x306271,_0xdd5166){_0x2adac3=_0x27b846[_0x2a36('0x1c','G]I%')+'U'](_0x10618e,_0x2adac3,_0x27b846[_0x2a36('0x89','w*YK')+'w'](_0x10618e,_0x27b846[_0x2a36('0x7b','6dCB')+'w'](_0x10618e,_0x548d4d(_0x2b5312,_0x3d740e,_0x4d809a),_0x578f9a),_0xdd5166));return _0x10618e(_0x34fe6c(_0x2adac3,_0x306271),_0x2b5312);}function _0x50d58f(_0x50e7d8,_0x19ec48,_0x58f2b0,_0x9f6805,_0x34e2d5,_0x18c4ab,_0x5a033d){if(_0x27b846[_0x2a36('0xde','D##Z')+'N']!==_0x27b846[_0x2a36('0x80','8ePc')+'N']){sleepT=0x5dc;}else{_0x50e7d8=_0x27b846[_0x2a36('0x69','RKPm')+'J'](_0x10618e,_0x50e7d8,_0x10618e(_0x10618e(_0x342dc2(_0x19ec48,_0x58f2b0,_0x9f6805),_0x34e2d5),_0x5a033d));return _0x10618e(_0x27b846[_0x2a36('0x2f','g$*4')+'J'](_0x34fe6c,_0x50e7d8,_0x18c4ab),_0x19ec48);}}function _0x4d85c0(_0x587fa0,_0x5bba53,_0x4962af,_0x238436,_0x29fed9,_0x48f6c5,_0x40f965){_0x587fa0=_0x27b846[_0x2a36('0xc2','&1fo')+'J'](_0x10618e,_0x587fa0,_0x27b846[_0x2a36('0x99','KohP')+'d'](_0x10618e,_0x27b846[_0x2a36('0x28','8sr^')+'d'](_0x10618e,_0x27b846[_0x2a36('0xb7','w@7h')+'Q'](_0xb30f20,_0x5bba53,_0x4962af,_0x238436),_0x29fed9),_0x40f965));return _0x10618e(_0x27b846[_0x2a36('0x90','ET&B')+'M'](_0x34fe6c,_0x587fa0,_0x48f6c5),_0x5bba53);}function _0x50f986(_0x4dee58,_0x2f9b3b,_0x55cd5d,_0x54d151,_0x1774d9,_0x3849e3,_0x32576b){_0x4dee58=_0x27b846[_0x2a36('0x9f','8ePc')+'M'](_0x10618e,_0x4dee58,_0x10618e(_0x10618e(_0x171e10(_0x2f9b3b,_0x55cd5d,_0x54d151),_0x1774d9),_0x32576b));return _0x10618e(_0x34fe6c(_0x4dee58,_0x3849e3),_0x2f9b3b);}function _0x431328(_0x4b4a2b){if(_0x27b846[_0x2a36('0xa3','SKmL')+'F'](_0x2a36('0x18','pbz1')+'i',_0x2a36('0x125','WWZM')+'i')){_0x579c3d=_0x27b846[_0x2a36('0xec','8mW]')+'w'](_0x3c2446-_0x27b846[_0x2a36('0x10b','pbz1')+'r'](_0x3c2446,0x4),0x4);_0x26725c=_0x27b846[_0x2a36('0x12','8ePc')+'c'](_0x27b846[_0x2a36('0x83','Fn7$')+'R'](_0x3c2446,0x4),0x8);_0x408946[_0x579c3d]=_0x408946[_0x579c3d]|_0x27b846[_0x2a36('0x7c','g$*4')+'f'](_0x4b4a2b[_0x2a36('0xcd','g$*4')+_0x2a36('0x9c','sCn1')+'At'](_0x3c2446),_0x26725c);_0x3c2446++;}else{var _0x579c3d;var _0x1c2489=_0x4b4a2b[_0x2a36('0xab','Mza$')+'th'];var _0x5d877a=_0x27b846[_0x2a36('0x11d','Um^)')+'i'](_0x1c2489,0x8);var _0x249490=_0x27b846[_0x2a36('0x17','nHo#')+'X'](_0x27b846[_0x2a36('0xfb','0hl%')+'o'](_0x5d877a,_0x27b846[_0x2a36('0x4','nHo#')+'H'](_0x5d877a,0x40)),0x40);var _0x5be1ef=(_0x249490+0x1)*0x10;var _0x408946=_0x27b846[_0x2a36('0x19','Um^)')+'L'](Array,_0x5be1ef-0x1);var _0x26725c=0x0;var _0x3c2446=0x0;while(_0x27b846[_0x2a36('0x11a','0hl%')+'k'](_0x3c2446,_0x1c2489)){_0x579c3d=(_0x3c2446-_0x3c2446%0x4)/0x4;_0x26725c=_0x3c2446%0x4*0x8;_0x408946[_0x579c3d]=_0x408946[_0x579c3d]|_0x4b4a2b[_0x2a36('0xb2','RKPm')+_0x2a36('0x78','!N^6')+'At'](_0x3c2446)<<_0x26725c;_0x3c2446++;}_0x579c3d=_0x27b846[_0x2a36('0xb9','!lad')+'X'](_0x3c2446-_0x3c2446%0x4,0x4);_0x26725c=_0x27b846[_0x2a36('0xf2','MJC2')+'b'](_0x3c2446%0x4,0x8);_0x408946[_0x579c3d]=_0x27b846[_0x2a36('0x2a','cnTb')+'v'](_0x408946[_0x579c3d],_0x27b846[_0x2a36('0x23','RKPm')+'f'](0x80,_0x26725c));_0x408946[_0x27b846[_0x2a36('0x64','KohP')+'D'](_0x5be1ef,0x2)]=_0x1c2489<<0x3;_0x408946[_0x5be1ef-0x1]=_0x27b846[_0x2a36('0x7d','fj6o')+'i'](_0x1c2489,0x1d);return _0x408946;}}function _0x52ae0b(_0x368d8f){var _0x2a3d68='',_0x2e71d2='',_0x4fabb0,_0x27bea1;for(_0x27bea1=0x0;_0x27bea1<=0x3;_0x27bea1++){_0x4fabb0=_0x27b846[_0x2a36('0xf7','nHo#')+'P'](_0x27b846[_0x2a36('0x127','*VyA')+'H'](_0x368d8f,_0x27b846[_0x2a36('0x5e','cnTb')+'b'](_0x27bea1,0x8)),0xff);_0x2e71d2=_0x27b846[_0x2a36('0xba','0hl%')+'F']('0',_0x4fabb0[_0x2a36('0x114','CT)o')+_0x2a36('0x65','Fn7$')](0x10));_0x2a3d68=_0x27b846[_0x2a36('0x11b','g$*4')+'Y'](_0x2a3d68,_0x2e71d2[_0x2a36('0x8d','NK!y')+'tr'](_0x2e71d2[_0x2a36('0x12f','0hl%')+'th']-0x2,0x2));}return _0x2a3d68;}var _0x37f8ef=_0x27b846[_0x2a36('0xaa','RX*q')+'p'](Array);var _0x9ad472,_0x57eb7c,_0x31e09a,_0x428396,_0x57da6b,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7;var _0x6254a0=0x7,_0x4cfc14=0xc,_0xed0099=0x11,_0xfea25=0x16;var _0x21742d=0x5,_0x3aeb97=0x9,_0x357b3b=0xe,_0x5ac8da=0x14;var _0x5b5acd=0x4,_0x306674=0xb,_0x27e21a=0x10,_0x10ffae=0x17;var _0x57f0c7=0x6,_0x27805b=0xa,_0x1fa884=0xf,_0x420e72=0x15;_0x37f8ef=_0x431328(_0x35c1cd);_0x33f877=0x67452301;_0x2b3b86=0xefcdab89;_0x250aaf=0x98badcfe;_0x46dbc7=0x10325476;for(_0x9ad472=0x0;_0x27b846[_0x2a36('0x75','CT)o')+'S'](_0x9ad472,_0x37f8ef[_0x2a36('0x47','u)Zx')+'th']);_0x9ad472+=0x10){_0x57eb7c=_0x33f877;_0x31e09a=_0x2b3b86;_0x428396=_0x250aaf;_0x57da6b=_0x46dbc7;_0x33f877=_0x5f1ec4(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0xda','G]I%')+'J'](_0x9ad472,0x0)],_0x6254a0,0xd76aa478);_0x46dbc7=_0x27b846[_0x2a36('0xd0','NK!y')+'t'](_0x5f1ec4,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x82','8ePc')+'J'](_0x9ad472,0x1)],_0x4cfc14,0xe8c7b756);_0x250aaf=_0x27b846[_0x2a36('0xa0','MWa5')+'t'](_0x5f1ec4,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0xc3','(Gcy')+'f'](_0x9ad472,0x2)],_0xed0099,0x242070db);_0x2b3b86=_0x27b846[_0x2a36('0x6f','6dCB')+'t'](_0x5f1ec4,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x12e','w@7h')+'g'](_0x9ad472,0x3)],_0xfea25,0xc1bdceee);_0x33f877=_0x5f1ec4(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0xb5','!lad')+'g'](_0x9ad472,0x4)],_0x6254a0,0xf57c0faf);_0x46dbc7=_0x5f1ec4(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x2c','8mW]')+'g'](_0x9ad472,0x5)],_0x4cfc14,0x4787c62a);_0x250aaf=_0x27b846[_0x2a36('0xfa','54hK')+'t'](_0x5f1ec4,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0x6],_0xed0099,0xa8304613);_0x2b3b86=_0x27b846[_0x2a36('0x4b','ET&B')+'d'](_0x5f1ec4,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0x7],_0xfea25,0xfd469501);_0x33f877=_0x5f1ec4(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x8],_0x6254a0,0x698098d8);_0x46dbc7=_0x27b846[_0x2a36('0x6e','sCn1')+'M'](_0x5f1ec4,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x117','w@7h')+'Z'](_0x9ad472,0x9)],_0x4cfc14,0x8b44f7af);_0x250aaf=_0x27b846[_0x2a36('0x56','XR!r')+'M'](_0x5f1ec4,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xa],_0xed0099,0xffff5bb1);_0x2b3b86=_0x5f1ec4(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0xb],_0xfea25,0x895cd7be);_0x33f877=_0x27b846[_0x2a36('0xf8','Um^)')+'M'](_0x5f1ec4,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0x143','pbz1')+'C'](_0x9ad472,0xc)],_0x6254a0,0x6b901122);_0x46dbc7=_0x5f1ec4(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0xb4','WWZM')+'Z'](_0x9ad472,0xd)],_0x4cfc14,0xfd987193);_0x250aaf=_0x5f1ec4(_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0x5d','k9V8')+'c'](_0x9ad472,0xe)],_0xed0099,0xa679438e);_0x2b3b86=_0x5f1ec4(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0xf],_0xfea25,0x49b40821);_0x33f877=_0x50d58f(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0xe2','(Gcy')+'c'](_0x9ad472,0x1)],_0x21742d,0xf61e2562);_0x46dbc7=_0x50d58f(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0xf0','8ePc')+'c'](_0x9ad472,0x6)],_0x3aeb97,0xc040b340);_0x250aaf=_0x27b846[_0x2a36('0xa8','!lad')+'M'](_0x50d58f,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xb],_0x357b3b,0x265e5a51);_0x2b3b86=_0x27b846[_0x2a36('0xe1','8mW]')+'M'](_0x50d58f,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x136','WUwR')+'c'](_0x9ad472,0x0)],_0x5ac8da,0xe9b6c7aa);_0x33f877=_0x27b846[_0x2a36('0x14','ET&B')+'v'](_0x50d58f,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x5],_0x21742d,0xd62f105d);_0x46dbc7=_0x50d58f(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0xa],_0x3aeb97,0x2441453);_0x250aaf=_0x27b846[_0x2a36('0xe9','Fn7$')+'W'](_0x50d58f,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xf],_0x357b3b,0xd8a1e681);_0x2b3b86=_0x27b846[_0x2a36('0x1d','&1fo')+'W'](_0x50d58f,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x7','8sr^')+'c'](_0x9ad472,0x4)],_0x5ac8da,0xe7d3fbc8);_0x33f877=_0x27b846[_0x2a36('0x105','@GHf')+'W'](_0x50d58f,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x9],_0x21742d,0x21e1cde6);_0x46dbc7=_0x27b846[_0x2a36('0x113','k9V8')+'j'](_0x50d58f,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x107','^EXY')+'c'](_0x9ad472,0xe)],_0x3aeb97,0xc33707d6);_0x250aaf=_0x27b846[_0x2a36('0x2','1W0i')+'s'](_0x50d58f,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0x0','!lad')+'t'](_0x9ad472,0x3)],_0x357b3b,0xf4d50d87);_0x2b3b86=_0x27b846[_0x2a36('0x66','MJC2')+'s'](_0x50d58f,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0x8],_0x5ac8da,0x455a14ed);_0x33f877=_0x27b846[_0x2a36('0x12c','nHo#')+'s'](_0x50d58f,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0xd],_0x21742d,0xa9e3e905);_0x46dbc7=_0x27b846[_0x2a36('0x4a','@GHf')+'Y'](_0x50d58f,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0x2],_0x3aeb97,0xfcefa3f8);_0x250aaf=_0x27b846[_0x2a36('0xdd','8sr^')+'J'](_0x50d58f,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0x1e','fj6o')+'t'](_0x9ad472,0x7)],_0x357b3b,0x676f02d9);_0x2b3b86=_0x27b846[_0x2a36('0xf9','KohP')+'x'](_0x50d58f,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0xe3','^EXY')+'t'](_0x9ad472,0xc)],_0x5ac8da,0x8d2a4c8a);_0x33f877=_0x4d85c0(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x5],_0x5b5acd,0xfffa3942);_0x46dbc7=_0x27b846[_0x2a36('0xd8','74L%')+'u'](_0x4d85c0,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0x8],_0x306674,0x8771f681);_0x250aaf=_0x27b846[_0x2a36('0x94','#XP9')+'u'](_0x4d85c0,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xb],_0x27e21a,0x6d9d6122);_0x2b3b86=_0x27b846[_0x2a36('0x132','sCn1')+'O'](_0x4d85c0,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0xa7','g$*4')+'t'](_0x9ad472,0xe)],_0x10ffae,0xfde5380c);_0x33f877=_0x4d85c0(_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x1],_0x5b5acd,0xa4beea44);_0x46dbc7=_0x4d85c0(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0x4],_0x306674,0x4bdecfa9);_0x250aaf=_0x4d85c0(_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0x7],_0x27e21a,0xf6bb4b60);_0x2b3b86=_0x4d85c0(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0xa],_0x10ffae,0xbebfbc70);_0x33f877=_0x27b846[_0x2a36('0x7f','MWa5')+'N'](_0x4d85c0,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0xcb','54hK')+'y'](_0x9ad472,0xd)],_0x5b5acd,0x289b7ec6);_0x46dbc7=_0x4d85c0(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x11','[WEF')+'V'](_0x9ad472,0x0)],_0x306674,0xeaa127fa);_0x250aaf=_0x27b846[_0x2a36('0x123','jG(h')+'N'](_0x4d85c0,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0x8','k9V8')+'V'](_0x9ad472,0x3)],_0x27e21a,0xd4ef3085);_0x2b3b86=_0x4d85c0(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x13d','RX*q')+'B'](_0x9ad472,0x6)],_0x10ffae,0x4881d05);_0x33f877=_0x27b846[_0x2a36('0x49','u)Zx')+'I'](_0x4d85c0,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0xa6','ET&B')+'O'](_0x9ad472,0x9)],_0x5b5acd,0xd9d4d039);_0x46dbc7=_0x4d85c0(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x45','#XP9')+'O'](_0x9ad472,0xc)],_0x306674,0xe6db99e5);_0x250aaf=_0x4d85c0(_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xf],_0x27e21a,0x1fa27cf8);_0x2b3b86=_0x4d85c0(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x73','nHo#')+'O'](_0x9ad472,0x2)],_0x10ffae,0xc4ac5665);_0x33f877=_0x27b846[_0x2a36('0x98','RKPm')+'Q'](_0x50f986,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x0],_0x57f0c7,0xf4292244);_0x46dbc7=_0x50f986(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0x7],_0x27805b,0x432aff97);_0x250aaf=_0x27b846[_0x2a36('0x5','@GHf')+'s'](_0x50f986,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xe],_0x1fa884,0xab9423a7);_0x2b3b86=_0x50f986(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0x5],_0x420e72,0xfc93a039);_0x33f877=_0x27b846[_0x2a36('0x67','KohP')+'s'](_0x50f986,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0x37','@GHf')+'w'](_0x9ad472,0xc)],_0x57f0c7,0x655b59c3);_0x46dbc7=_0x50f986(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x101','k9V8')+'x'](_0x9ad472,0x3)],_0x27805b,0x8f0ccc92);_0x250aaf=_0x50f986(_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x9ad472+0xa],_0x1fa884,0xffeff47d);_0x2b3b86=_0x27b846[_0x2a36('0x40','Um^)')+'s'](_0x50f986,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x50','WUwR')+'i'](_0x9ad472,0x1)],_0x420e72,0x85845dd1);_0x33f877=_0x27b846[_0x2a36('0x8e','1W0i')+'k'](_0x50f986,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x9ad472+0x8],_0x57f0c7,0x6fa87e4f);_0x46dbc7=_0x27b846[_0x2a36('0x12b','jG(h')+'k'](_0x50f986,_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x9ad472+0xf],_0x27805b,0xfe2ce6e0);_0x250aaf=_0x27b846[_0x2a36('0xa2','g$*4')+'V'](_0x50f986,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0x146','g$*4')+'x'](_0x9ad472,0x6)],_0x1fa884,0xa3014314);_0x2b3b86=_0x50f986(_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x27b846[_0x2a36('0x13c','Fn7$')+'x'](_0x9ad472,0xd)],_0x420e72,0x4e0811a1);_0x33f877=_0x27b846[_0x2a36('0xce','w@7h')+'V'](_0x50f986,_0x33f877,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x37f8ef[_0x27b846[_0x2a36('0x16','KohP')+'x'](_0x9ad472,0x4)],_0x57f0c7,0xf7537e82);_0x46dbc7=_0x50f986(_0x46dbc7,_0x33f877,_0x2b3b86,_0x250aaf,_0x37f8ef[_0x27b846[_0x2a36('0x3e','pbz1')+'x'](_0x9ad472,0xb)],_0x27805b,0xbd3af235);_0x250aaf=_0x27b846[_0x2a36('0x145','WUwR')+'p'](_0x50f986,_0x250aaf,_0x46dbc7,_0x33f877,_0x2b3b86,_0x37f8ef[_0x27b846[_0x2a36('0xa5','NK!y')+'x'](_0x9ad472,0x2)],_0x1fa884,0x2ad7d2bb);_0x2b3b86=_0x27b846[_0x2a36('0x9e','8ePc')+'p'](_0x50f986,_0x2b3b86,_0x250aaf,_0x46dbc7,_0x33f877,_0x37f8ef[_0x9ad472+0x9],_0x420e72,0xeb86d391);_0x33f877=_0x10618e(_0x33f877,_0x57eb7c);_0x2b3b86=_0x27b846[_0x2a36('0x139','(Gcy')+'L'](_0x10618e,_0x2b3b86,_0x31e09a);_0x250aaf=_0x10618e(_0x250aaf,_0x428396);_0x46dbc7=_0x27b846[_0x2a36('0x81','D##Z')+'L'](_0x10618e,_0x46dbc7,_0x57da6b);}var _0xff4062=_0x27b846[_0x2a36('0x55','MWa5')+'C'](_0x27b846[_0x2a36('0xcc','D##Z')+'r'](_0x27b846[_0x2a36('0x108','ET&B')+'g'](_0x52ae0b,_0x33f877),_0x52ae0b(_0x2b3b86)),_0x27b846[_0x2a36('0x10d','Oo24')+'g'](_0x52ae0b,_0x250aaf))+_0x27b846[_0x2a36('0x144','*VyA')+'E'](_0x52ae0b,_0x46dbc7);return _0xff4062[_0x2a36('0x124','CT)o')+_0x2a36('0x63','WUwR')+_0x2a36('0xdf','w@7h')]();};function go(_0x31cf1f){var _0x1266c2={};_0x1266c2[_0x2a36('0x138','w*YK')+'N']=_0x2a36('0x142','WWZM')+_0x2a36('0x84','@GHf');_0x1266c2[_0x2a36('0xc','54hK')+'j']=function(_0x3eac44,_0x259c4e){return _0x3eac44<_0x259c4e;};_0x1266c2[_0x2a36('0x131','&1fo')+'q']=function(_0x11f903,_0x2b4b3f){return _0x11f903!=_0x2b4b3f;};_0x1266c2[_0x2a36('0xd2','D##Z')+'M']=function(_0x472edd,_0x23ca5e){return _0x472edd+_0x23ca5e;};_0x1266c2[_0x2a36('0x5f','w*YK')+'J']=function(_0xf90608,_0xb8fa65){return _0xf90608>_0xb8fa65;};_0x1266c2[_0x2a36('0x10f','8mW]')+'M']=_0x2a36('0xe','RX*q')+_0x2a36('0xc6','D##Z')+_0x2a36('0x13e','*VyA')+'。';_0x1266c2[_0x2a36('0x60','Oo24')+'p']=function(_0x161533,_0x291075){return _0x161533-_0x291075;};_0x1266c2[_0x2a36('0xd9','ET&B')+'Z']=_0x2a36('0x5a','MJC2')+_0x2a36('0x2b','1W0i')+'=';_0x1266c2[_0x2a36('0xe7','Um^)')+'s']=function(_0x400cb1,_0x5523ff,_0x57272c){return _0x400cb1(_0x5523ff,_0x57272c);};_0x1266c2[_0x2a36('0x126','WWZM')+'D']=_0x2a36('0x59','k9V8')+'失败';var _0x396bf6=_0x1266c2;function _0x57eb87(){var _0x55895e=window[_0x2a36('0x6b','8mW]')+_0x2a36('0x3f','MWa5')+'r'][_0x2a36('0x52','w*YK')+_0x2a36('0x10','54hK')+'t'],_0x1a8a3f=[_0x396bf6[_0x2a36('0x1f','&1fo')+'N']];for(var _0x4248e4=0x0;_0x396bf6[_0x2a36('0x112','pbz1')+'j'](_0x4248e4,_0x1a8a3f[_0x2a36('0x13a','Um^)')+'th']);_0x4248e4++){if(_0x396bf6[_0x2a36('0x27','w@7h')+'q'](_0x55895e[_0x2a36('0x1a','D##Z')+_0x2a36('0xc0','^EXY')](_0x1a8a3f[_0x4248e4]),-0x1)){return!![];}}if(window[_0x2a36('0xa9','cnTb')+_0x2a36('0x4e','jG(h')+_0x2a36('0xf6','XR!r')]||window[_0x2a36('0x34','XR!r')+_0x2a36('0xad','WUwR')]||window[_0x2a36('0x86','u)Zx')+_0x2a36('0x53','MWa5')]||window[_0x2a36('0x10a','54hK')+_0x2a36('0x118','G]I%')+'r'][_0x2a36('0x8f','KohP')+_0x2a36('0x3a','u)Zx')+'r']||window[_0x2a36('0xdc','WWZM')+_0x2a36('0xc8','(Gcy')+'r'][_0x2a36('0x36','D##Z')+_0x2a36('0x141','WWZM')+_0x2a36('0x92','fj6o')+_0x2a36('0x9d','8ePc')+'e']||window[_0x2a36('0xe8','6dCB')+_0x2a36('0x106','#XP9')+'r'][_0x2a36('0xb8','@GHf')+_0x2a36('0x76','^EXY')+_0x2a36('0xfe','pbz1')+_0x2a36('0x120','NK!y')+_0x2a36('0x8c','8ePc')]){return!![];}};if(_0x57eb87()){return;}var _0x5c13aa=new Date(),_0x37c620=![];function _0x5424b6(_0x784b1f,_0x2ab0b0){var _0x2e0724={};_0x2e0724[_0x2a36('0x8a','xz]x')+'Q']=function(_0x4f20c9,_0x10e848){return _0x4f20c9*_0x10e848;};_0x2e0724[_0x2a36('0xfd','Um^)')+'y']=function(_0x36d5f3,_0x4d3d49){return _0x36d5f3-_0x4d3d49;};var _0x100cd0=_0x2e0724;var _0xd8f11a=_0x31cf1f[_0x2a36('0x129','w*YK')+'s'][_0x2a36('0x26','sCn1')+'th'];for(var _0x578de5=0x0;_0x578de5<_0xd8f11a;_0x578de5++){for(var _0x67dc03=0x0;_0x396bf6[_0x2a36('0xd1','(Gcy')+'j'](_0x67dc03,_0xd8f11a);_0x67dc03++){var _0xa6a2a1=_0x396bf6[_0x2a36('0x96','74L%')+'M'](_0x2ab0b0[0x0],_0x31cf1f[_0x2a36('0x4c','D##Z')+'s'][_0x2a36('0x134','#XP9')+'tr'](_0x578de5,0x1))+_0x31cf1f[_0x2a36('0xf4','@GHf')+'s'][_0x2a36('0x100','!N^6')+'tr'](_0x67dc03,0x1)+_0x2ab0b0[0x1];if(!_0x37c620&&_0x396bf6[_0x2a36('0xeb','RKPm')+'J'](new Date()-_0x5c13aa,0x5dc)){if(_0x2a36('0x15','8mW]')+'S'!==_0x2a36('0x87','RX*q')+'S'){lByte=lValue>>>_0x100cd0[_0x2a36('0x20','Mza$')+'Q'](lCount,0x8)&0xff;WordToHexValue_temp='0'+lByte[_0x2a36('0x119','RX*q')+_0x2a36('0xf5','[WEF')](0x10);WordToHexValue=WordToHexValue+WordToHexValue_temp[_0x2a36('0x11e','^EXY')+'tr'](_0x100cd0[_0x2a36('0xc9','xz]x')+'y'](WordToHexValue_temp[_0x2a36('0xd4','pbz1')+'th'],0x2),0x2);}else{alert(_0x396bf6[_0x2a36('0x61','RX*q')+'M']);_0x37c620=!![];}}if(hash(_0xa6a2a1)==_0x784b1f){return[_0xa6a2a1,_0x396bf6[_0x2a36('0x79','D##Z')+'p'](new Date(),_0x5c13aa)];}}}};var _0x39b010=_0x396bf6[_0x2a36('0x57','WWZM')+'s'](_0x5424b6,_0x31cf1f['ct'],_0x31cf1f[_0x2a36('0x46','Mza$')]);if(_0x39b010){var _0x1ec1df;if(_0x31cf1f['wt']){_0x1ec1df=parseInt(_0x31cf1f['wt'])>_0x39b010[0x1]?parseInt(_0x31cf1f['wt'])-_0x39b010[0x1]:0x1f4;}else{_0x1ec1df=0x5dc;}setTimeout(function(){document[_0x2a36('0xe6','#XP9')+'ie']=_0x396bf6[_0x2a36('0xe4','WUwR')+'M'](_0x396bf6[_0x2a36('0x1b','RX*q')+'M'](_0x396bf6[_0x2a36('0xca','1W0i')+'M'](_0x396bf6[_0x2a36('0x33','SKmL')+'M'](_0x396bf6[_0x2a36('0xe4','WUwR')+'M'](_0x31cf1f['tn'],'='),_0x39b010[0x0]),_0x396bf6[_0x2a36('0x109','1W0i')+'Z']),_0x31cf1f['vt']),_0x2a36('0x68','ET&B')+_0x2a36('0x54','8mW]')+'\x20/');location[_0x2a36('0x102','G]I%')]=location[_0x2a36('0xee','6dCB')+_0x2a36('0xbc','fj6o')]+location[_0x2a36('0x5b','!lad')+'ch'];},_0x1ec1df);}else{alert(_0x396bf6[_0x2a36('0xaf','k9V8')+'D']);}};go({"bts":["1600342774.885|0|OiV","7RX5sXpvy2sA7izwmZzPzM%3D"],"chars":"EiewupIGSGKcUxcMdlGSDW","ct":"db8ca508fd98f0c8083856eebb648a4e","ha":"md5","tn":"__jsl_clearance","vt":"3600","wt":"1500"})</script>

逆向JS:

  1. 格式化JS代码
  2. node 运行js文件
  3. 发现有 window document location alert等 node 环境没有的属性
  4. 使用 jsdom 解决第三步的问题

    1. 安装 npm i jsdom --save
    2. 修改 js 文件

      • 前面添加 如下代码:

        1
        2
        3
        4
        5
        6
        7
        8
        const jsdom = require("jsdom");
        const { JSDOM } = jsdom;
        const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);
        window = dom.window;
        document = window.document;
        location = window.location;
        XMLHttpRequest = window.XMLHttpRequest;
        alert = console.log;
      • 替换location 相关代码:

        1
        2
        3
        4
        5
        6
        7
        location[_0x2a36("0x102", "G]I%")] =
        location[_0x2a36("0xee", "6dCB") + _0x2a36("0xbc", "fj6o")] +
        location[_0x2a36("0x5b", "!lad") + "ch"];
        ```
        修改为:
        ```js
        console.log(document['cookie']);
  5. 再次 node 运行js文件

    1
    2
    > node t2.js
    __jsl_clearance=1600342774.885|0|OiVew7RX5sXpvy2sA7izwmZzPzM%3D

环境中运行:

1
2
3
4
5
6
>>> import re
>>> data = response.text
>>> js = re.findall('<script>(.*?)</script>', data)[0]

>>> js_added_head = "const jsdom = require('jsdom');const { JSDOM } = jsdom;const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);window = dom.window;document = window.document;location = window.location;XMLHttpRequest = window.XMLHttpRequest;alert = console.log;"
>>> js = js_added_head + js

找到 location 赋值的正则表达式:

1
location\[.+\]=[^;]+;
1
2
>>> re.findall('location\[.+\]=[^;]+;', js)[0]
"location[_0x2a36('0x102','G]I%')]=location[_0x2a36('0xee','6dCB')+_0x2a36('0xbc','fj6o')]+location[_0x2a36('0x5b','!lad')+'ch'];"

替换:

1
js = re.sub(r'location\[.+\]=[^;]+;', "console.log(document['cookie']);", js)

运行js:

需要npm环境,安装jsdom

node_modules 路径:

/Users/admin/workspace/exercises/python/scrapy/tutorial/js-reverse/node_modules

代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
>>> import execjs

>>> ct = execjs.compile(js, cwd=r'/Users/admin/workspace/exercises/python/scrapy/tutorial/js-reverse/node_modules')

>>> execjs.eval(js, cwd=r'/Users/admin/workspace/exercises/python/scrapy/tutorial/js-reverse/node_modules')
Traceback (most recent call last):
File "<input>", line 1, in <module>
execjs.eval(js, cwd=r'/Users/admin/workspace/exercises/python/scrapy/tutorial/js-reverse/node_modules')
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/__init__.py", line 51, in eval
return get().eval(source, cwd)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_abstract_runtime.py", line 25, in eval
return self.compile('', cwd=cwd).eval(source)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_abstract_runtime_context.py", line 27, in eval
return self._eval(source)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_external_runtime.py", line 78, in _eval
return self.exec_(code)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_abstract_runtime_context.py", line 18, in exec_
return self._exec_(source)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_external_runtime.py", line 88, in _exec_
return self._extract_result(output)
File "/Users/admin/.virtualenvs/scrapy/lib/python3.7/site-packages/execjs/_external_runtime.py", line 167, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: Unexpected token 'const'

遇见 语法错误问题

使用 node 试试:

1
2
3
>>> with open(r'js-reverse/temp1.js', 'w+', encoding='utf-8') as f:
... f.write(js)
...
1
2
node temp1.js
__jsl_clearance=1600342774.885|0|OiVew7RX5sXpvy2sA7izwmZzPzM%3D

但 node 运行正常

修改 js_added_head

1
js_added_head = "const document = { cookie: {} };const location = {};const navigator = {userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0'};const window = { document, location, navigator };const alert = console.log;"

使用 execjs 执行还是不行, node 运行正常

使用 python 执行shell命令:

1
2
3
4
5
6
7
8
import subprocess

>>> ret=subprocess.getstatusoutput("node js-reverse/temp1.js")
>>> ret
(0, '__jsl_clearance=1600342774.885|0|OiVew7RX5sXpvy2sA7izwmZzPzM%3D;Max-age=3600; path = /')
>>> ret[1]
'__jsl_clearance=1600342774.885|0|OiVew7RX5sXpvy2sA7izwmZzPzM%3D;Max-age=3600; path = /'
>>> jsl_clearance=ret[1].split(";")[0].split("=")[1]

整理:

1
2
3
4
5
6
7
8
9
10
11
def getJsCookie2T(self, response):
data = response.text
js = re.findall('<script>(.*?)</script>', data)[0]
js_added_head = "const document = { cookie: {} };const location = {};const navigator = {userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0'};const window = { document, location, navigator };const alert = console.log;"
js = js_added_head + js
js = re.sub(r'location\[.+\]=[^;]+;', "console.log(document['cookie']);", js)
with open(r'js-reverse/temp1.js', 'w+', encoding='utf-8') as f:
f.write(js)
ret=subprocess.getstatusoutput("node js-reverse/temp1.js")
jsl_clearance=ret[1].split(";")[0].split("=")[1]
return jsl_clearance

Powered by Hexo and Hexo-theme-hiker

Copyright © 2013 - 2021 朝着牛逼的道路一路狂奔 All Rights Reserved.

访客数 : | 访问量 :