mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
12 lines
34 KiB
JavaScript
12 lines
34 KiB
JavaScript
/*
|
||
频道签到
|
||
|
||
cron:1 1 1 1 * jd_pro_sign.js
|
||
|
||
*/
|
||
|
||
const $ = new Env('频道签到')
|
||
var iil='jsjiami.com.v7';const l1iIII=iii1II;(function(lllI1i,li1i1l,II1i1,lI1lll,iIiII,iil1lI,iiiliI){return lllI1i=lllI1i>>0x9,iil1lI='hs',iiiliI='hs',function(li1i1I,illIii,ii1il1,lI1llI,illIil){const l1l111=iii1II;lI1llI='tfi',iil1lI=lI1llI+iil1lI,illIil='up',iiiliI+=illIil,iil1lI=ii1il1(iil1lI),iiiliI=ii1il1(iiiliI),ii1il1=0x0;const Ill1I=li1i1I();while(!![]&&--lI1lll+illIii){try{lI1llI=-parseInt(l1l111(0x23d,'a92p'))/0x1+-parseInt(l1l111(0x22a,'saKN'))/0x2*(parseInt(l1l111(0x1d7,'iwoR'))/0x3)+parseInt(l1l111(0x245,'r!Yp'))/0x4*(-parseInt(l1l111(0x240,'xjqG'))/0x5)+-parseInt(l1l111(0x26a,'dlHq'))/0x6+parseInt(l1l111(0x1c8,'y@Uq'))/0x7*(-parseInt(l1l111(0x280,'mWMd'))/0x8)+parseInt(l1l111(0x25e,'WiZn'))/0x9+parseInt(l1l111(0x2b3,'PJpC'))/0xa;}catch(i11iiI){lI1llI=ii1il1;}finally{illIil=Ill1I[iil1lI]();if(lllI1i<=lI1lll)ii1il1?iIiII?lI1llI=illIil:iIiII=illIil:ii1il1=illIil;else{if(ii1il1==iIiII['replace'](/[VSnMPTUAYBCHurGftdQ=]/g,'')){if(lI1llI===illIii){Ill1I['un'+iil1lI](illIil);break;}Ill1I[iiiliI](illIil);}}}}}(II1i1,li1i1l,function(lIli11,lllI1I,lillI1,IlIlii,i1l1i1,liil11,iiillI){return lllI1I='\x73\x70\x6c\x69\x74',lIli11=arguments[0x0],lIli11=lIli11[lllI1I](''),lillI1=`\x72\x65\x76\x65\x72\x73\x65`,lIli11=lIli11[lillI1]('\x76'),IlIlii=`\x6a\x6f\x69\x6e`,(0x1649f7,lIli11[IlIlii](''));});}(0x17c00,0xd9ae8,Iii11l,0xc0),Iii11l)&&(iil=Iii11l);const jdCookie=require('./jdCookie'),notify=require(l1iIII(0x244,'#&Z]')),common=require(l1iIII(0x2b0,'2jku')),cryptoJS=require(l1iIII(0x1f1,'x(gY')),isNotify=![];let cookie='';function Iii11l(){const IIIIII=(function(){return[...[iil,'tCPjrMsAVYjGUiSafumQifdG.cUfodBm.HnvTHH7==','WOOqwCkxWR4bWOzN','WPizW50','FbddMmk+WQqaWR7dQGBdRCkbcSkUW4W','W4dcJvG','DXuzW5RcJfa','nKuAW7xdQa','WOatuvKVlLjhWOddL8k8WODwWPVdSmkF','FN5xWRZcMwPT','W7JcJ1a7W4e','WRT0W7xdGmk0','k0xcNmocW7qSWQFdOG/dRW','WOtcOCk+','WOJcTSkEWRpcJMi','p8k1W4T8rYFdICoEwa','WO8fyaRdQMRcR04','WQaBW6e','6lA75y2V5Pw55Pw1','WRuYyx8','6ls45y6F5Pwy5PAz','BgtdMMey','jK/cGCoH','WReTrKWv','W57cL1S','WOWRW4dcQWG','kaPHW4KQ','omo9w1zx','ywKG','WOykW4i2WOO','W50bmrlcUGpcR8kVCvK','ie/cJW','WOHAzW','eJOBnfK','x3auWQKi','5PYT6i+w5y6q5yQA5PAv5O2q772Q6l6a6kkukos9MUI3V+wUHEIJMNBORP7OR7VdTq','WPDbCKVcSbpcSCk5Bq','WORdSeScyG','zdVcG8oFEW','W4jZoa','WRHHWOtcL8kJd2BdSaldONZdKa','WQmjW6S5','WOKyxeWInG','rNuqWP06W4uDCNPcW7ddVehdI1Czxt/dHxpcK8kizmo+qvrRieVdVL5oWQaTB8kF','WOJcSmk+WOSEACovwmkiW5exWRixpCkYW7NdImoUW43cS8kzivfVWQ4iW5DkW6WeWQbxya','WQHuAu7cRa','qwOqkmoXuajIW7TdW7H3W5LUfrWsW5BcUa','nLD0WPZdKaXrkSkwwSkDW5n5','8jwBRmk+','EYtcS8oUDq','n8ouCf8','qIJdLSkDW7G','W7tcSgC2W4hcKaRdMW','WPRcTmk8WO4zBCoDsSky','44oP5O6I56wa44kx6k2E5yE96i+z5yYYrmk5WQdcG8kCW6i','WROaW7eVWPtcKCkefCkE','AhuotSoltK3cLSooiN7dKKBcP8kwv0ldVJ58D1VdVq','W4ZcKJ/cLmkz','iaflW5iYWPCgW6JdISoezmorkSk8WQurW41sWODxWOWkWOO','5A2q5AY4776k5P2r5yMc6lY85O2w5Awt6lEiD1PDnq','WQaqgmkIqG','xoEVJ+wiQ+wLOUI3RmoLw+A1NEwkIUEkOUAbGEs4KEwCOUI9UoIHJUs5LG','B8kdmr0naCoQWO7dQSk5WQ/dLq','WOzbW4xdVa','l8obzuvo','WP7cQmk5WPqaECodw8ks','WR4CW7q1WO3cHCkAbmku','WOKrq8kcWR8kWOHXAq','WO8FhSoaW4e','B24numo8','W61OWRTW','jrhcQqpcK8koW6eSsmkEWPNdVa','pmkFW69FsW','rsldRCk6W6RdM8k0','WOWiDSkjWO8','WPRcTCkSWQqyBSor','WQBcJmoPW67dVmoRACk6WOZcJCo9WR9LF3xdN8k6gCo9','cwtcG8oxW58','W5hdP2XZrq','qwOqkmoXuajIW7igWR80WPOQg1zFW5RcUSkVWRyKWODFgXz8WPxdNam7A8osu8kOWQOSihv5WPddNaXabc4nWPSxrcNcHmowW7lcM8kvgSo7BSoJWPv3W4hdLaj6BJlcJG','WP/dUvOVyq','W6JdIauaWOe','WP4MDIRdGG','WOPhW5q','WQq7BG','W6C8W5S','b8k+W6H4Cq','WQ8ZW4tcNYVcIGJcQCk4W5NcGa','WPepn8kzFSordSkauW','W6HSWQnXxgZcHW','CqtdSmkPWQu','WRtdUSoU','4PYitUACQoEDMEIUSEAYSfq','WPDdBKNcMG','W6aSrq','cw5D5lMC5Pww5BAY56Yz5yIB6l+sca','WRCZW7BcVc/cNq','wIldR8k8W67dJ8kL','cLhdKvJdMs3cIW','5l285OgK5yQ1','WQ4amComW4O','W5NdUMHRt8knWRHRWQuarW'],...(function(){return[...['Dv4XWOv3W4TnWRVcNa','t38nnmoqd1OSW6esWQu','p8kOW557DI7dGCovra','WQ/cT8kpWPe6','mdujW7C','CXVdNW','lqbMW5K+','g8kXgmo0','nsX2gmkigWRcR8oFjhBdHxO','W5uNBwpdJW','iCkiW6O','WOKeBqZdTNtcRYm8nmkKqIZdGmk9WQG','W4hcIhXmla','hHbjW7/dOYGirxbzW6v+uSkIlCoaW6RcMSkSW6FcMCkLWQ/cN2dcICkBaCoUlMi1umolW7KQF2BdG01sye9fWPdcTNNdL8oN','WQFcOmooW4tdPa','gmk1gmowffNcR27dMcm6WRH8iq','WOOBhCoOW7BdMW/cIwi','WRGVW64','WPvmW4NdHmkV','WRWao8ovW5G','WOiHWP82WOxcK3BcVhxdH3pdTmk1WP7cOmkmW5RdG8oexYLZyCk3yCo9W7tcGXbkk8k3WRZcJv/dU19PmIVcP8oMWPuJuwfLuSo+xSkNhCkhW4HQFCkCtqBcN2bFWPtcSmk3WRDXW6CPWPrUWO7cQH/cJ8kUfMTbr8ksBbHeWOldJ8oSWRGVwqBdQSoTwZXeWOtcNb0rsNxdIhTYx8kQaeldU8objrVcISkfaGCQW4bLW5O1Fmocm1ZdUmkaqCoLdmkJevC/oqbspmoKWPZdG8omAIhcTCokW4FcHmkkfYxdVCobaCof','qctcKa','WOGVW6uDWOi','aZhdNWpcOCo/','fIRdVH/cMq','WPalwCkyWQ4wWPbgySo9W6fswIi','dCoGW6hcRmkJ','W7pNRAlLIA/LPBZOTzagroA2LUwjOEEjLEAaT+s5UowDKoI8LEIHL+s5NG','5BAt5A+C5OQT','sX3cIGVcJg/dGCobWP9/W5vJpmkg','xwGdWOmwWPftmg0','rsBdRG','irLvW48/','WRy0fmkhFG','zoIUMEAXGowMJEI1O8os4P+OWQNMLyNLKB3LUPNML5FMJke','WQBNR4VLIlJLPAtOTkNdI8oB','qw/dTLO','ghaHW7RdQG','aZVcQY/cKa','EhuuvmonqLhcKa','W7OMW53dImoGvMddPq','BSoiCt/cVa','WOO7p8oOW4m','WR4wrKFdIeS4','wSkiW6CbjW','WQZdQtnRWO3dGfVdPSoTWRtcK0u+','pSkoW6RdMwZcGKJcLG','aJhdIqxcPq','DIqjW4NcPG','WQG1W7BcGrJcGb7cJW','WO9bW4ldPSk4cCkfWQ0','dt4fihfAW60','WP0lW5JcGGBcUG','WPFcSSkZf8ovW6995B2a5AAs44kD5lUv5lUN6lEZ5y6m','qmkZW5CXdCoUWOG','WObJW4RdKmk7','W7ldJWylWQBcUh/dKSo/','W5/cN1frfmor','xaJcTmo2xG','yhuG','lbP2W4W1W4HBWQBdGCkfi8okyCkxWRjmW4DAWOq','W6TVWRrnWPW','WPZdJGCmq8klbY4BsNpcTmk4','WRq5W5ieWQ0','WOesE0uIo1r2WPhdJmk/WPrqWQ7dISkiW45HANZcVCk3xW','xCkWWRZdTmksv8kcF8o3sW','W6FcSwz5dG','4P2iW4FMNOdLIjBNIPNMG6ZMRy/LU4SWWONdVCoB','qSodW54','W5DDd8oYW4ddMr3dI1xcS8kTWO3cMCo0W6aDWONdMmoOcSoKua7cOCoGW6jp','hNVdGSkjxSoGcSoNWRBcQq','WPldJ2OrEG','d1NcHmoFW6K','t3euWOeGWPXtkwfhW63cSqBdJfCCfhhcNhVdHCkwl8kGtLPVyqdcUWavW6u','qs7cHmoiBmo/iW','WRyyW4RcTWe','dSoRW7tcVCkct8kEASo8','C+ETV+wjLowNNoI1RmofeUA1PUwkOoEkNUAcGUs6K+wDHoI9PoIHTos5NW','gmkuW6JdHwhcJehcLG','WQ0XW7xcQtm','WQdcKmoVW73dSCo+','WQHqC1lcSW','xsNdRCkSW7/dV8k+gX4OvW','vMhdR14','W5zPWPZKUAZMLBhLT43NRARLIQZOVRtdLa','W6pORjxMS4JLKzhLUjhcUW','W7VdJ0XaEW','q8onW4K','WOvwzvBcQGdcQ8k2C1G','WP9hW4VdVmkccCkqW71N','W4xcIKTfqCkthXWwFhtdRSoOW4FcOMxcOSkuWO4dWP9fj2NdV8oMCCoEWRLkatWUlCoNha','W47cHthcRCka','5P+t6i+f5y6S5yQ25PEz5O+B772I6lY06kglW7tKVzlOTR7LRBZOOylcNEIUU+ISUCoi','bCkMW47dPge','EWBdM8kJWOuLic5MW4XEkv8fsN3cGSk3wW','j17cICoPW4TLytDNW41wl2G','wYJdS8kS','fehdGuJdNtNcNq','t3CkoCoUbLq','W5JdTNHKySkhWQPpWQ4','W77cSwO8W53cKW','lKa4W4VdIIvVW51T'],...(function(){return['CW3dI8kIWP0Ymq','W7ZdQmoPuCkwWQy2ndddOHFdLmkTvH8mymkJWOXXW6tcTSkZe8k7AbldQxBdO8oyW5uL','rg4nWOm','ws3dRa','5AYW5A6U77YZ5PY45yUA6l2I5O6v5Awo6lwCnJ/dRSoq','sbpcHqRcHwRdJmk/WP51W61Kiq','CGFdNW','nSoDW6xcP8kK','W5P7WOzcWQVdNCofoq','fYzdWO0','q8kZW4yA','uqddJCkyW4i','oKpcNSoDW6u','W6/dHWWa','aa5Q','f8keW73dR1G','WRKVW4lcHam','yG8LW5JcNe4samkQzCkTW4XVAX0V','C8ouAIBcRmkSdW','o+ESGowlT+wLHUI3K8oAWRu','BmoqAW','W6m2vKRdJLWr','fZRdIM4tW5a5W6e','WPtcSmk2WPBcMq','WQmHWOi','aMZcSmoPW5W','W7zMWRu','pI4pDCo5wMRcLG','mvST','W74Mvw3dKfKff8kMimk/','BNuOtmoAsLe','rg3dP08HW5uFW6NcPca','W7NdUCoTxa','lhefW4hdPW','oSkpW7RdHfJcNLVcHg0','dmoHW6ZcOmktuSkg','WPmzW7FcIqi','WPaBtSk4WQqkWOH9yG','hSoMr3H1','cGBdQHtcNq','4PYZE+ADNUIcQoATT+EHH+wMNEEqK8kL','WOvfCeFcSbdcM8kWEKizWQddQW','WRGZW7xcIG','WOezAq','W4/cKYlcIG','F8kYW6NdVexcM2i','FatcPmoV','WOKsvq','sMaqWOW','WQC6WPeVWPRdHtJcVddcMYZdUSoWW5NcMSkaWPVdJSoocq','gJuxj21zW61uW7BcPgVdT8kcoszIWQ0qW4G','W4PsWRz/WPC','CSoCEIdcOCkxtHzu','WQGzD1i9','W5ScEe7dTW','W7ldKWigWPZcPw3dRCo/W6NcSCkBW4JcTG','WQKTBt/dRG','WQiYhCk9','5Bs/5A+K5OQw','nua+W5lcNM0PW5D7W61pmmkaWRhcLHldP1ZdHmozW6H4W4rSACoQWPpcImkvWPuQWQLRW49pdW','WPFdMM8gEmkd','kJldUqZcPa','4P+nWOBOHBVMNyNOVkNOOPRPGzNLIO/KUjZPLOFORl/dOW','lrK/W4ZdTq','kZ53W6G+','nWDLW5izWPWvW6tdJa','W6iQqwFdRfWBoW','W6mNW4JdLSoNbtVcSXVcNYxdUCoRs8ooW6ldL13cRG0','WObbW4S','ffFdLq','WOXbDflcRu7dT8oWzeqtW6ddSMvndmkFymk/m8oi','WQywWPy8WRK','k8k9W6tdN1G','WPGpW5tcSIS','imkZW4S','W4FdR8k7WPmEzSoha8kZW5SBW7GrpCkcW73cGmknW5BcU8kmoHa','5P+g6i+D5y+y5yMo5PE/5O2Q77+x5QkZ5Rsf57Yk57Is5PIi5zgP5Q+x5BUm','rxed','u2NcHvBdVCkrySkFBColW69gW499','W4j5msObva','WOSDW5lcPqm','mfe5W5hdHsvJ','WQKVWOWZWRVcMMddSJlcJta','WPWacmoPW5S','rsBdQCk6W6W','uHiJW5JcQ18lnq','WQRcR8kGWPmszmoaaCk1W4CjW7G','W4j4pdGz','EXRdISk+WO4','hdqgjG','W7hdT8o+','BX3dMCk/WOG8iby','amk0W4/dUwS','EtJcKSojq8o5k8oo','W6a2W4xdLq','qrRcNmoUyW','ovu+W4m','xt7cKSojDmorkmoFWRxcO2JcPCkPWRv7WQNcKSogkSk3','qM4d','W4n5ld4uwWe','WO4nxq'];}())];}())];}());Iii11l=function(){return IIIIII;};return Iii11l();};const cookiesArr=Object[l1iIII(0x2c3,'#[8C')](jdCookie)[l1iIII(0x21e,'Rqqh')](II1llI=>jdCookie[II1llI])['filter'](i11I11=>i11I11);function iii1II(_0x5281e7,_0x58c60){const _0x481b77=Iii11l();return iii1II=function(_0xcd659c,_0xda7126){_0xcd659c=_0xcd659c-0x1a6;let _0x5d4c6c=_0x481b77[_0xcd659c];if(iii1II['HThYEu']===undefined){var _0x16dbab=function(_0x479ded){const _0xd3d719='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3fce77='',_0x550c5a='';for(let _0x5809cd=0x0,_0x105650,_0x3d39d6,_0x5d30f0=0x0;_0x3d39d6=_0x479ded['charAt'](_0x5d30f0++);~_0x3d39d6&&(_0x105650=_0x5809cd%0x4?_0x105650*0x40+_0x3d39d6:_0x3d39d6,_0x5809cd++%0x4)?_0x3fce77+=String['fromCharCode'](0xff&_0x105650>>(-0x2*_0x5809cd&0x6)):0x0){_0x3d39d6=_0xd3d719['indexOf'](_0x3d39d6);}for(let _0xd32342=0x0,_0x11e7ae=_0x3fce77['length'];_0xd32342<_0x11e7ae;_0xd32342++){_0x550c5a+='%'+('00'+_0x3fce77['charCodeAt'](_0xd32342)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x550c5a);};const _0x3b099e=function(_0x277bea,_0x4700f4){let _0x29136e=[],_0x367c12=0x0,_0x30efa1,_0x44e1bc='';_0x277bea=_0x16dbab(_0x277bea);let _0x582d4d;for(_0x582d4d=0x0;_0x582d4d<0x100;_0x582d4d++){_0x29136e[_0x582d4d]=_0x582d4d;}for(_0x582d4d=0x0;_0x582d4d<0x100;_0x582d4d++){_0x367c12=(_0x367c12+_0x29136e[_0x582d4d]+_0x4700f4['charCodeAt'](_0x582d4d%_0x4700f4['length']))%0x100,_0x30efa1=_0x29136e[_0x582d4d],_0x29136e[_0x582d4d]=_0x29136e[_0x367c12],_0x29136e[_0x367c12]=_0x30efa1;}_0x582d4d=0x0,_0x367c12=0x0;for(let _0x49cd63=0x0;_0x49cd63<_0x277bea['length'];_0x49cd63++){_0x582d4d=(_0x582d4d+0x1)%0x100,_0x367c12=(_0x367c12+_0x29136e[_0x582d4d])%0x100,_0x30efa1=_0x29136e[_0x582d4d],_0x29136e[_0x582d4d]=_0x29136e[_0x367c12],_0x29136e[_0x367c12]=_0x30efa1,_0x44e1bc+=String['fromCharCode'](_0x277bea['charCodeAt'](_0x49cd63)^_0x29136e[(_0x29136e[_0x582d4d]+_0x29136e[_0x367c12])%0x100]);}return _0x44e1bc;};iii1II['XADqoM']=_0x3b099e,_0x5281e7=arguments,iii1II['HThYEu']=!![];}const _0x1f6e12=_0x481b77[0x0],_0x45a3fe=_0xcd659c+_0x1f6e12,_0x123267=_0x5281e7[_0x45a3fe];return!_0x123267?(iii1II['VWVKlx']===undefined&&(iii1II['VWVKlx']=!![]),_0x5d4c6c=iii1II['XADqoM'](_0x5d4c6c,_0xda7126),_0x5281e7[_0x45a3fe]=_0x5d4c6c):_0x5d4c6c=_0x123267,_0x5d4c6c;},iii1II(_0x5281e7,_0x58c60);}!cookiesArr[0x0]&&($[l1iIII(0x2aa,'dlHq')]($[l1iIII(0x272,'9)rW')],l1iIII(0x1cf,'#&Z]')),process[l1iIII(0x291,'QMmt')](0x1));!(async()=>{const llI1I1=l1iIII,l1llIl={'ldcul':function(ii1I1l,ii1I1i){return ii1I1l(ii1I1i);},'Lespm':llI1I1(0x259,'a92p'),'MSBND':llI1I1(0x242,'!2K!'),'idlhU':llI1I1(0x1d4,'%lU7'),'sDwVj':function(llI,llliI){return llI<llliI;},'fqWIY':function(iI1li1,lllii1){return iI1li1===lllii1;},'kqPWL':function(liIli,liIll){return liIli(liIll);},'iNRsE':llI1I1(0x2ce,'y@Uq')};authorCodeList=await l1llIl[llI1I1(0x2bc,'3G!n')](getAuthorCodeList,l1llIl[llI1I1(0x250,'v$Ju')]);if(authorCodeList)console[llI1I1(0x2af,'1&i2')](l1llIl[llI1I1(0x2c1,'!2K!')]),$[llI1I1(0x230,'Fu1X')]=authorCodeList;else{console['log'](l1llIl[llI1I1(0x219,'xjqG')]);return;}notify[llI1I1(0x263,'!Ver')]({'title':$[llI1I1(0x1c2,'%lU7')]});for(let IilIi1=0x0;l1llIl['sDwVj'](IilIi1,cookiesArr[llI1I1(0x2b4,'3G!n')]);IilIi1++){if(l1llIl['fqWIY'](llI1I1(0x270,'Rqqh'),llI1I1(0x298,'&Z99'))){$[llI1I1(0x205,'lc&6')]=IilIi1+0x1,cookie=cookiesArr[IilIi1],common[llI1I1(0x28a,'bMmO')](cookie),$[llI1I1(0x2c2,'r!Yp')]=l1llIl[llI1I1(0x2cf,'7[&f')](decodeURIComponent,common[llI1I1(0x20e,'15)k')](cookie,l1llIl[llI1I1(0x22b,'@lhK')])),$['UA']=common[llI1I1(0x2ae,'Tjkb')]($['UserName']),$[llI1I1(0x249,'r!Yp')]=notify[llI1I1(0x24f,'z&J@')]($[llI1I1(0x205,'lc&6')],$[llI1I1(0x24d,'!2K!')]),$['nickName']='',console[llI1I1(0x2b2,'C4B9')](llI1I1(0x234,'[vHS')+$[llI1I1(0x1ea,'9)rW')]+'】'+($[llI1I1(0x2a7,'saKN')]||$[llI1I1(0x2ba,'y@Uq')])+llI1I1(0x2d1,'kCj^')),$[llI1I1(0x1b1,'a92p')]=cryptoJS[llI1I1(0x26e,'lc&6')](l1llIl[llI1I1(0x1b3,'lc&6')](encodeURIComponent,$[llI1I1(0x2c2,'r!Yp')]))[llI1I1(0x226,'mWMd')](),await Main(),common[llI1I1(0x251,'Rqqh')]();if($['runEnd'])break;await $[llI1I1(0x1df,'KOfx')](0x3e8);}else lI1Il1[llI1I1(0x294,'MQjM')]('❓'+lilIi1+'\x20'+IiilII[llI1I1(0x1ce,'2jku')](IliI1I));}isNotify&¬ify[llI1I1(0x2d4,'1r(u')]()&&(notify[llI1I1(0x28e,'v$Ju')]('\x0a'),await notify[llI1I1(0x26f,'@lhK')]());})()[l1iIII(0x22e,'PJpC')](l1lIiI=>$['logErr'](l1lIiI))[l1iIII(0x261,'C4B9')](()=>$['done']());async function Main(){const IlIlil=l1iIII,llliiI={'sSriy':IlIlil(0x269,'a92p'),'fNSmp':IlIlil(0x283,'mWMd'),'WZYRi':function(i1i1I1,IlII1){return i1i1I1!==IlII1;},'rLxTM':IlIlil(0x1f3,'WiZn'),'joHTs':'2|1|6|4|5|3|0','vcvRt':IlIlil(0x1d3,'lc&6'),'FwAvM':function(IiI11,lli){return IiI11(lli);},'fZihw':function(liIlI,lll){return liIlI===lll;},'PACJX':IlIlil(0x1ca,'r!Yp')},IilIiI=await common['getLoginStatus'](cookie);if(!IilIiI&&typeof IilIiI===llliiI['fNSmp']){if(llliiI[IlIlil(0x2d3,'F5C[')](llliiI['rLxTM'],llliiI[IlIlil(0x1eb,'2Xsi')]))return IIllI[IlIlil(0x287,'!2K!')];else{console[IlIlil(0x2c7,'^&[W')](IlIlil(0x1ab,'[vHS'));return;}}try{for(let iIli1i of $[IlIlil(0x22d,'!2K!')]){const iI1lii=llliiI[IlIlil(0x1cc,'Rqqh')][IlIlil(0x1d9,'iwoR')]('|');let IilIii=0x0;while(!![]){switch(iI1lii[IilIii++]){case'0':await $['wait'](0x3e8);continue;case'1':$[IlIlil(0x2a6,'lc&6')]=iIli1i['name'];continue;case'2':$['id']=iIli1i['id'];continue;case'3':await sendRequest(llliiI[IlIlil(0x271,'1r(u')]);continue;case'4':$[IlIlil(0x20a,'2Xsi')]=iIli1i[IlIlil(0x2d0,'MQjM')];continue;case'5':$[IlIlil(0x25d,'WiZn')]=iIli1i['encryptAssignmentId'];continue;case'6':$[IlIlil(0x24b,'xjqG')]=await llliiI[IlIlil(0x202,'2jku')](joyytoken,IlIlil(0x233,'Tjkb')+$['id']);continue;}break;}}}catch(iI1lil){if(llliiI[IlIlil(0x2ad,'!2K!')](IlIlil(0x2c4,'r!Yp'),llliiI[IlIlil(0x2b5,'Fu1X')])){II11Il[IlIlil(0x256,'&*o8')](llliiI['sSriy']);return;}else console['log'](IlIlil(0x2a3,'9)rW')+iI1lil);}}async function handleResponse(iIli1l,i1i1II){const lIli1I=l1iIII,liiIIl={'maoaM':lIli1I(0x25b,'#&Z]'),'PPSJF':'✅\x20服务状态正常...\x0a','BWNTO':function(iil1iI,IlIllI){return iil1iI===IlIllI;},'GaplY':lIli1I(0x215,'%lU7'),'NMMxN':lIli1I(0x2c6,'r!Yp'),'KbDji':function(il1i1I,lI1li1){return il1i1I===lI1li1;},'ngFAx':lIli1I(0x23f,'MQjM'),'EDkXN':function(iI11II,iIII1I){return iI11II!==iIII1I;},'MdEyk':lIli1I(0x27e,'1r(u'),'yfAXE':function(ilil1i,IlIIi){return ilil1i>IlIIi;},'ybeVr':'00015_jingbean','YGWPx':lIli1I(0x286,'7[&f'),'IjXZM':function(IiI1l,illlII){return IiI1l===illlII;},'fknKu':'JOKDW','sAzLb':lIli1I(0x246,'!6O&'),'RmVKH':function(iIII11,IiI1i){return iIII11!==IiI1i;},'kVWrP':'AArVr'};try{if(liiIIl[lIli1I(0x28b,'iwoR')](lIli1I(0x29d,'2Xsi'),liiIIl['GaplY']))switch(iIli1l){case liiIIl['NMMxN']:liiIIl[lIli1I(0x1ef,'1&i2')](i1i1II[lIli1I(0x28f,'Fu1X')],'0')&&liiIIl[lIli1I(0x2a2,'PJpC')](i1i1II[lIli1I(0x1e4,'2jku')],'0')?console[lIli1I(0x1b8,'1r(u')]('❓'+iIli1l+'\x20'+JSON['stringify'](i1i1II)):console['log']('❓'+iIli1l+'\x20'+JSON[lIli1I(0x1db,'%lU7')](i1i1II));break;case liiIIl[lIli1I(0x27c,'hzYL')]:if(i1i1II['code']==='0'&&liiIIl[lIli1I(0x1b6,'%lU7')](i1i1II[lIli1I(0x235,'@lhK')],'0')){let llll1=[],lil11l=Object[lIli1I(0x1cb,'iwoR')](i1i1II?.['rewardsInfo']?.[lIli1I(0x29c,'9)rW')]||{});for(let i1i1Il of lil11l){if(liiIIl[lIli1I(0x224,'7[&f')](liiIIl[lIli1I(0x29a,'MQjM')],'GRAvy')){let I1lIl1=i1i1II[lIli1I(0x282,'saKN')][lIli1I(0x218,'bMmO')][i1i1Il];llll1=llll1['concat'](I1lIl1[lIli1I(0x279,'aV^d')](lil11i=>lil11i?.[lIli1I(0x227,'#[8C')]?lil11i[lIli1I(0x2c0,'WiZn')]+'京豆':lIli1I(0x1fc,'xjqG')));}else IlI1ii[lIli1I(0x26b,'WiZn')](lIIiii),iI1lli&&(IIli1I['outFlag']=!![],I1i11I[lIli1I(0x2b6,'7[&f')]&&I1i111[lIli1I(0x265,'WiZn')]['fix'](ilI1li));}if(llll1['length']>0x0)console['log']('['+$[lIli1I(0x20f,'#&Z]')]+']:\x20签到成功,奖励:'+llll1[lIli1I(0x1d8,'F5C[')]('+'));else{if(liiIIl['yfAXE'](i1i1II?.['rewardsInfo']?.[lIli1I(0x2b7,'rBv6')]?.[lIli1I(0x1c3,'MQjM')],0x0)){let lI1liI=i1i1II?.[lIli1I(0x1fe,'vRwQ')]?.[lIli1I(0x200,'C4B9')]?.[lIli1I(0x1a6,'2jku')](i1i1Ii=>i1i1Ii[lIli1I(0x1aa,'%lU7')])?.[lIli1I(0x267,'^&[W')](',')||'';[liiIIl[lIli1I(0x211,'F5C[')]]['some'](lllii=>lI1liI['includes'](lllii))?console[lIli1I(0x214,'r!Yp')]('['+$['sign_name']+lIli1I(0x1d6,'aV^d')):console['log']('['+$['sign_name']+lIli1I(0x222,'!6O&')+lI1liI);}}}else{if(i1i1II[lIli1I(0x204,'WiZn')]){if([lIli1I(0x29f,'%lU7')]['some'](iI11Ii=>i1i1II[lIli1I(0x2cd,'a92p')][lIli1I(0x26d,'&Z99')](iI11Ii))){if(liiIIl[lIli1I(0x1e6,'1r(u')](lIli1I(0x22f,'y@Uq'),liiIIl['YGWPx'])){let lllil=lilIii?.[lIli1I(0x1fe,'vRwQ')]?.['failRewards']?.[lIli1I(0x243,'&*o8')](iI11Il=>iI11Il[lIli1I(0x2cb,'Tjkb')])?.[lIli1I(0x1af,'1r(u')](',')||'';[lIli1I(0x2cc,'1r(u')][lIli1I(0x252,'FU&I')](iIII1i=>lllil[lIli1I(0x2ca,'bMmO')](iIII1i))?iIIl1i['log']('['+I1lllI['sign_name']+lIli1I(0x24c,'^&[W')):ill111[lIli1I(0x209,'!2K!')]('['+Iliil1[lIli1I(0x1a8,'1&i2')]+lIli1I(0x278,'!ust')+lllil);}else console[lIli1I(0x27d,'rBv6')]('['+$['sign_name']+lIli1I(0x253,'#[8C'));}else liiIIl[lIli1I(0x1ae,'FU&I')](liiIIl['fknKu'],'JOKDW')?console[lIli1I(0x1c0,'3G!n')]('['+$[lIli1I(0x237,'9)rW')]+lIli1I(0x1f4,'2jku')+i1i1II[lIli1I(0x2c9,'bMmO')]):lI1Ili[lIli1I(0x1ee,'#[8C')]('['+IliilI[lIli1I(0x258,'F5C[')]+']:\x20'+i1II1[lIli1I(0x2cd,'a92p')]);}else liiIIl['EDkXN'](liiIIl['sAzLb'],liiIIl[lIli1I(0x1b2,'Tjkb')])?lili1[lIli1I(0x2bd,'WiZn')](liiIIl[lIli1I(0x1ba,']E4E')]):console[lIli1I(0x281,'7[&f')]('❓'+iIli1l+'\x20'+JSON[lIli1I(0x264,'7[&f')](i1i1II));}break;}else IIli1[lIli1I(0x1f7,'saKN')]('❌\x20未能正确处理\x20'+II1liI+'\x20请求响应\x20'+(IlI1i1[lIli1I(0x2c8,'3G!n')]||l1lIl1));}catch(IlIII){liiIIl[lIli1I(0x1d5,'x(gY')](liiIIl[lIli1I(0x28c,'PJpC')],'AArVr')?(i1ili1['log'](liiIIl[lIli1I(0x255,'vRwQ')]),i1l1l1['signCode']=IlI1I):console[lIli1I(0x2bf,'[vHS')](lIli1I(0x28d,']E4E')+iIli1l+lIli1I(0x254,'z&J@')+(IlIII['message']||IlIII));}}async function sendRequest(illlIi){const II1il=l1iIII,I1lIii={'TPtgC':II1il(0x1ac,'MQjM'),'iXscP':'queryInteractiveInfo','yQTXN':'https://api.m.jd.com/client.action?functionId=queryInteractiveInfo','bINVn':II1il(0x1d1,'mWMd'),'HACSN':function(i11ili){return i11ili();},'lvCyW':II1il(0x216,'PJpC'),'EDWQo':II1il(0x1ff,'lc&6'),'APDVl':'0123456789abcdef','wzCyT':'babelh5','JOYLu':function(iil1l1,lllli){return iil1l1!==lllli;},'qqpDA':II1il(0x289,'Tjkb'),'ovLrD':II1il(0x296,'rBv6'),'zbIod':II1il(0x2ab,'v$Ju'),'oyjlu':II1il(0x248,'^&[W'),'CylPx':'com.jingdong.app.mall','YdOom':II1il(0x2be,']E4E'),'pCCMS':function(iiili1,ill11i){return iiili1===ill11i;},'hyfwA':II1il(0x1ed,'bMmO'),'IrpPk':II1il(0x1e0,'!ust'),'yMBZF':function(lllill,ill11l){return lllill<ill11l;},'DIZnt':'HfWbh','jDUsX':'Evqxi','ZcpXw':function(I1lIiI,lllili){return I1lIiI>lllili;},'Lailr':II1il(0x1b4,'iwoR'),'oPuTx':II1il(0x24e,'Fu1X'),'fytjI':function(IliiiI,Ill11){return IliiiI!==Ill11;},'sQKnx':'skfyl','eElXf':'aznna'};let IiI1I='',illlIl=null,i11ill=null,IIIIIi=I1lIii[II1il(0x1b0,'MQjM')];switch(illlIi){case I1lIii[II1il(0x2ac,'rBv6')]:IiI1I=I1lIii[II1il(0x23e,'%lU7')],i11ill={'appid':'babelh5','sign':'11','body':JSON[II1il(0x1bd,'v$Ju')]({'sourceCode':II1il(0x284,'FU&I'),'encryptProjectId':$[II1il(0x276,'y@Uq')],'encryptAssigmentIds':[$[II1il(0x297,']E4E')]],'ext':{'rewardEncryptAssignmentId':$['encryptAssignmentId'],'timesEncryptAssignmentId':$[II1il(0x1e5,'z&J@')],'needNum':0x32}}),'t':Date['now']()};break;case I1lIii['bINVn']:await I1lIii[II1il(0x25c,'!2K!')](logstr);const liiIII={'sourceCode':II1il(0x257,'v$Ju'),'encryptProjectId':$['encryptProjectId'],'encryptAssignmentId':$['encryptAssignmentId'],'completionFlag':!![],'itemId':'1','extParam':{'forceBot':'1','businessData':{'random':$[II1il(0x238,'a92p')]},'signStr':$[II1il(0x1f9,'Fu1X')],'sceneid':I1lIii[II1il(0x20b,'a92p')]+$['id']},'activity_id':$['id'],'template_id':'00019605','floor_id':I1lIii['EDWQo'],'enc':common['genRandomString'](0x80,I1lIii['APDVl'])[II1il(0x1f0,'Fu1X')]()};illlIl={'appid':I1lIii[II1il(0x217,'PJpC')],'sign':'11','body':JSON[II1il(0x201,'1&i2')](liiIII),'t':Date['now']()},IiI1I=II1il(0x1e8,'C4B9');break;default:console['log'](II1il(0x1f5,'lc&6')+illlIi);return;}const IIIIIl={};illlIl&&(illlIl={...illlIl,...IIIIIl});if(i11ill){if(I1lIii[II1il(0x241,'a92p')]('lsMnh',I1lIii[II1il(0x1bb,'^&[W')])){iIIIIl[II1il(0x1b9,'v$Ju')](II1il(0x1ad,'WiZn'));return;}else i11ill={...i11ill,...IIIIIl};}const I1lIil={'url':IiI1I,'method':IIIIIi,'headers':{'origin':I1lIii[II1il(0x1e3,'bMmO')],'Referer':I1lIii['zbIod'],'User-Agent':$['UA'],'Cookie':cookie,'accept':I1lIii[II1il(0x228,'aV^d')],'X-Requested-With':I1lIii[II1il(0x247,'1r(u')],'sec-fetch-mode':I1lIii[II1il(0x208,'saKN')]},'params':i11ill,'data':illlIl,'timeout':0x3a98};I1lIii[II1il(0x239,'r!Yp')](IIIIIi,I1lIii['hyfwA'])&&(delete I1lIil[II1il(0x285,'[vHS')],delete I1lIil[II1il(0x288,'xjqG')][I1lIii[II1il(0x24a,'Tjkb')]]);const IIIl1i=0x1;let liiII1=0x0,IIIl1l=null,lllll=![];while(I1lIii[II1il(0x2a4,'kCj^')](liiII1,IIIl1i)){if(I1lIii[II1il(0x1e1,'1&i2')](I1lIii[II1il(0x220,'x(gY')],I1lIii['jDUsX']))lliiii['random']=IliI1i['random'],ll1ii['logStr']=IIli11[II1il(0x23a,'mWMd')];else{if(I1lIii[II1il(0x274,'!2K!')](liiII1,0x0)){}const il1i1l=await common[II1il(0x1fa,'Rqqh')](I1lIil);if(!il1i1l[II1il(0x1fb,'dlHq')]){IIIl1l='🚫\x20'+illlIi+'\x20请求失败\x20➜\x20'+il1i1l['error'],liiII1++;continue;}if(!il1i1l?.[II1il(0x206,'15)k')]){if(II1il(0x1e9,'!6O&')===I1lIii[II1il(0x1c6,'v$Ju')]){IIIl1l=II1il(0x1c9,'Rqqh')+illlIi+II1il(0x221,'lc&6'),liiII1++;continue;}else delete I1i11l[II1il(0x203,'kCj^')],delete llIlii[II1il(0x288,'xjqG')][II1il(0x2bb,'2jku')];}handleResponse(illlIi,il1i1l[II1il(0x223,'FU&I')]),lllll=![];break;}}liiII1>=IIIl1i&&(II1il(0x1dd,'#&Z]')!==I1lIii[II1il(0x2a5,'lc&6')]?ill11I[II1il(0x1b8,'1r(u')]('['+Iliiil[II1il(0x262,'vRwQ')]+II1il(0x21a,'3G!n')):(console['log'](IIIl1l),lllll&&($[II1il(0x27a,'saKN')]=!![],$[II1il(0x1e2,'Rqqh')]&&(I1lIii[II1il(0x1d2,'QMmt')](I1lIii['sQKnx'],I1lIii[II1il(0x225,'!ust')])?$[II1il(0x260,'dlHq')][II1il(0x1ec,'F5C[')](IIIl1l):iIIIIi['log']('❌\x20脚本运行遇到了错误\x0a'+iii1I1)))));}async function whwswswws(IlIlli){const lllI11=l1iIII,il1i1i={'bsSkX':lllI11(0x299,'aV^d'),'Hptdv':lllI11(0x29e,'x(gY'),'WAZBU':function(llllI,lllil1){return llllI+lllil1;},'mawsg':function(iil1il,ilil1I){return iil1il(ilil1I);},'WrKJc':lllI11(0x23b,'lc&6'),'kHTuY':'JD4iPhone/12.2.2\x20CFNetwork/1240.0.4\x20Darwin/20.6.0','oYGbp':lllI11(0x1c5,'2jku'),'zxsyx':lllI11(0x266,'[vHS'),'lMfBf':lllI11(0x1bc,'y@Uq')};let lil111={'appname':IlIlli||il1i1i[lllI11(0x275,'Fu1X')],'whwswswws':'','jdkey':'','body':{}};const i11ilI=await common[lllI11(0x277,'aV^d')]({'url':'https://blackhole.m.jd.com/getinfo','method':il1i1i[lllI11(0x1bf,'r!Yp')],'data':il1i1i[lllI11(0x29b,'saKN')](lllI11(0x231,'F5C['),il1i1i[lllI11(0x2b9,'Rqqh')](encodeURIComponent,JSON[lllI11(0x1ce,'2jku')](lil111))),'headers':{'Origin':il1i1i[lllI11(0x1fd,'#&Z]')],'Referer':lllI11(0x2a8,'#[8C'),'User-Agent':il1i1i['kHTuY'],'accept':il1i1i['oYGbp'],'content-type':il1i1i[lllI11(0x1e7,'vRwQ')]},'proxy':null,'debug':![],'timeout':0x7530}),ii1ii1=i11ilI[lllI11(0x2c5,'7[&f')];if(ii1ii1&&ii1ii1[lllI11(0x1d0,'%lU7')])return ii1ii1[lllI11(0x1da,'2jku')];else console['error'](il1i1i[lllI11(0x236,'F5C[')]);}async function joyytoken(i11il1){const I1lIll=l1iIII,ii1iiI={'ctJpC':I1lIll(0x21b,'PJpC'),'RYhcR':'smashH5pv','scFhT':I1lIll(0x293,'r!Yp'),'TcXIA':function(IIIl11,I1lIi1){return IIIl11+I1lIi1;},'eQTau':function(liiIIi,lil11I){return liiIIi(lil11I);},'YsVZg':I1lIll(0x1c7,'C4B9'),'ewWsy':'https://h5.m.jd.com/','sIEnj':'application/json,\x20text/plain,\x20*/*','dBDXa':'application/x-www-form-urlencoded','dnzSP':function(Iliii1,iIiIi){return Iliii1===iIiIi;},'XzQcB':'onmmq','PDfYv':'JQcvu','svnkD':'未获取到数据,运行\x22依赖安装\x22试试~'};let lllilI={'appname':i11il1||ii1iiI[I1lIll(0x26c,'xjqG')],'whwswswws':await whwswswws(i11il1)||'','jdkey':'','body':{'platform':'1'}};const ilil11=await common[I1lIll(0x232,']E4E')]({'url':I1lIll(0x1c4,'^&[W'),'method':ii1iiI['scFhT'],'data':ii1iiI['TcXIA'](I1lIll(0x1a9,'2Xsi'),ii1iiI[I1lIll(0x2d2,'!Ver')](encodeURIComponent,JSON['stringify'](lllilI))),'headers':{'Origin':ii1iiI['YsVZg'],'Referer':ii1iiI[I1lIll(0x21f,'lc&6')],'User-Agent':I1lIll(0x20c,'kCj^'),'accept':ii1iiI[I1lIll(0x229,'#&Z]')],'content-type':ii1iiI[I1lIll(0x20d,'z&J@')]},'proxy':null,'debug':![],'timeout':0x7530}),illlI1=ilil11[I1lIll(0x295,'^&[W')];if(illlI1&&illlI1['joyytoken']){if(ii1iiI[I1lIll(0x25a,'QMmt')](ii1iiI[I1lIll(0x23c,'&Z99')],ii1iiI['PDfYv']))[ii1iiI[I1lIll(0x1de,'mWMd')]][I1lIll(0x25f,'Rqqh')](iiilil=>IIII11[I1lIll(0x290,'2Xsi')][I1lIll(0x1cd,'!Ver')](iiilil))?i1illi[I1lIll(0x2a9,'F5C[')]('['+i1illl[I1lIll(0x21d,'^&[W')]+I1lIll(0x1f8,'kCj^')):I1llil['log']('['+I1llii['sign_name']+I1lIll(0x273,'7[&f')+lilIll[I1lIll(0x1b5,'mWMd')]);else return illlI1['joyytoken'];}else console[I1lIll(0x2b8,'#&Z]')](ii1iiI[I1lIll(0x1f6,'v$Ju')]);}async function getAuthorCodeList(iil1li){const I1lIli=l1iIII,lillIl={'NsAZT':I1lIli(0x213,'rBv6')},iIiIl=await common[I1lIli(0x1f2,'KOfx')]({'url':iil1li,'method':I1lIli(0x268,'WiZn'),'headers':{'User-Agent':lillIl['NsAZT']},'proxy':null,'debug':![],'timeout':0x7530}),iiilii=iIiIl['data'];return iiilii;}async function logstr(){const II1ii=l1iIII,li1i1i={'qECWn':II1ii(0x210,'Tjkb'),'ErASq':'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1\x20Edg/87.0.4280.88'},IlIli1=await common['request']({'url':II1ii(0x2a0,'7[&f')+$[II1ii(0x1dc,'bMmO')]+'&sid='+$['sid'],'method':li1i1i[II1ii(0x1be,'!6O&')],'headers':{'Cookie':'','User-Agent':li1i1i[II1ii(0x212,'#&Z]')]},'proxy':null,'debug':![],'timeout':0x7530}),illIiI=IlIli1['data'];illIiI?($[II1ii(0x1a7,'hzYL')]=illIiI['random'],$[II1ii(0x2a1,'!6O&')]=illIiI[II1ii(0x27f,'KOfx')]):console['error'](II1ii(0x2b1,'2Xsi'));}var version_ = 'jsjiami.com.v7';
|
||
// prettier-ignore
|
||
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
|