mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
15 lines
26 KiB
JavaScript
15 lines
26 KiB
JavaScript
/*
|
||
超级抓抓机兑换京豆
|
||
|
||
每天20点兑换,先运行任务本
|
||
|
||
cron:0 20 * * * jd_super_zzj_exchange.js
|
||
|
||
*/
|
||
|
||
const $ = new Env('超级抓抓机兑换京豆')
|
||
var iil='jsjiami.com.v7';const IilliI=iii1II;if(function(IiiIlI,Iilli1,I1l1Il,llIll1,Illl1l,Illl1i,lIIiil){return IiiIlI=IiiIlI>>0x7,Illl1i='hs',lIIiil='hs',function(l1lIii,I11iI1,l1lIil,IiiIli,iillli){const IlI1il=iii1II;IiiIli='tfi',Illl1i=IiiIli+Illl1i,iillli='up',lIIiil+=iillli,Illl1i=l1lIil(Illl1i),lIIiil=l1lIil(lIIiil),l1lIil=0x0;const I1l1Ii=l1lIii();while(!![]&&--llIll1+I11iI1){try{IiiIli=parseInt(IlI1il(0x1a6,'%nrF'))/0x1*(-parseInt(IlI1il(0x215,'*!Zl'))/0x2)+-parseInt(IlI1il(0x1e2,'tTag'))/0x3+parseInt(IlI1il(0x21a,'5Bv]'))/0x4*(-parseInt(IlI1il(0x1ad,'ny8G'))/0x5)+-parseInt(IlI1il(0x1a4,'Ol9^'))/0x6*(-parseInt(IlI1il(0x226,'kF5H'))/0x7)+-parseInt(IlI1il(0x218,'*lac'))/0x8+-parseInt(IlI1il(0x1db,'ga8R'))/0x9*(parseInt(IlI1il(0x1b0,'VYNe'))/0xa)+parseInt(IlI1il(0x1ec,'6UX%'))/0xb*(parseInt(IlI1il(0x1ef,'5POg'))/0xc);}catch(I1i11i){IiiIli=l1lIil;}finally{iillli=I1l1Ii[Illl1i]();if(IiiIlI<=llIll1)l1lIil?Illl1l?IiiIli=iillli:Illl1l=iillli:l1lIil=iillli;else{if(l1lIil==Illl1l['replace'](/[TIXGlDHYSnQVLPBupekO=]/g,'')){if(IiiIli===I11iI1){I1l1Ii['un'+Illl1i](iillli);break;}I1l1Ii[lIIiil](iillli);}}}}}(I1l1Il,Iilli1,function(I1i11l,llIlii,llIlil,IIlil,ilI1lI,IiiIll,IIlii){return llIlii='\x73\x70\x6c\x69\x74',I1i11l=arguments[0x0],I1i11l=I1i11l[llIlii](''),llIlil=`\x72\x65\x76\x65\x72\x73\x65`,I1i11l=I1i11l[llIlil]('\x76'),IIlil=`\x6a\x6f\x69\x6e`,(0x16b7b8,I1i11l[IIlil](''));});}(0x5e80,0xd4576,Iii11l,0xbf),Iii11l){}const jdCookie=require(IilliI(0x20b,'h[S[')),common=require('./utils/Rebels_jdCommon'),notify=require(IilliI(0x203,'5POg')),{H5st,jsTk}=require('./utils/Rebels_H');let taskThreads=process['env']['jd_super_zzj_threads']||'1';const runInterval=process[IilliI(0x1eb,'e8$H')][IilliI(0x207,'vi1I')]||IilliI(0x1f4,'8uks'),isNotify=(process[IilliI(0x234,'lI4u')][IilliI(0x250,'VfI8')]||process[IilliI(0x202,'Nl@4')][IilliI(0x1cb,'ny8G')])==='true',pinFilter=(process[IilliI(0x1bf,'SiCP')][IilliI(0x1ea,'Td^m')]||'')[IilliI(0x21d,'tTag')]('@');function Iii11l(){const l1lIll=(function(){return[...[iil,'OjskjiuVaVmQiYH.YQcDloTImGn.DpXvO7POeLBS==','WOnHW7ZcLCk2i8orW6BcVNRdT8kWW5vAWPSXl8k1WQvyWOS','WOBdHCox','bmk6WPtdN0SGnKpdKa','CcbKW4BcHbtcImkPWORdSSosCW','W40aWP4','tmkdWP5FWRbDWPpcN1qdr2VdVCkSW650W7W2k3/dUWS/W7pcOSoqkNW','xmkvWRvTW4q','WODGW4BcGSkrnSozW7VcL2xdJSk1W6vbWPS6imkYWQ1jWPyo','amkGda','WRrbWOhdJ8kuW4hdSZ/cPmk2W5pdJCkIcW','W5ZdRSodWQimcdK','WRDVWP9NWRdcImkFfsa','EmozgCobWPJdKcNcHG','W6O4W44','W4rgW4hdISoH','wSkuW6fQW5DMWOKsW6ikWOtdTmoYDCkxWRqrW4iiwSkS','WRrJW7ngWP7cQmkZna','cSorhNe','fa5xqCk9W7RcJZC','aSkbnSorWQq','bCkKWPpdQNCX','W7DPWQJcKHq','4PQIW7FOH5pLRPNKUBlOV7ZOORZPLQJPMQVMLk7PLy7ORy/NV5NPL6BORi0','ymkse8oGW4JcUSogW4i','m8kCn8oCW70LWPpdOKlcIa','W54YexdcGtJdQCk4WOei','smkuxsK','t8kxWP/dQHfTB8kRWQaVWPNcQwddLe3cQCkIWOhdK8kuWOTWemk+ASoRc8kL','lSkmn8od','xmkbWOzU','W6OYW4DcWR3cKa','ga5c','zmocnSowWQBdRdddPxFcNgNdNCkUWRGRbZ/dKCkxWQ/cPCkXtf02F1q','WOKEWPu','WQPMW5JcK8k1','zSo5vK5vWQmYjSkwDCkkWPBdISkTW6D5W6NcJSoQ','W4pdQmktW7zummkrWQH9DSkpwgLDkrFcJ8k3fGRcRq','W6m5W4PxWRdcImkTortdQJjnzH03W6BdOwhdHa','WRDIW7xcTmkQ','W756W7FdRmoStmkf','W6NdHmoXW5ZcOLDIWQrZoG','bSknWRvYWRz/W5qbWQa','bSkxj8ohWPC','WO3dJ8oeWOSzdXmaiwa','W63ORytMSkRLPAROTzej4P24W5C','WQvEW4xcI8kZrSoPsmk5WPfbemk1WQuukqeFENK','hCk0c8oWWOy','r8kAW61+W5D2WOO','WRRdI8o4a8k+cZBdOSkZ','W7CIW4XxWRdcSCk3daldQZPjFbKKW63dNeBdHHG','bCojWRjmW7XZWQiqW5m','WRmfW4BcQmovWPdcVhBcQ8kAW4xdMmkZjSofW4C3bCoaWOnMv3ddVKi8WQa','DCk2uhDVrCkDoq','W57cNCkiW7jmrfaTbgdcSCo9BW','qmkYWP9FrSo2o8obD8oz','WRvMWPSvWQJcUSkleqxdQq','CSoMgG','5ywP5O6d5OI+5yUE77615Okx5zsB6iY75B2N776L','w8k1W6lcHai','amkjWRhdH1a'],...(function(){return[...['acxdM0yA','fmk7h8kQW70HWO3cMuzXuSo4wmoeB8kYWQuwiCkJ','W4xdO8kR','CCksnCoMW40','WPldLSkRW5FcVW','dSorW4y7WOFcVq4FnH4V','5P+T552D5AA/5yIv77+I77+w','x8kJW4mfWOqhnmkbWQRdMmo6hY0','WRZcNh9EWOa','5Q2M6lEX5y+o6BUs5y+m77YG6lsd6l6Bqq','W6lcOmoupSk0WQhdQHDRnmkWWQaLWRWPna','ArFcLCoT','WRpcTCowimkSWQxdUWnTp8kLWQSuWRaqmX/dNCk5WOpdK3rVBmkBvSkY','shHlq8oiWPxcG0NdIW','W7tdRwyVta','W6VcIaDwW7JdVG','WPPLW7dcHCkWl8orW6W','fSkYWPJcMYXHAKtdKa','W5NdQLiVsW0HqSoCWQBcVv0/W6tdSSkFWQLuWRW0W55LEaL0WQxdOSomWQlcS8kGeWe','fSk6cmkXW6OpWORcI1O','WRNcHv5OWQRcSbeRW7hcQmoyDq','vCk9WPS','44kD5O+F56AU44kE6k2+5yw36i2b5y2kbx3cGMCkdW','emk9WOjWtxq1W7RdHq','4P+AW6BMNj/OGzJMRj3NO5VLP5hNKi7cOG','m1hdKMi','DrVcVCo3WQm','wSkiks/dTmoxFmkyWP1lEcdcGY0cWOFdNmk+a8kBCSo8umoiWRKZaq9pzCkAjSkJ','W5ddLd8eW6/cP8kDkuPjWOFdP8oVi37cHJhcHCkGWO3cTmkyW4hdMCkrWOTy','BSoKuG','WPnUW7q','WP3dLwVdQrZcHW','A8kzqLlcQ3JdVa','gGvaBSkNW7hcGs3cSSoGCgJdKSoM','W6pcJb1q','z8kCcCoI','x8kMWPL4r8oKga','z8kxe8o7W7G','cCkxhJVdPmkhDmkUWOzVytZcOKyYW4ldSCkKiCkZv8oxm8oLWRmjdZu','tSkGFw9v','eSogWPG','W4WnW4TxWRW','yCkFs3BcTwy','WRFdJCkAW4W','WQddKHG','thjlr8ooWONcGb0','W5yoWPddN8oMW4vnwW','5BUo5A2O5lQY6lA0','feKVwG','W6DRW4VdVmo8t8ktW64zAmkxzJWexSo7W73cNfe','5Bsw6k+t576C6lEe6l6t6l2z6kgI5B2t5yIT6lwB5yYO','WPCzWObEoSoUr2yz','fqvvsCkTW6ZcMq','s8kutaldLSkEW6i','77YG5QYk5AAN5PQ35lM8CCo/54gH5B6g5AA77729','dCk6dSkOW7DsW4ZdGKjZwSk1qCkdC8kZW4iBkmkHrvLAWRqgtSk/kZSDWRddRmkZyGddJdxcLYrEW6RcUmkgWQfzAq','W6FcQSopg8k/WQZdRq','vSklpG','d0CH','ErpcImouWRm3W7hcQmoZW7e','o8k0x1FcT2ddNa','tSoGW4NcMI1SAZBcJmomWPtdNmkc'],...(function(){return['tSkdW4LzWOLVWOVcGbKQ','ymkzqG','W4VdNayUWPZcUYLYW53cKa','W7VcTvi','zmk8W5bJW5y','W5jiW5NdPG','WR4+WQBcV8oOFCkKW7uKyG','dSomB3BdLmo3A8kbWRbO','lhhdRghcPa','WOBdI8odeSkI','WONcOXiMDsaOwmoC','rCkGW73cNHCKWQO','vHXWg8kxW6xdGmoStmkE','shHlq8oiWPxcGW','W4rCW4pdGSocW7q','W4VdTu8M','WONcGvLSWP3cQWS3WPu','w+ISSoAZQowqLow7Hd8','is7dTLaUFa','Cmo8xeX+WQyOvCov','mFgbKRPJ6l2n6ko457Uo5P2WW74','WOLLW63cKa','WQNdNCkmW4dcQSk7WQ0kySkdWQbusSkrW7/cULVdVLtdOSoe','WQhdNa8','bWGztSkM','xN1u','WQzoW5dcLCkRBmoI','E3BcOxe','WOlcI3ziWR0','WO7dGeddUH0','f8owW5epWRvEWQBcHWOOuv3dGCoRW4j2WQ0Ucg/dJYGwW5RcJCoyq2/dS0tdR2u','bmkZWOvvxG','WQzEW47cVmkKAW','5ywh5O2Y5OIr5yQt776o5Oow5zsp6iYF5BYP77+y','BY5GW5FdVr7cJCkT','W4bNW7FdLSoV','dW9yymkf','uCkCbJddQmoeEmkEWQTEBgxcPe4AWOtdGSo1ha','C8kIxhfczCkEkfRcQLdcKSodWPBcLeZdIXm8WOW','W5NdSqhcQJtcM8oismkNW6RdNdFdJtHpWRBcJ23cISocWReQW4GtlfVdO3G','WRnoW5tcTCkLAmoUuSkpWPDbb8k0WR8','vCklc8oQW48','WQNdHI85ba','hmoAWPSo','8jYjMWW','WRtdK8kaW5tcQSkRWQ5uja','6l6Z5Roc5lUM5AsQ5AwI77Yn5ysk5O6P6i2c5B+n77Yr56Mk5Rgn','WQFdNSoNdW','sSkewsddI8kEW7tdImkvW4VdKSo0vq','vMbf','sCkxnq7dKa','W4RdR0WgtaO','WP/cHfnUWRBcRHfhW5BcOSobD8owWRBdPGNcGKdcIW','WQO2W4JdGuT4W7unWPbBFG','WQBdLHeO','rEISUEAWUowNQEI2OuJINB/dJEAxG+wtJUw6P+AxQ+AnGG','ASo5vLbzWRCJfa','WOT2W7FcVCk1','zwBcT31ED8omW6xdSmocWQ85W7rFiSoUWRxdJmoMFe4','fCo5WP5aW6jlACo0W7y','g8o9WR7dNezYW7FcL8o0aJBcH8oF'];}())];}())];}());Iii11l=function(){return l1lIll;};return Iii11l();};let cookiesArr=Object[IilliI(0x1dc,'KiC1')](jdCookie)[IilliI(0x24b,'KiC1')](IiilIi=>jdCookie[IiilIi])['filter'](IiilIl=>IiilIl);function iii1II(_0x2f3776,_0xa3b387){const _0x27f648=Iii11l();return iii1II=function(_0x3f2a0e,_0x2fce96){_0x3f2a0e=_0x3f2a0e-0x19d;let _0x2c1990=_0x27f648[_0x3f2a0e];if(iii1II['NgEabQ']===undefined){var _0x1bbdbd=function(_0x4938e2){const _0x12235c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa2d8f4='',_0x3e8e7a='';for(let _0x3e54a7=0x0,_0x13e440,_0x836d28,_0x431567=0x0;_0x836d28=_0x4938e2['charAt'](_0x431567++);~_0x836d28&&(_0x13e440=_0x3e54a7%0x4?_0x13e440*0x40+_0x836d28:_0x836d28,_0x3e54a7++%0x4)?_0xa2d8f4+=String['fromCharCode'](0xff&_0x13e440>>(-0x2*_0x3e54a7&0x6)):0x0){_0x836d28=_0x12235c['indexOf'](_0x836d28);}for(let _0x57dffe=0x0,_0x4418d8=_0xa2d8f4['length'];_0x57dffe<_0x4418d8;_0x57dffe++){_0x3e8e7a+='%'+('00'+_0xa2d8f4['charCodeAt'](_0x57dffe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e8e7a);};const _0x50b1c2=function(_0x2f77fb,_0x4f0d40){let _0x3ca62c=[],_0x233ea5=0x0,_0x3906de,_0x329e7e='';_0x2f77fb=_0x1bbdbd(_0x2f77fb);let _0x2ed709;for(_0x2ed709=0x0;_0x2ed709<0x100;_0x2ed709++){_0x3ca62c[_0x2ed709]=_0x2ed709;}for(_0x2ed709=0x0;_0x2ed709<0x100;_0x2ed709++){_0x233ea5=(_0x233ea5+_0x3ca62c[_0x2ed709]+_0x4f0d40['charCodeAt'](_0x2ed709%_0x4f0d40['length']))%0x100,_0x3906de=_0x3ca62c[_0x2ed709],_0x3ca62c[_0x2ed709]=_0x3ca62c[_0x233ea5],_0x3ca62c[_0x233ea5]=_0x3906de;}_0x2ed709=0x0,_0x233ea5=0x0;for(let _0x432c83=0x0;_0x432c83<_0x2f77fb['length'];_0x432c83++){_0x2ed709=(_0x2ed709+0x1)%0x100,_0x233ea5=(_0x233ea5+_0x3ca62c[_0x2ed709])%0x100,_0x3906de=_0x3ca62c[_0x2ed709],_0x3ca62c[_0x2ed709]=_0x3ca62c[_0x233ea5],_0x3ca62c[_0x233ea5]=_0x3906de,_0x329e7e+=String['fromCharCode'](_0x2f77fb['charCodeAt'](_0x432c83)^_0x3ca62c[(_0x3ca62c[_0x2ed709]+_0x3ca62c[_0x233ea5])%0x100]);}return _0x329e7e;};iii1II['hcBBcb']=_0x50b1c2,_0x2f3776=arguments,iii1II['NgEabQ']=!![];}const _0x2efb04=_0x27f648[0x0],_0x183817=_0x3f2a0e+_0x2efb04,_0x46f0a8=_0x2f3776[_0x183817];return!_0x46f0a8?(iii1II['HqnNrV']===undefined&&(iii1II['HqnNrV']=!![]),_0x2c1990=iii1II['hcBBcb'](_0x2c1990,_0x2fce96),_0x2f3776[_0x183817]=_0x2c1990):_0x2c1990=_0x46f0a8,_0x2c1990;},iii1II(_0x2f3776,_0xa3b387);}!cookiesArr[0x0]&&($['msg']($[IilliI(0x238,'ddNQ')],IilliI(0x235,'VfI8')),process['exit'](0x1));!(async()=>{const IlI1ii=IilliI;notify['config']({'title':$[IlI1ii(0x1d5,'*ixh')]}),await Main(),isNotify&¬ify[IlI1ii(0x1a3,'9@L8')]()&&await notify[IlI1ii(0x1c1,'tXb]')]();})()[IilliI(0x1c3,'MMjQ')](iii1Ii=>$[IilliI(0x249,'Ol9^')](iii1Ii))[IilliI(0x23f,'Ol9^')](()=>$['done']());async function Main(){const lIIiii=IilliI,iii1Il={'vqoVu':function(lI1IiI,i1lI){return lI1IiI>i1lI;},'djnxd':function(IlI1l,lilIil){return IlI1l!==lilIil;},'NGlgR':function(i1l11,i1l1li){return i1l11(i1l1li);},'lknWa':function(i1ilii,iIIII1){return i1ilii>iIIII1;},'PTTXL':'\x20➜\x20'};try{try{const I1iIiI=parseInt(taskThreads);iii1Il['vqoVu'](I1iIiI,0x0)&&iii1Il[lIIiii(0x244,'Bmy5')](I1iIiI,0x1)&&(taskThreads=I1iIiI);}catch{taskThreads=0x1;}taskThreads=Math[lIIiii(0x1a7,'Ol9^')](taskThreads,0xa),$[lIIiii(0x22f,'Td^m')]=null;if(runInterval)try{const li1I1=iii1Il['NGlgR'](parseInt,runInterval);li1I1>=0x0&&($[lIIiii(0x217,'eY3&')]=li1I1);}catch{console['log'](lIIiii(0x1f9,'eY3&'));}console['log'](''),$['needRemoveCookieIndex']=[],await common[lIIiii(0x1fa,'Bmy5')](taskThreads,cookiesArr,taskFnc),$[lIIiii(0x1f7,')bSZ')]=![];iii1Il['lknWa']($[lIIiii(0x1bc,'xvWL')][lIIiii(0x201,'5Bv]')],0x0)&&(cookiesArr=cookiesArr[lIIiii(0x1b8,'$1^L')]((i1ilil,lilIii)=>!$[lIIiii(0x1f2,'*!Zl')][lIIiii(0x1de,'hgTd')](lilIii+0x1)),$[lIIiii(0x1e0,'tXb]')]=[]);const i1l1ll=notify[lIIiii(0x20e,'*lac')]();i1l1ll&&(console['log'](lIIiii(0x1ba,'ny8G')+i1l1ll[lIIiii(0x1c0,'$#B&')](/:/g,iii1Il['PTTXL'])),isNotify&&await notify['push']());}catch(i1ill1){console['log']('❌\x20脚本运行遇到了错误\x0a'+i1ill1);}}async function taskFnc(iIIl1l,llIli1){const iI1lli=IilliI,iliIII={'GbAbQ':iI1lli(0x1cc,'eY3&'),'UnBsG':function(Ii1iIl,iliIIi){return Ii1iIl===iliIIi;},'knTgl':function(ill11I,Iliiil){return ill11I===Iliiil;},'rolMM':'hc.doTaskColorJsf.exchangePrizes','lXNzT':iI1lli(0x24e,'ddNQ'),'JZbru':function(li1Il,li1Ii){return li1Il==li1Ii;},'MhcYf':iI1lli(0x23b,'Gk(!'),'jbtah':'时间范围内','kmAnu':iI1lli(0x1cd,'MMjQ'),'VvviS':'POST','frnLQ':'684f0','LwDln':iI1lli(0x1e6,'E$&M'),'qUeEI':iI1lli(0x230,')bSZ'),'wXLhI':iI1lli(0x245,'ny8G'),'Hlusk':'4.7','EnglQ':'4affa','HYcPn':iI1lli(0x231,'VYNe'),'qASff':iI1lli(0x1be,'Nl@4'),'jrPQi':iI1lli(0x1fb,'5&m!'),'ZflEN':iI1lli(0x23a,'ny8G'),'WYHRI':'https://prodev.m.jd.com','LzdeX':'https://prodev.m.jd.com/','WeXJC':iI1lli(0x23d,'$#B&'),'TVfJr':function(Iliiii,i1illI){return Iliiii<i1illI;},'xaFTr':function(i1IIl,I1lll1,i1IIi){return i1IIl(I1lll1,i1IIi);},'PMTmS':function(IIII1I,Iii111){return IIII1I>=Iii111;},'FvOBO':function(l1l1II,Iil1I1){return l1l1II>Iil1I1;},'duGbp':function(Ii1iII,l1i11I){return Ii1iII(l1i11I);},'OtIxr':iI1lli(0x251,'x&!S'),'roHeQ':iI1lli(0x1a0,'Athv'),'Ihxey':function(II11II,Ii1iI1){return II11II(Ii1iI1);}};if($[iI1lli(0x1b4,'Jc0w')])return{'runEnd':!![]};$[iI1lli(0x212,'*!Zl')]=![],$[iI1lli(0x1e5,')bSZ')]=![],$[iI1lli(0x22c,'SiCP')]=![];const iIIl1i=decodeURIComponent(common[iI1lli(0x240,'Nl@4')](iIIl1l,iI1lli(0x23e,'MMjQ'))),I1lllI='【账号'+llIli1+'】'+iIIl1i+':',ill111=notify['create'](llIli1,iIIl1i);if(iliIII[iI1lli(0x227,'DHaC')](pinFilter[iI1lli(0x22e,'Gk(!')],0x0)&&(pinFilter['includes'](iIIl1i)||pinFilter[iI1lli(0x1f5,'Nl@4')](iliIII[iI1lli(0x1e9,'lJZ6')](encodeURIComponent,iIIl1i)))){ill111['fix'](iliIII[iI1lli(0x1af,'*ixh')]),console['log'](ill111[iI1lli(0x229,'Athv')]()),$[iI1lli(0x1e3,'Td^m')][iI1lli(0x1fd,'8uks')](llIli1);return;}const Iliil1=await common[iI1lli(0x1ce,'$#B&')](iIIl1l);if(!Iliil1&&typeof Iliil1===iliIII[iI1lli(0x222,'Bmy5')]){console['log'](I1lllI+'账号无效'),$[iI1lli(0x1f2,'*!Zl')][iI1lli(0x24a,'xvWL')](llIli1);return;}const i1III=common[iI1lli(0x1c5,'y&Cc')](iIIl1i);await iliIIl(iliIII[iI1lli(0x21f,'$1^L')]);if($[iI1lli(0x1d9,'VYNe')])return{'runEnd':!![]};if(!$[iI1lli(0x1b3,'SiCP')]){const lilIli=iI1lli(0x20c,'*!Zl')['split']('|');let Iliili=0x0;while(!![]){switch(lilIli[Iliili++]){case'0':$[iI1lli(0x208,'5Bv]')]=iliIII['MhcYf'];continue;case'1':await iliIII[iI1lli(0x1d0,'KiC1')](iliIIl,iliIII['rolMM']);continue;case'2':$[iI1lli(0x206,'hgTd')]=iI1lli(0x1fe,'u)]i');continue;case'3':if($[iI1lli(0x24c,'SiCP')])await $[iI1lli(0x22a,'9@L8')]($['waitTime']);continue;case'4':await iliIII['Ihxey'](iliIIl,iliIII[iI1lli(0x1f1,'Jc0w')]);continue;}break;}}if($[iI1lli(0x1e1,'kF5H')]&&$[iI1lli(0x1d3,'xvWL')]){$[iI1lli(0x1c6,'$#B&')]=!![];return;}if($[iI1lli(0x1d9,'VYNe')])return{'runEnd':!![]};if($[iI1lli(0x1c8,'E$&M')])await $[iI1lli(0x24f,'oTr$')]($[iI1lli(0x24d,'C^$r')]);async function Ii1iIi(Iliill,IIII11){const ll1iI=iI1lli;try{switch(Iliill){case iliIII['GbAbQ']:if(iliIII[ll1iI(0x223,'xvWL')](IIII11[ll1iI(0x1d1,'%nrF')],'0')&&iliIII['knTgl'](IIII11[ll1iI(0x19d,'8uks')],'0')){$[ll1iI(0x214,'5Bv]')]=IIII11;if($[ll1iI(0x210,'$#B&')]){let i1illi=$[ll1iI(0x220,'e8$H')]['hasRisk']||![];if(i1illi){console[ll1iI(0x1bd,'KiC1')](I1lllI+ll1iI(0x228,'eY3&')),$['skipRun']=!![];return;}}}else IIII11[ll1iI(0x1a1,'ny8G')]?console[ll1iI(0x221,'vi1I')](IIII11['msg']):console[ll1iI(0x1a2,'oTr$')]('❓'+Iliill+'\x20'+JSON[ll1iI(0x252,'x&!S')](IIII11));break;case iliIII[ll1iI(0x1ca,'Nl@4')]:if(IIII11[ll1iI(0x20a,'VfI8')]&&IIII11['subCode']==='0'){let i1illl='';if(IIII11[ll1iI(0x1ab,'Jc0w')]['rewardsDetail']){let I1llil=IIII11['data']['rewardsType']||0x0;switch(I1llil){case 0x1:i1illl=ll1iI(0x21c,'8uks')+IIII11[ll1iI(0x1bb,'Td^m')][ll1iI(0x1d6,'8uks')]+'金币';break;case 0x3:i1illl=ll1iI(0x1c7,'6C7e')+IIII11['data']['rewardsDetail']+'京豆';break;default:i1illl=ll1iI(0x225,'xvWL')+JSON[ll1iI(0x213,'*ixh')](IIII11[ll1iI(0x241,'Gk(!')])+')';break;}}else i1illl=ll1iI(0x1d4,'y&Cc');console[ll1iI(0x1f0,'5Bv]')](''+I1lllI+i1illl),ill111['insert'](i1illl);}else{if(IIII11['data']&&IIII11['data'][ll1iI(0x1d7,'SiCP')])console[ll1iI(0x1e4,'*lac')](I1lllI+'兑换失败:'+IIII11[ll1iI(0x200,'lJZ6')][ll1iI(0x204,'x&!S')]),[iliIII['lXNzT']]['some'](I1llii=>IIII11['data'][ll1iI(0x23c,'hgTd')]['includes'](I1llii))&&(iliIII['JZbru']($[ll1iI(0x1da,'DHaC')],'4P53Ars5B2hFuEFrtP6owpFriDbW')&&($[ll1iI(0x1b9,'hgTd')]=!![]),iliIII[ll1iI(0x248,'5Bv]')]($['encryptAssignmentId'],iliIII['MhcYf'])&&($[ll1iI(0x1b6,'DHaC')]=!![]));else IIII11['msg']?[iliIII['jbtah']][ll1iI(0x1b5,'VYNe')](lilIll=>IIII11[ll1iI(0x247,'%nrF')]['includes'](lilIll))?($['encryptAssignmentId']==iliIII[ll1iI(0x239,'9@L8')]&&($['skipRun20']=!![]),iliIII['JZbru']($[ll1iI(0x206,'hgTd')],iliIII[ll1iI(0x1c9,'VfI8')])&&($[ll1iI(0x236,'y&Cc')]=!![]),console['log'](''+I1lllI+IIII11[ll1iI(0x21b,'E)z3')]+ll1iI(0x19e,'tTag'))):console['log'](''+I1lllI+IIII11[ll1iI(0x1a9,'XQv3')]):console['log']('❓'+Iliill+'\x20'+JSON[ll1iI(0x232,'e8$H')](IIII11));}break;}}catch(l1i111){console['log'](ll1iI(0x237,'XQv3')+Iliill+ll1iI(0x1b7,'u)]i')+(l1i111[ll1iI(0x1b1,'tTag')]||l1i111));}}async function iliIIl(iliII1){const iI1lll=iI1lli;if($['runEnd'])return;let II11I1='',Iii11I=null,Iil1II=null,iIIl1I=iliIII[iI1lll(0x1cf,'Bmy5')],I1iIli={},lI1Ill={};switch(iliII1){case iliIII[iI1lll(0x205,'Td^m')]:lI1Ill={'appId':iliIII[iI1lll(0x1df,'Td^m')],'functionId':iliIII['GbAbQ'],'appid':iliIII[iI1lll(0x246,'eY3&')],'body':{'encryptProjectId':iI1lll(0x22b,'Athv'),'sourceCode':iliIII['qUeEI'],'ext':{'needNum':0xa,'rewardEncryptAssignmentId':iliIII[iI1lll(0x21e,')bSZ')],'assistEncryptAssignmentId':iI1lll(0x1e8,'%nrF'),'assistInfoFlag':0x4,'assistNum':0x5}},'version':iliIII['Hlusk'],'ua':i1III,'t':!![]},I1iIli=await H5st['getH5st'](lI1Ill),II11I1='https://api.m.jd.com/client.action?functionId='+iliII1,Iii11I=I1iIli[iI1lll(0x1fc,'1GF6')];break;case iI1lll(0x1c4,'%nrF'):lI1Ill={'appId':iliIII['EnglQ'],'functionId':iliIII[iI1lll(0x1d8,'ny8G')],'appid':iliIII[iI1lll(0x22d,'VYNe')],'body':{'encryptAssignmentId':$['encryptAssignmentId'],'encryptProjectId':iI1lll(0x216,'6UX%'),'actionType':0x2},'version':iliIII[iI1lll(0x1f6,'5POg')],'ua':$['UA'],'t':!![]},I1iIli=await H5st['getH5st'](lI1Ill),II11I1=iI1lll(0x19f,'e8$H')+iliII1,Iii11I=I1iIli[iI1lll(0x219,'lI4u')];break;default:console[iI1lll(0x1e7,'C^$r')]('❌\x20未知请求\x20'+iliII1);return;}const lI1Ili={};Iii11I&&(Iii11I={...Iii11I,...lI1Ili});Iil1II&&(Iil1II={...Iil1II,...lI1Ili});const IliilI={'url':II11I1,'method':iIIl1I,'headers':{'Accept':iliIII['HYcPn'],'Accept-Encoding':'gzip,\x20deflate,\x20br','Accept-Language':iliIII[iI1lll(0x1ae,'ddNQ')],'Connection':iliIII['jrPQi'],'Content-Type':iliIII[iI1lll(0x209,'Td^m')],'Cookie':iIIl1l,'Origin':iliIII[iI1lll(0x211,'5POg')],'Referer':iliIII[iI1lll(0x20d,'5POg')],'x-rp-client':'h5_1.0.0','User-Agent':i1III},'params':Iil1II,'data':Iii11I,'timeout':0x7530};iliIII[iI1lll(0x1f8,'ga8R')](iIIl1I,iliIII['WeXJC'])&&(delete IliilI[iI1lll(0x1ff,'5POg')],delete IliilI[iI1lll(0x253,'Nl@4')][iI1lll(0x233,'DHaC')]);const i1II1=0x1;let iIIl11=0x0,l1l1I1=null,I1iIll=![];while(iliIII['TVfJr'](iIIl11,i1II1)){const I1lliI=await common['request'](IliilI);if(!I1lliI['success']){l1l1I1='🚫\x20'+iliII1+iI1lll(0x20f,'KiC1')+I1lliI['error'],iIIl11++;continue;}if(!I1lliI[iI1lll(0x1bb,'Td^m')]){l1l1I1=iI1lll(0x1d2,'Ol9^')+iliII1+iI1lll(0x1dd,'e8$H'),iIIl11++;continue;}await iliIII[iI1lll(0x1c2,'DHaC')](Ii1iIi,iliII1,I1lliI[iI1lll(0x242,'Bmy5')]),I1iIll=![];break;}iliIII[iI1lll(0x1aa,'*!Zl')](iIIl11,i1II1)&&(console['log'](l1l1I1),I1iIll&&($[iI1lll(0x243,'lI4u')]=!![]));}}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)}
|