diff --git a/dt.js b/dt.js new file mode 100644 index 0000000..b342767 --- /dev/null +++ b/dt.js @@ -0,0 +1 @@ +const _0x40b768=_0x1c6c,_0x25f950=_0x1c6c,_0x5f1bb6=_0x1c6c;(function(_0x3bddc0,_0x4002d1){const _0x2889da=_0x1c6c,_0x5ed727=_0x1c6c,_0x572ae5=_0x1c6c,_0x44b0c9=_0x1c6c,_0x5616a0=_0x1c6c,_0x5269d1=_0x1c6c,_0x48dcad=_0x1c6c,_0x4fbe70=_0x1c6c,_0x4b0a25=_0x1c6c,_0x1cd48a=_0x1c6c,_0x1bbb0b=_0x3bddc0();while(!![]){try{const _0x2de12f=-parseInt(_0x2889da(0x170))/0x1+-parseInt(_0x5ed727(0x15d))/0x2+-parseInt(_0x5ed727(0x168))/0x3*(parseInt(_0x44b0c9(0x191))/0x4)+-parseInt(_0x5616a0(0x12b))/0x5+-parseInt(_0x2889da(0x121))/0x6*(-parseInt(_0x5616a0(0x13c))/0x7)+-parseInt(_0x44b0c9(0x188))/0x8*(-parseInt(_0x4b0a25(0x158))/0x9)+parseInt(_0x4fbe70(0x166))/0xa;if(_0x2de12f===_0x4002d1)break;else _0x1bbb0b['push'](_0x1bbb0b['shift']());}catch(_0x566f73){_0x1bbb0b['push'](_0x1bbb0b['shift']());}}}(_0x1b49,0x6547e));function _0x1b49(){const _0x1502c8=['encourage/game/quiz/round/answer/upload','statusCode','getScript','lodash_set','set-cookie','post','url','24fVRjCb','getjson','reduce','answer','mediaUrl','http','encourage/game/quiz/home','isArray','status','1907356WKIahK','test','CookieJar','trim','isSurge','/v1/scripting/evaluate','catch',',\x20开始!','Content-Type','setdata','read','write','http://106.52.76.34/answer?question=','undefined','tough-cookie','opts','box.dat','done','http://','readFileSync','redirect','1938cDchSS','length','get','POST','logs','send','ksdt','openUrl','parse','match','340180tTKkJQ','cookieJar','setval','msg','call','stack','split','logSeparator','isNode','then','replace','encourage/game/quiz/round/kickoff','getHours','loaddata','substr','isMute',',\x20错误!','10409ekbCkl','log','startTime','path','got','floor','slice','setValueForKey','media-url','isQuanX','toString','cwd','application/json','open-url','dataFile','isLoon','body','push','exec','==============📣系统通知📣==============','.$1','stringify','valueForKey','exports','finally','getMinutes','existsSync','questionDetail','1381185VZhCrM','getval','Content-Length','headers','okhttp/3.12.2','452232gicpRB','assign','concat','getDate','getdata','resolve','indexOf','initGotEnv','env','10105270rivqYq','fetch','3WNKrjZ','setjson','getTime','method','isNeedRewrite','abs','nextQuestionDetail','GET','765386pqhzuQ','application/x-www-form-urlencoded','join','timeout','lodash_get','Cookie','cktough','ckjar','@chavy_boxjs_userCfgs.httpapi_timeout','getMonth','writedata','data','logErr','name','wait','答案:','writeFileSync'];_0x1b49=function(){return _0x1502c8;};return _0x1b49();}const $=new Env(_0x40b768(0x127));!(async()=>{const _0x4059d7=_0x40b768;typeof $request!==_0x4059d7(0x19e)&&await GetRewrite();})()[_0x40b768(0x197)](_0x18de89=>console['log'](_0x18de89))[_0x40b768(0x154)](()=>$['done']());function _0x1c6c(_0x49981e,_0x221a62){const _0x1b4923=_0x1b49();return _0x1c6c=function(_0x1c6c61,_0x3f2227){_0x1c6c61=_0x1c6c61-0x11e;let _0x40e79c=_0x1b4923[_0x1c6c61];return _0x40e79c;},_0x1c6c(_0x49981e,_0x221a62);}async function GetRewrite(){const _0x953e2=_0x5f1bb6,_0x4d9c36=_0x40b768,_0xcb19f8=_0x40b768,_0x93a279=_0x40b768,_0x4d7730=_0x5f1bb6,_0x507837=_0x40b768,_0x22a002=_0x25f950,_0x2c4ed8=_0x40b768,_0x5181a2=_0x5f1bb6,_0xf2b0ab=_0x5f1bb6,_0x2cf9d3=_0x25f950,_0x1faa5c=_0x5f1bb6;if($request[_0x953e2(0x187)]['indexOf'](_0x953e2(0x136))>-0x1){var _0x138a08=JSON[_0xcb19f8(0x129)]($response['body']);await execNewtask(_0x138a08[_0x4d9c36(0x17b)][_0x4d9c36(0x157)]['question']);}if($request[_0x507837(0x187)]['indexOf'](_0xcb19f8(0x181))>-0x1){var _0x138a08=JSON['parse']($response[_0x4d7730(0x14c)]);await execNewtask(_0x138a08['data'][_0x507837(0x16e)][_0x93a279(0x157)]['question']);}if($request['url'][_0x5181a2(0x163)](_0x93a279(0x18e))>-0x1){}}async function execNewtask(_0x27cb5c){return new Promise(_0x2439f5=>{const _0x2fde67=_0x1c6c,_0xe7dc0b=_0x1c6c,_0x36c912=_0x1c6c,_0x2463dd=_0x1c6c;$[_0x2fde67(0x123)]({'url':_0x2fde67(0x19d)+encodeURIComponent(_0x27cb5c),'headers':{'User-Agent':_0x2fde67(0x15c),'device-platform':'android','Content-Type':_0xe7dc0b(0x148)}},async(_0xabdfce,_0x1490d6,_0x3bf28f)=>{const _0xbe7724=_0x2463dd,_0xbc04c5=_0x36c912,_0x2a15c0=_0xe7dc0b,_0x180546=_0x2463dd,_0x5981e2=_0x2fde67,_0x46c7df=_0x2463dd,_0x2d239f=_0x2fde67,_0x468c4b=_0x2fde67,_0x5536da=_0xe7dc0b;try{let _0x4f6f92=JSON[_0xbe7724(0x129)](_0x3bf28f);$[_0xbe7724(0x13d)](_0x2a15c0(0x17f)+_0x4f6f92[_0x2a15c0(0x17b)][_0x2a15c0(0x18b)]),$[_0x180546(0x12e)](_0x180546(0x17f)+_0x4f6f92[_0x468c4b(0x17b)]['answer']);}catch(_0x9f18df){$[_0x2a15c0(0x17c)](_0x9f18df);}finally{_0x2439f5('');}});});}function Env(_0x5d1735,_0x50e09d){const _0x18730d=_0x25f950,_0x1af02e=_0x25f950,_0xd4e74e=_0x40b768,_0x4c8d38=_0x40b768,_0x2b5d8f=_0x40b768,_0x53a08c=_0x40b768,_0x9075c1=_0x25f950,_0x59bde4=_0x5f1bb6,_0x5f15bd=_0x5f1bb6,_0x2b4585=_0x25f950,_0x2c5885=_0x40b768,_0x6831ec=_0x40b768,_0x4eb183=_0x25f950,_0x40d7c3=_0x5f1bb6,_0x37945e=_0x40b768,_0x53bd4b=_0x5f1bb6,_0x1e11e8=_0x40b768,_0x1986b1=_0x25f950,_0x2fa33e=_0x5f1bb6,_0x345531=_0x25f950,_0x122c4f=_0x40b768,_0x1cf433=_0x5f1bb6,_0x22f064=_0x25f950,_0x5a2da9=_0x40b768;class _0x47282a{constructor(_0x4874f5){const _0x8a764c=_0x1c6c;this[_0x8a764c(0x165)]=_0x4874f5;}[_0x18730d(0x126)](_0x1e3a9f,_0x474320=_0x18730d(0x16f)){const _0x425df5=_0x18730d,_0x34616f=_0x1af02e;_0x1e3a9f='string'==typeof _0x1e3a9f?{'url':_0x1e3a9f}:_0x1e3a9f;let _0x210946=this[_0x425df5(0x123)];return _0x34616f(0x124)===_0x474320&&(_0x210946=this['post']),new Promise((_0x6e5412,_0x26bf32)=>{_0x210946['call'](this,_0x1e3a9f,(_0x461d2f,_0x5e68e1,_0x17eced)=>{_0x461d2f?_0x26bf32(_0x461d2f):_0x6e5412(_0x5e68e1);});});}[_0x18730d(0x123)](_0x1177fc){const _0x3ed724=_0x1af02e,_0x3b7c51=_0xd4e74e,_0xf20e4c=_0xd4e74e;return this[_0x3ed724(0x126)][_0x3b7c51(0x12f)](this[_0x3ed724(0x165)],_0x1177fc);}[_0x1af02e(0x186)](_0x156021){const _0x34e5a0=_0x1af02e,_0x4e3c81=_0x4c8d38,_0x2251a1=_0x1af02e,_0x551bef=_0x18730d;return this[_0x34e5a0(0x126)][_0x4e3c81(0x12f)](this[_0x2251a1(0x165)],_0x156021,_0x34e5a0(0x124));}}return new class{constructor(_0x50e7aa,_0x269191){const _0x3325d1=_0xd4e74e,_0xf9706f=_0x4c8d38,_0x5c373e=_0xd4e74e,_0x1916ee=_0x4c8d38,_0x5e2584=_0xd4e74e,_0x3a86b8=_0xd4e74e,_0x440d57=_0x1af02e,_0x32e127=_0xd4e74e,_0x3fc596=_0x4c8d38,_0xce2b2c=_0x1af02e,_0x5980f8=_0x4c8d38,_0x5ce98e=_0x1af02e;this[_0x3325d1(0x17d)]=_0x50e7aa,this[_0x3325d1(0x18d)]=new _0x47282a(this),this['data']=null,this[_0xf9706f(0x14a)]=_0x5c373e(0x1a1),this['logs']=[],this[_0x1916ee(0x13a)]=!0x1,this[_0xf9706f(0x16c)]=!0x1,this['logSeparator']='\x0a',this[_0x1916ee(0x13e)]=new Date()[_0x5e2584(0x16a)](),Object[_0x3325d1(0x15e)](this,_0x269191),this[_0x5c373e(0x13d)]('','🔔'+this[_0x32e127(0x17d)]+_0x3fc596(0x198));}[_0x2b5d8f(0x133)](){const _0x8cd640=_0x1af02e,_0x386597=_0x2b5d8f;return _0x8cd640(0x19e)!=typeof module&&!!module[_0x8cd640(0x153)];}['isQuanX'](){const _0x4f6983=_0x2b5d8f;return _0x4f6983(0x19e)!=typeof $task;}[_0xd4e74e(0x195)](){const _0x582970=_0x53a08c;return'undefined'!=typeof $httpClient&&_0x582970(0x19e)==typeof $loon;}[_0x4c8d38(0x14b)](){const _0x27e452=_0x4c8d38;return _0x27e452(0x19e)!=typeof $loon;}['toObj'](_0x11a1b1,_0x37dece=null){const _0x48d467=_0x53a08c;try{return JSON[_0x48d467(0x129)](_0x11a1b1);}catch{return _0x37dece;}}['toStr'](_0x2ebad3,_0x426a83=null){const _0x27311e=_0x18730d;try{return JSON[_0x27311e(0x151)](_0x2ebad3);}catch{return _0x426a83;}}[_0x53a08c(0x189)](_0x31e927,_0x5a8fd1){const _0x582aef=_0x1af02e,_0xeb4544=_0x18730d,_0x354023=_0x53a08c;let _0x2366ce=_0x5a8fd1;const _0x230ffc=this[_0x582aef(0x161)](_0x31e927);if(_0x230ffc)try{_0x2366ce=JSON[_0x582aef(0x129)](this[_0xeb4544(0x161)](_0x31e927));}catch{}return _0x2366ce;}[_0x9075c1(0x169)](_0x12f417,_0x3e822e){const _0x19e92d=_0x2b5d8f;try{return this['setdata'](JSON[_0x19e92d(0x151)](_0x12f417),_0x3e822e);}catch{return!0x1;}}[_0x4c8d38(0x183)](_0x487284){return new Promise(_0x377f27=>{const _0x308168=_0x1c6c;this[_0x308168(0x123)]({'url':_0x487284},(_0x1b5b83,_0x1c8603,_0x588cdf)=>_0x377f27(_0x588cdf));});}['runScript'](_0x22ba78,_0x4d37dd){const _0x5dea3d=_0x18730d,_0x7fbf1d=_0x5f15bd;return new Promise(_0x3a4cac=>{const _0x36f30f=_0x1c6c,_0x539e8a=_0x1c6c,_0x54773c=_0x1c6c,_0x9c9b6d=_0x1c6c,_0x18e215=_0x1c6c,_0x1af622=_0x1c6c,_0x3c8b52=_0x1c6c,_0x144f88=_0x1c6c,_0x349f3b=_0x1c6c,_0x578d85=_0x1c6c,_0x1b35c8=_0x1c6c;let _0x372dc3=this[_0x36f30f(0x161)]('@chavy_boxjs_userCfgs.httpapi');_0x372dc3=_0x372dc3?_0x372dc3[_0x539e8a(0x135)](/\n/g,'')[_0x539e8a(0x194)]():_0x372dc3;let _0x22baf8=this[_0x539e8a(0x161)](_0x9c9b6d(0x178));_0x22baf8=_0x22baf8?0x1*_0x22baf8:0x14,_0x22baf8=_0x4d37dd&&_0x4d37dd[_0x9c9b6d(0x173)]?_0x4d37dd[_0x36f30f(0x173)]:_0x22baf8;const [_0x16b8ff,_0x1d21f1]=_0x372dc3[_0x539e8a(0x131)]('@'),_0x2467ed={'url':_0x144f88(0x11e)+_0x1d21f1+_0x144f88(0x196),'body':{'script_text':_0x22ba78,'mock_type':'cron','timeout':_0x22baf8},'headers':{'X-Key':_0x16b8ff,'Accept':'*/*'}};this[_0x1af622(0x186)](_0x2467ed,(_0x73d5e2,_0x40f918,_0x3495e2)=>_0x3a4cac(_0x3495e2));})[_0x5dea3d(0x197)](_0x2b074d=>this[_0x7fbf1d(0x17c)](_0x2b074d));}['loaddata'](){const _0xaf24ef=_0x1af02e,_0x17dcd4=_0x9075c1,_0x3e71bf=_0xd4e74e,_0x4255ca=_0x2b4585,_0x162d07=_0xd4e74e,_0x4be461=_0x53a08c,_0x2a4c7d=_0x18730d,_0x2ef9f2=_0x2b5d8f,_0x477bb6=_0x59bde4,_0x40aa80=_0x9075c1,_0x3308e4=_0x5f15bd,_0x3a3323=_0x59bde4;if(!this[_0xaf24ef(0x133)]())return{};{this['fs']=this['fs']?this['fs']:require('fs'),this[_0x17dcd4(0x13f)]=this[_0x17dcd4(0x13f)]?this[_0xaf24ef(0x13f)]:require(_0x17dcd4(0x13f));const _0xd7f246=this['path'][_0x4be461(0x162)](this[_0x162d07(0x14a)]),_0x176ea2=this['path']['resolve'](process[_0x2ef9f2(0x147)](),this[_0x4255ca(0x14a)]),_0x2e9090=this['fs'][_0x477bb6(0x156)](_0xd7f246),_0x850140=!_0x2e9090&&this['fs'][_0x162d07(0x156)](_0x176ea2);if(!_0x2e9090&&!_0x850140)return{};{const _0x39b551=_0x2e9090?_0xd7f246:_0x176ea2;try{return JSON['parse'](this['fs'][_0x3a3323(0x11f)](_0x39b551));}catch(_0x52e23e){return{};}}}}[_0x4c8d38(0x17a)](){const _0x61e213=_0x2b4585,_0x4070f3=_0x2c5885,_0x160322=_0x53a08c,_0x515ab5=_0x4c8d38,_0x203441=_0x2b4585,_0x393af8=_0x2b5d8f,_0x4a5a9d=_0x5f15bd,_0x291ae1=_0x18730d,_0xf2f513=_0x59bde4,_0x423044=_0x2b4585,_0x5a22dd=_0x9075c1,_0x2c6ec9=_0x1af02e,_0x974c88=_0x9075c1,_0xe0d561=_0x53a08c,_0x5bd879=_0x1af02e;if(this[_0x61e213(0x133)]()){this['fs']=this['fs']?this['fs']:require('fs'),this[_0x61e213(0x13f)]=this['path']?this[_0x61e213(0x13f)]:require(_0x160322(0x13f));const _0x1c4a9e=this[_0x160322(0x13f)][_0x515ab5(0x162)](this[_0x4a5a9d(0x14a)]),_0x752a1c=this[_0x515ab5(0x13f)][_0x515ab5(0x162)](process[_0x291ae1(0x147)](),this['dataFile']),_0x463abf=this['fs'][_0xf2f513(0x156)](_0x1c4a9e),_0x35c2b8=!_0x463abf&&this['fs']['existsSync'](_0x752a1c),_0x47a1eb=JSON[_0x393af8(0x151)](this[_0x4070f3(0x17b)]);_0x463abf?this['fs'][_0xe0d561(0x180)](_0x1c4a9e,_0x47a1eb):_0x35c2b8?this['fs']['writeFileSync'](_0x752a1c,_0x47a1eb):this['fs'][_0x974c88(0x180)](_0x1c4a9e,_0x47a1eb);}}[_0x5f15bd(0x174)](_0x429ab3,_0x26ef21,_0x30f256){const _0x35b374=_0x18730d,_0x285db1=_0x53a08c,_0x2e5fff=_0x26ef21['replace'](/\[(\d+)\]/g,_0x35b374(0x150))[_0x35b374(0x131)]('.');let _0x5a8826=_0x429ab3;for(const _0x51ceb6 of _0x2e5fff)if(_0x5a8826=Object(_0x5a8826)[_0x51ceb6],void 0x0===_0x5a8826)return _0x30f256;return _0x5a8826;}[_0x4eb183(0x184)](_0x22b511,_0x48770e,_0x25b58a){const _0x31c165=_0x2b5d8f,_0x3df9c1=_0x6831ec,_0x267298=_0x9075c1,_0x4609a6=_0x53a08c,_0x398804=_0x53a08c,_0x27e164=_0x2c5885;return Object(_0x22b511)!==_0x22b511?_0x22b511:(Array[_0x31c165(0x18f)](_0x48770e)||(_0x48770e=_0x48770e[_0x3df9c1(0x146)]()[_0x3df9c1(0x12a)](/[^.[\]]+/g)||[]),_0x48770e[_0x3df9c1(0x142)](0x0,-0x1)[_0x267298(0x18a)]((_0x2dcd9f,_0x4c1171,_0x4041b6)=>Object(_0x2dcd9f[_0x4c1171])===_0x2dcd9f[_0x4c1171]?_0x2dcd9f[_0x4c1171]:_0x2dcd9f[_0x4c1171]=Math[_0x4609a6(0x16d)](_0x48770e[_0x4041b6+0x1])>>0x0==+_0x48770e[_0x4041b6+0x1]?[]:{},_0x22b511)[_0x48770e[_0x48770e['length']-0x1]]=_0x25b58a,_0x22b511);}[_0x2c5885(0x161)](_0x2aaa39){const _0x3bc4c4=_0x5f15bd,_0xdd2f94=_0x1af02e,_0x2eb88b=_0x6831ec,_0x2a7595=_0x9075c1;let _0x6a01f3=this['getval'](_0x2aaa39);if(/^@/[_0x3bc4c4(0x192)](_0x2aaa39)){const [,_0x492922,_0x402d10]=/^@(.*?)\.(.*?)$/[_0xdd2f94(0x14e)](_0x2aaa39),_0x49520b=_0x492922?this[_0xdd2f94(0x159)](_0x492922):'';if(_0x49520b)try{const _0x1c1fe0=JSON[_0x3bc4c4(0x129)](_0x49520b);_0x6a01f3=_0x1c1fe0?this['lodash_get'](_0x1c1fe0,_0x402d10,''):_0x6a01f3;}catch(_0x44ca35){_0x6a01f3='';}}return _0x6a01f3;}[_0x9075c1(0x19a)](_0xf0dd61,_0x41a221){const _0x1c429b=_0x59bde4,_0x4e5f7b=_0xd4e74e,_0x20dcf9=_0x40d7c3,_0x45e946=_0x40d7c3,_0x56ec10=_0x18730d,_0x3da550=_0x59bde4,_0x3e238d=_0x4c8d38,_0x365019=_0x2b5d8f,_0x5168a7=_0x2c5885;let _0x4c48e8=!0x1;if(/^@/[_0x1c429b(0x192)](_0x41a221)){const [,_0x564571,_0x335c9f]=/^@(.*?)\.(.*?)$/['exec'](_0x41a221),_0xfd3944=this[_0x1c429b(0x159)](_0x564571),_0x236ef5=_0x564571?'null'===_0xfd3944?null:_0xfd3944||'{}':'{}';try{const _0x14537f=JSON[_0x1c429b(0x129)](_0x236ef5);this[_0x20dcf9(0x184)](_0x14537f,_0x335c9f,_0xf0dd61),_0x4c48e8=this['setval'](JSON[_0x20dcf9(0x151)](_0x14537f),_0x564571);}catch(_0x2ca1ef){const _0x3ab973={};this[_0x45e946(0x184)](_0x3ab973,_0x335c9f,_0xf0dd61),_0x4c48e8=this[_0x3e238d(0x12d)](JSON[_0x20dcf9(0x151)](_0x3ab973),_0x564571);}}else _0x4c48e8=this[_0x3e238d(0x12d)](_0xf0dd61,_0x41a221);return _0x4c48e8;}[_0x9075c1(0x159)](_0x14b02a){const _0x615b1d=_0x5f15bd,_0x4d7201=_0x2c5885,_0x322965=_0x2b4585,_0x21ae83=_0x6831ec,_0x2e0134=_0x18730d,_0x18a269=_0x4eb183,_0x43c3ef=_0x53a08c;return this['isSurge']()||this[_0x615b1d(0x14b)]()?$persistentStore[_0x4d7201(0x19b)](_0x14b02a):this[_0x322965(0x145)]()?$prefs[_0x615b1d(0x152)](_0x14b02a):this['isNode']()?(this['data']=this[_0x21ae83(0x138)](),this['data'][_0x14b02a]):this[_0x615b1d(0x17b)]&&this[_0x43c3ef(0x17b)][_0x14b02a]||null;}['setval'](_0x1e9899,_0x379389){const _0xe6ae6d=_0x1af02e,_0x2e6728=_0x6831ec,_0x48eb81=_0x5f15bd,_0x41fb0c=_0x18730d,_0x46d751=_0x2b4585,_0x3c25ab=_0x18730d,_0x1b7a98=_0x2b5d8f,_0x163163=_0x53a08c,_0x3b1675=_0x53bd4b,_0x36fa64=_0x59bde4;return this[_0xe6ae6d(0x195)]()||this['isLoon']()?$persistentStore[_0xe6ae6d(0x19c)](_0x1e9899,_0x379389):this[_0x2e6728(0x145)]()?$prefs[_0x41fb0c(0x143)](_0x1e9899,_0x379389):this[_0x48eb81(0x133)]()?(this[_0x3c25ab(0x17b)]=this[_0xe6ae6d(0x138)](),this[_0x2e6728(0x17b)][_0x379389]=_0x1e9899,this['writedata'](),!0x0):this[_0x46d751(0x17b)]&&this[_0x3b1675(0x17b)][_0x379389]||null;}[_0x2b4585(0x164)](_0x46de11){const _0xb0c878=_0x53a08c,_0x58b024=_0x40d7c3,_0x1e82a4=_0x4c8d38,_0x51a06f=_0x4eb183,_0x1761a8=_0x2b4585,_0x1b8bc2=_0x6831ec,_0x2f6a7c=_0x59bde4,_0x13512e=_0x4eb183,_0x5e5ecf=_0x18730d,_0x9cc33f=_0x4c8d38,_0x22a54=_0x53bd4b,_0x16f3e4=_0x4c8d38,_0xdb78b8=_0x2c5885,_0x543027=_0x2b5d8f,_0xbd6257=_0x4eb183,_0x5bdd36=_0x2b5d8f,_0x80a01b=_0x37945e,_0x49f754=_0x5f15bd;this[_0xb0c878(0x140)]=this['got']?this['got']:require(_0xb0c878(0x140)),this[_0xb0c878(0x176)]=this[_0xb0c878(0x176)]?this[_0x1e82a4(0x176)]:require(_0x51a06f(0x19f)),this[_0x1b8bc2(0x177)]=this[_0x1e82a4(0x177)]?this[_0x2f6a7c(0x177)]:new this[(_0x58b024(0x176))][(_0x5e5ecf(0x193))](),_0x46de11&&(_0x46de11[_0x1b8bc2(0x15b)]=_0x46de11[_0xb0c878(0x15b)]?_0x46de11[_0x1e82a4(0x15b)]:{},void 0x0===_0x46de11[_0xbd6257(0x15b)][_0xdb78b8(0x175)]&&void 0x0===_0x46de11[_0x543027(0x12c)]&&(_0x46de11[_0xdb78b8(0x12c)]=this['ckjar']));}[_0x6831ec(0x123)](_0x59b2c6,_0x4fbf13=()=>{}){const _0x3730c2=_0x18730d,_0x317a52=_0x2b5d8f,_0x266dd7=_0x59bde4,_0x206160=_0x1e11e8,_0x1784d5=_0x53bd4b,_0x395f5e=_0x2b4585,_0x26ddbc=_0x18730d,_0xb06c27=_0x1986b1,_0x56072f=_0x4c8d38,_0x2be311=_0x5f15bd,_0x2b109a=_0xd4e74e,_0x21176f=_0x2c5885,_0x523cb9=_0x5f15bd,_0x611831=_0x1e11e8,_0x951452=_0x59bde4,_0x41bd1b=_0x4eb183,_0x5161e2=_0x37945e,_0x327b48=_0x40d7c3,_0x3ebc10=_0x2c5885;_0x59b2c6[_0x3730c2(0x15b)]&&(delete _0x59b2c6[_0x317a52(0x15b)][_0x3730c2(0x199)],delete _0x59b2c6[_0x3730c2(0x15b)][_0x3730c2(0x15a)]),this[_0x317a52(0x195)]()||this[_0x395f5e(0x14b)]()?(this[_0x266dd7(0x195)]()&&this[_0x206160(0x16c)]&&(_0x59b2c6['headers']=_0x59b2c6['headers']||{},Object['assign'](_0x59b2c6[_0xb06c27(0x15b)],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[_0x317a52(0x123)](_0x59b2c6,(_0x539119,_0x59747d,_0x8a56ee)=>{const _0x3f894a=_0x206160,_0x1d1519=_0xb06c27;!_0x539119&&_0x59747d&&(_0x59747d['body']=_0x8a56ee,_0x59747d[_0x3f894a(0x182)]=_0x59747d[_0x1d1519(0x190)]),_0x4fbf13(_0x539119,_0x59747d,_0x8a56ee);})):this[_0xb06c27(0x145)]()?(this[_0x21176f(0x16c)]&&(_0x59b2c6[_0x523cb9(0x1a0)]=_0x59b2c6[_0x206160(0x1a0)]||{},Object['assign'](_0x59b2c6['opts'],{'hints':!0x1})),$task['fetch'](_0x59b2c6)['then'](_0x3c73c8=>{const {statusCode:_0x1d21cd,statusCode:_0x40e548,headers:_0x4772cf,body:_0x30bdde}=_0x3c73c8;_0x4fbf13(null,{'status':_0x1d21cd,'statusCode':_0x40e548,'headers':_0x4772cf,'body':_0x30bdde},_0x30bdde);},_0x83f0c6=>_0x4fbf13(_0x83f0c6))):this[_0x395f5e(0x133)]()&&(this[_0x56072f(0x164)](_0x59b2c6),this['got'](_0x59b2c6)['on'](_0x266dd7(0x120),(_0xc4c243,_0x43264c)=>{const _0x469fa7=_0x56072f,_0x3f7b45=_0x327b48,_0x312643=_0x26ddbc,_0x1c8574=_0x3730c2,_0x3dac34=_0x266dd7,_0x5bbc51=_0x2be311,_0x33aa29=_0x2be311,_0x4def0f=_0x951452;try{if(_0xc4c243[_0x469fa7(0x15b)][_0x3f7b45(0x185)]){const _0x51685f=_0xc4c243[_0x3f7b45(0x15b)]['set-cookie']['map'](this[_0x1c8574(0x176)][_0x1c8574(0x175)]['parse'])['toString']();this['ckjar']['setCookieSync'](_0x51685f,null),_0x43264c[_0x3f7b45(0x12c)]=this[_0x33aa29(0x177)];}}catch(_0x4010b3){this[_0x1c8574(0x17c)](_0x4010b3);}})[_0x395f5e(0x134)](_0x4b9cbd=>{const {statusCode:_0x3002da,statusCode:_0x582c5a,headers:_0x46cef2,body:_0x5af325}=_0x4b9cbd;_0x4fbf13(null,{'status':_0x3002da,'statusCode':_0x582c5a,'headers':_0x46cef2,'body':_0x5af325},_0x5af325);},_0x3fe8dd=>{const {message:_0x3a1ae3,response:_0x1f7dba}=_0x3fe8dd;_0x4fbf13(_0x3a1ae3,_0x1f7dba,_0x1f7dba&&_0x1f7dba['body']);}));}[_0x2b5d8f(0x186)](_0x221903,_0x35799e=()=>{}){const _0x44f087=_0x1af02e,_0x126c85=_0x37945e,_0x1ff214=_0x2fa33e,_0x208cc0=_0x1af02e,_0x4695d9=_0x59bde4,_0x372136=_0x1af02e,_0x745e8a=_0x2b5d8f,_0x24904f=_0x2fa33e,_0x1a3c24=_0x1986b1,_0x55ec3e=_0x40d7c3,_0x127859=_0x2b5d8f,_0x10fb99=_0x2c5885,_0x531396=_0x1af02e,_0x28b01a=_0x2b5d8f,_0x44f688=_0x1e11e8,_0x57e174=_0x2b5d8f,_0x5344ea=_0x18730d,_0x4b668d=_0x1e11e8,_0x10d449=_0x37945e,_0x22d81c=_0x9075c1,_0x5e81f1=_0x6831ec,_0x49bf43=_0x40d7c3,_0x4d110c=_0x40d7c3,_0x21e3eb=_0x40d7c3,_0x585485=_0x4c8d38,_0xcdb66d=_0x18730d,_0x5319c2=_0x4eb183;if(_0x221903['body']&&_0x221903[_0x44f087(0x15b)]&&!_0x221903[_0x44f087(0x15b)][_0x126c85(0x199)]&&(_0x221903[_0x44f087(0x15b)][_0x208cc0(0x199)]=_0x208cc0(0x171)),_0x221903[_0x745e8a(0x15b)]&&delete _0x221903[_0x126c85(0x15b)][_0x1ff214(0x15a)],this[_0x208cc0(0x195)]()||this[_0x208cc0(0x14b)]())this[_0x208cc0(0x195)]()&&this[_0x126c85(0x16c)]&&(_0x221903['headers']=_0x221903[_0x372136(0x15b)]||{},Object[_0x28b01a(0x15e)](_0x221903[_0x208cc0(0x15b)],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[_0x126c85(0x186)](_0x221903,(_0x2deaf5,_0x37eb8d,_0x274376)=>{const _0x335f99=_0x208cc0,_0x30ae7d=_0x10fb99;!_0x2deaf5&&_0x37eb8d&&(_0x37eb8d[_0x335f99(0x14c)]=_0x274376,_0x37eb8d['statusCode']=_0x37eb8d[_0x335f99(0x190)]),_0x35799e(_0x2deaf5,_0x37eb8d,_0x274376);});else{if(this[_0x24904f(0x145)]())_0x221903[_0x4b668d(0x16b)]=_0x745e8a(0x124),this[_0x24904f(0x16c)]&&(_0x221903['opts']=_0x221903[_0x22d81c(0x1a0)]||{},Object[_0x28b01a(0x15e)](_0x221903[_0x10d449(0x1a0)],{'hints':!0x1})),$task[_0x208cc0(0x167)](_0x221903)['then'](_0x5a3e7f=>{const {statusCode:_0x43bcae,statusCode:_0x440eaa,headers:_0x4f3087,body:_0x49360a}=_0x5a3e7f;_0x35799e(null,{'status':_0x43bcae,'statusCode':_0x440eaa,'headers':_0x4f3087,'body':_0x49360a},_0x49360a);},_0x514ad0=>_0x35799e(_0x514ad0));else{if(this[_0xcdb66d(0x133)]()){this['initGotEnv'](_0x221903);const {url:_0x59a364,..._0x9ee1bb}=_0x221903;this[_0x4b668d(0x140)]['post'](_0x59a364,_0x9ee1bb)['then'](_0x29ed95=>{const {statusCode:_0x172138,statusCode:_0x48bafd,headers:_0x556a6b,body:_0x34c160}=_0x29ed95;_0x35799e(null,{'status':_0x172138,'statusCode':_0x48bafd,'headers':_0x556a6b,'body':_0x34c160},_0x34c160);},_0x189c95=>{const _0xed2a3=_0x531396,{message:_0x4d891f,response:_0x530883}=_0x189c95;_0x35799e(_0x4d891f,_0x530883,_0x530883&&_0x530883[_0xed2a3(0x14c)]);});}}}}['time'](_0x164b6f){const _0x5c6fc7=_0x2fa33e,_0x2ad726=_0x5f15bd,_0x4f877f=_0x4eb183,_0x1adba3=_0x37945e,_0x13588c=_0x6831ec,_0x2129c7=_0x2b4585,_0x153706=_0x9075c1,_0x566806=_0x2b4585,_0x162293=_0x1e11e8,_0x33af3a=_0x2fa33e;let _0x71a78c={'M+':new Date()[_0x5c6fc7(0x179)]()+0x1,'d+':new Date()[_0x2ad726(0x160)](),'H+':new Date()[_0x4f877f(0x137)](),'m+':new Date()[_0x1adba3(0x155)](),'s+':new Date()['getSeconds'](),'q+':Math[_0x13588c(0x141)]((new Date()[_0x2ad726(0x179)]()+0x3)/0x3),'S':new Date()['getMilliseconds']()};/(y+)/['test'](_0x164b6f)&&(_0x164b6f=_0x164b6f[_0x1adba3(0x135)](RegExp['$1'],(new Date()['getFullYear']()+'')['substr'](0x4-RegExp['$1']['length'])));for(let _0x3e181b in _0x71a78c)new RegExp('('+_0x3e181b+')')['test'](_0x164b6f)&&(_0x164b6f=_0x164b6f[_0x13588c(0x135)](RegExp['$1'],0x1==RegExp['$1']['length']?_0x71a78c[_0x3e181b]:('00'+_0x71a78c[_0x3e181b])[_0x5c6fc7(0x139)]((''+_0x71a78c[_0x3e181b])[_0x162293(0x122)])));return _0x164b6f;}[_0x2b5d8f(0x12e)](_0x29ab5c=_0x5d1735,_0x55830b='',_0x4552b3='',_0x2d9ba5){const _0x1caf52=_0x2fa33e,_0x3e96b4=_0x53bd4b,_0x331df0=_0x2b5d8f,_0x233699=_0x6831ec,_0x7fe890=_0x1986b1,_0x465db1=_0x2b5d8f,_0x4aa6da=_0x1e11e8,_0x34f914=_0x53a08c,_0x5f0e80=_0x2fa33e,_0x4afd94=_0x2b5d8f,_0x36aac7=_0x577f90=>{const _0x487a29=_0x1c6c,_0x3bbd89=_0x1c6c,_0xe591c8=_0x1c6c,_0x514f4c=_0x1c6c,_0x4e2465=_0x1c6c,_0x53ad57=_0x1c6c,_0x1c451e=_0x1c6c,_0x19de6c=_0x1c6c,_0x2a7df7=_0x1c6c,_0x75df95=_0x1c6c,_0x58bdbc=_0x1c6c,_0x27f9ca=_0x1c6c,_0x459a7b=_0x1c6c;if(!_0x577f90)return _0x577f90;if('string'==typeof _0x577f90)return this['isLoon']()?_0x577f90:this[_0x487a29(0x145)]()?{'open-url':_0x577f90}:this[_0x3bbd89(0x195)]()?{'url':_0x577f90}:void 0x0;if('object'==typeof _0x577f90){if(this['isLoon']()){let _0x21e81a=_0x577f90[_0x3bbd89(0x128)]||_0x577f90['url']||_0x577f90['open-url'],_0x4f690c=_0x577f90['mediaUrl']||_0x577f90[_0xe591c8(0x144)];return{'openUrl':_0x21e81a,'mediaUrl':_0x4f690c};}if(this[_0x487a29(0x145)]()){let _0x5ae09c=_0x577f90[_0x3bbd89(0x149)]||_0x577f90[_0x514f4c(0x187)]||_0x577f90[_0x3bbd89(0x128)],_0x246978=_0x577f90[_0x53ad57(0x144)]||_0x577f90[_0x19de6c(0x18c)];return{'open-url':_0x5ae09c,'media-url':_0x246978};}if(this[_0x75df95(0x195)]()){let _0x360a69=_0x577f90[_0x2a7df7(0x187)]||_0x577f90[_0x4e2465(0x128)]||_0x577f90['open-url'];return{'url':_0x360a69};}}};this[_0x1caf52(0x13a)]||(this[_0x1caf52(0x195)]()||this[_0x331df0(0x14b)]()?$notification[_0x233699(0x186)](_0x29ab5c,_0x55830b,_0x4552b3,_0x36aac7(_0x2d9ba5)):this[_0x1caf52(0x145)]()&&$notify(_0x29ab5c,_0x55830b,_0x4552b3,_0x36aac7(_0x2d9ba5)));let _0x1a1453=['',_0x233699(0x14f)];_0x1a1453['push'](_0x29ab5c),_0x55830b&&_0x1a1453[_0x233699(0x14d)](_0x55830b),_0x4552b3&&_0x1a1453[_0x3e96b4(0x14d)](_0x4552b3),console['log'](_0x1a1453['join']('\x0a')),this[_0x34f914(0x125)]=this['logs'][_0x465db1(0x15f)](_0x1a1453);}[_0x53a08c(0x13d)](..._0xb91c42){const _0x335580=_0x6831ec,_0x52c779=_0x40d7c3,_0x18238f=_0x2b4585,_0x5659e2=_0x2b5d8f,_0x4ff8b2=_0x2fa33e;_0xb91c42['length']>0x0&&(this[_0x335580(0x125)]=[...this[_0x52c779(0x125)],..._0xb91c42]),console[_0x18238f(0x13d)](_0xb91c42[_0x52c779(0x172)](this[_0x5659e2(0x132)]));}[_0x5f15bd(0x17c)](_0x477dea,_0x3b94f7){const _0x654c43=_0x1af02e,_0x43b44d=_0x122c4f,_0x200d30=_0x6831ec,_0x5d571c=_0x122c4f,_0x124d77=_0x2c5885,_0x384551=_0x4c8d38,_0xe8b1aa=_0x1cf433,_0x5e20de=!this[_0x654c43(0x195)]()&&!this[_0x654c43(0x145)]()&&!this[_0x654c43(0x14b)]();_0x5e20de?this[_0x5d571c(0x13d)]('','❗️'+this['name']+_0x43b44d(0x13b),_0x477dea[_0x200d30(0x130)]):this['log']('','❗️'+this['name']+_0xe8b1aa(0x13b),_0x477dea);}[_0x1cf433(0x17e)](_0x31b7f3){return new Promise(_0x581bcb=>setTimeout(_0x581bcb,_0x31b7f3));}[_0x5a2da9(0x1a2)](_0x399d19={}){const _0x21f297=_0x345531,_0x4db0ac=_0x22f064,_0x5d0ae7=_0x53bd4b,_0x1da746=_0x40d7c3,_0x1607cb=_0x2b5d8f,_0x55a2f0=_0x53a08c,_0x47197d=_0x6831ec,_0x499e5e=new Date()[_0x21f297(0x16a)](),_0x42ff02=(_0x499e5e-this['startTime'])/0x3e8;this[_0x21f297(0x13d)]('','🔔'+this[_0x21f297(0x17d)]+',\x20结束!\x20🕛\x20'+_0x42ff02+'\x20秒'),this[_0x5d0ae7(0x13d)](),(this[_0x4db0ac(0x195)]()||this[_0x4db0ac(0x145)]()||this[_0x5d0ae7(0x14b)]())&&$done(_0x399d19);}}(_0x5d1735,_0x50e09d);} \ No newline at end of file diff --git a/update_ck.js b/update_ck.js new file mode 100644 index 0000000..811fa65 --- /dev/null +++ b/update_ck.js @@ -0,0 +1,65 @@ +/** + * Qx CK Զϴ + * : IPClientIDClientSecret + */ + +const qlConfig = { + host: 'http://192.168.3.15:5705', // + clientId: '4Hfd-R5Zys-Q', // -ϵͳ-Ӧлȡ + clientSecret: 'AwLcLzD-OQiVcpaRAvc5ZXj1' +}; + +async function start() { + const cookie = $request.headers['Cookie'] || $request.headers['cookie']; + const ptKey = cookie.match(/pt_key=([^; ]+)(?=;?)/) && cookie.match(/pt_key=([^; ]+)(?=;?)/)[1]; + const ptPin = cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]; + + if (ptKey && ptPin) { + const fullCk = `pt_key=${ptKey};pt_pin=${ptPin};`; + console.log(`⵽ЧCK: ${ptPin}`); + await uploadToQL(fullCk, ptPin); + } + $done({}); +} + +async function uploadToQL(cookie, pin) { + try { + // 1. ȡ Token + const tokenRes = await $task.fetch({ + url: `${qlConfig.host}/open/auth/token?client_id=${qlConfig.clientId}&client_secret=${qlConfig.clientSecret}` + }); + const token = JSON.parse(tokenRes.body).data.token; + + // 2. ȡлжǡǡ¡ + const envsRes = await $task.fetch({ + url: `${qlConfig.host}/open/envs?searchValue=JD_COOKIE`, + header: { 'Authorization': `Bearer ${token}` } + }); + const envs = JSON.parse(envsRes.body).data; + const existingEnv = envs.find(e => e.value.includes(`pt_pin=${pin}`)); + + if (existingEnv) { + // + await $task.fetch({ + url: `${qlConfig.host}/open/envs`, + method: 'PUT', + header: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, + body: JSON.stringify({ name: 'JD_COOKIE', value: cookie, id: existingEnv.id }) + }); + $notify("ϴɹ", `˺[${pin}]Ѹ`, ""); + } else { + // + await $task.fetch({ + url: `${qlConfig.host}/open/envs`, + method: 'POST', + header: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, + body: JSON.stringify([{ name: 'JD_COOKIE', value: cookie, remarks: `QxԶϴ-${pin}` }]) + }); + $notify("ϴɹ", `˺[${pin}]`, ""); + } + } catch (e) { + $notify("ϴʧ", "API", e.message); + } +} + +start();