mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
15 lines
28 KiB
JavaScript
15 lines
28 KiB
JavaScript
/*
|
||
活动名称:秒杀浏览领京豆
|
||
环境变量:jd_seckill_viewTask_interval // 自定义运行间隔时长(整数,单位毫秒),默认1000
|
||
jd_seckill_viewTask_notify // 是否推送通知(true/false),默认不推送
|
||
jd_seckill_viewTask_pinFilter // 账号pin过滤,多个用@进行分割
|
||
|
||
定时随机
|
||
|
||
*/
|
||
|
||
const $ = new Env('秒杀浏览领京豆')
|
||
const _0x4ef45a=_0x5cfb;(function(_0x165829,_0x22a9fa){const _0x1c4da8=_0x5cfb,_0x36da36=_0x165829();while(!![]){try{const _0xeaefa4=parseInt(_0x1c4da8(0x244,'D8]@'))/0x1+-parseInt(_0x1c4da8(0x22d,'[5Rm'))/0x2*(parseInt(_0x1c4da8(0x23a,'kRK!'))/0x3)+parseInt(_0x1c4da8(0x20e,'^@0g'))/0x4+-parseInt(_0x1c4da8(0x1cd,'O(1H'))/0x5+parseInt(_0x1c4da8(0x24f,'#%Jw'))/0x6*(parseInt(_0x1c4da8(0x257,'#%Jw'))/0x7)+parseInt(_0x1c4da8(0x27e,'aPuh'))/0x8+parseInt(_0x1c4da8(0x239,'2&ii'))/0x9;if(_0xeaefa4===_0x22a9fa)break;else _0x36da36['push'](_0x36da36['shift']());}catch(_0x38590e){_0x36da36['push'](_0x36da36['shift']());}}}(_0x1b48,0x4192d));const jdCookie=require(_0x4ef45a(0x202,'jwHU')),notify=require(_0x4ef45a(0x259,'4A0Z')),common=require(_0x4ef45a(0x22b,'2&ii')),{H5st}=require(_0x4ef45a(0x1fc,'5dB^')),CryptoJS=require(_0x4ef45a(0x268,'5!YX'));let taskThreads=process['env'][_0x4ef45a(0x1d9,'V0[6')]||'1';const runInterval=process[_0x4ef45a(0x233,'O(1H')][_0x4ef45a(0x251,'KgHz')]||_0x4ef45a(0x1e5,'GswL'),isNotify=(process[_0x4ef45a(0x1c4,'xyVb')][_0x4ef45a(0x1f5,'wXkU')]||process[_0x4ef45a(0x24b,'aPuh')]['jd_seckill_viewTask_Notify'])==='true',pinFilter=(process[_0x4ef45a(0x275,'2&ii')]['jd_seckill_viewTask_pinFilter']||'')['split']('@'),maxThreads=0x1;let cookiesArr=Object[_0x4ef45a(0x23e,'kRK!')](jdCookie)[_0x4ef45a(0x228,'D8]@')](_0x272156=>jdCookie[_0x272156])['filter'](_0x21c538=>_0x21c538);!cookiesArr[0x0]&&($[_0x4ef45a(0x24a,'@BVa')]($[_0x4ef45a(0x273,'&KYa')],_0x4ef45a(0x246,'jsvL')),process[_0x4ef45a(0x1cc,'O(1H')](0x1));function _0x1b48(){const _0x749280=['WPvlAH1iq8ovi8oKpmkCWP0','dUkCS8ov','W6tcQ0/dKCoSW7K0','sCkZW63cQq','W7ZcQcO','4PIlW5ROH4VLRQZKU7FOVOxOOAVPLzRPMl/MLl/PLARORRVNV4NPLOFORQa','WQuKpa','wmkVjdK0','W6n7fG','4P+pWONOHOdMNQlOV4ROO6JPGlxLIOxKUlpPLk/ORzxcKq','ySohWR4OWQTtWPmcWPxdOmoThLVcImkwBwJcGexdJMXUj8k+WOr8','tCk3W6FcTSkPW5ZcMmkrW78hWOFdKhFcOmo4','xSkuW5O5W67dPa','pN5RoIldSKFcIK8aW4faqCowoZtcNmkuwSkH','dCoPW5z2rJK4WPhdHX4','WRxdUCoOWPiDDCoJawpdRmkqnmo+B2JdRa','mqFdJGZdQCosE8oxrIdcKW','b8otWRHTW4RdSa/dVmkKW6ZcSq/dKmkdvmo2','rmkvW4amW7pcUIldVvJcPtddJr8NWRSkWPJdJ2LiW6K','W7/dHIrM','6lsp5yYl6lYk5RU9WPNcVcC','ftyAzmkYxIRcHM0eW4tdJSoOW67cSvTP','xCokWPzszGlcRWPGb8orW5ZcMmomW4u','nc7cS2HyWPRcSh1iW4S','kKJdSshcLCkWW4pdJCoUWRu','W6BcVHq','WO/cHHi+nf7cMSo+','WQDdW4C','e8kDWOrOW6BdImk9WQhdNLyfadnZjW','WOFcT8kjWOhcLa','jw98itJcPatdS1yxW5K6tCkloG','WQuGtYHtW5K','C1hcSwn1WPddRICnWPy','WPxdMCoi','y2TM','WPZdJbyfWO5LBCoyW6BcMwfr','W6ygW7ee','xSkDWQrTW7FdTrhcTG','fvWG','D3yKWPLx','5lUi6lgrvpc6Kk4','vSk9WOuQf2H8','5Bsc6kY357676lA16l2B6l+j6koa5B6y5yM66lEA5y6x','W6ddKZLIFmk8qwdcQ0KGW7xdJ0BcICoBuSo8WQNdO8kWd8oLBcL7W6BdNmk4ohxdHWKmW73cUbpcHxZcRgRcVmoHg3JdK8ouWOXzWPKRqCoei0xcSdmPlgdcGSo8BWddPZldS8kCW7y5W74c','5y+c6yAI54Md5Oc557QM5P6sESk0WPRcQL3dPf9GW7JdLG','e8kgWQTkW6RdKG','8l+OGSk6','W64cW6ScWQKA','WQ/dPmoeWO8rcSk7y8kIWRX4FNX0seDnW7GdW60+W5qRmfC','W6/dHSo9','yufpld/cSde','mhyqWRW','koITLoAYO+wsLUw5MHa','vmohW5H6qulcUtqYe8kBWRJdL8kgWOiBk1fZcIddRr1nACoycSk1oCkqrLbEW6BdMGbPWPHYW6bnC0VcHCokWOBcIq','gCknWP/dLmkAW4jYimo2W6e','W7TQW4zgWQJcPCo9W6ddQCokt8kW','CHNcGuGgW7DOWQBdHSoNcCo3d3pcR8kpoSo8iGiMEmo9W6FdUWBdM1JdO2hdOSocW6Dm','oMv4dYpcUG','fguBWRP1E8oxWQabWQOHWQm','WQuIl0xdUM/cS8onW6W/','6Acj5y+D5lMo5yQm5AAU5yMM5OQc5yIyWQhcJW','WP3dQmkL','W7eoW6ilWRGwh8k0WPzNW4GOfhhcHq','6ykz552m5OYY6ykpimkekq','W6DKlLtdJdpdRSotWPbVkwjlc8kLW7RdP8kLWQf7hCkbhG','W4/dNJy','BNNdUM1KWP57','naRdGapdPmkSjmkleLq','kIBdS03cKCoAW4u','cZ/dKSk2WRFdPmko','W4aypea2bSoY','BmocWPu6','W6CjW7m','chGt','W7JdKJ56','FhyJWQPnACodW4hcOZPwWPTgtSoU','5RAf5yI/5yA45y+dWOuyW4C0W6nc56sd5P6sWOJLJBNKUAhOPyq','cNirW7bkmmoqWQTzWQWnWQe4W7eGWOpdICkWWPZcT08','W7X7AHpcL2JdISkQWPfTdgq','W5pdPCotW6hdRCkVWRddHYBcPYGZ','ySo/pG','DgtcVgHjWPdcSNLxW4S3W4mrpSoiWPddMs1aD8kd','W40nWPG','WOVcT8kEWQC','qmkoW5m','j8oZCCkkx8kMWPRcVSk6W6q','5lMz5yUC6l6g5BQiqLm','WR0Il0ZdGa','EbZcONZdR8oWWPG','W4JcUCoMDmkSwSoUWQPEWRuH','FGlcM10','44ck5O6956Ep44cP6k6c5yAf6i+W5y2FW6tdUa/cSGS4','sCofrmo0pSo6y8o7','sSkiW5GiW6xdSG','5lQs6lkuWQtXIio2','dSkbWPm','W4ZdMtG','WPhdKxNdUt8','FvBcJLxcICoJDSorxqZcOqK','WOFdQmk8mSoiCmoHWQ4','WRVcLN4Npmk1wdNcSNylWO/dIG','WQXjW5rFeSo0WPC','W5tdS8kcu8oAw8oTdCoFa8koWQtdJmoVhCocW4CJWQ10WRrjWRipsZefva','W7pcQcNdLq','xmkuW4Cu','hSkXnmoyemoVW5NcN8kskgBdPaK','wSkzWQ5YW4RdSbdcHCkFW6ZcPd7dNCkdya','4P+or+AER+EEGoISQUAWSga','WR/dRb10yCo+nW','jxtdN20','W5isW53dVvrjWO87WO3dUWm7W5tdNWdcPrunWPmGWOGSW7O2AcSG','oMv4','WOFcT8ktWOtcP8oZWO3dUtdcLraUtSk1','WOJcKGGI','W7NdUb3dIa','W6tdJmoUW4j7W5axW4BdGxFdISoRWPNcKmkMamkNW7yx','WQC6ut9yW4NcTSkriq0xWQWJvsa','W7/dU8krWPGE','WR9dW7nJvCoUWO3dTW','F8ocWOGV','oCktW5LRW78gW4G5WQJdGmoOcwa','n2VdGMrN','W5JORjdMSlNLPBVOTyux4P2RWRVMLPZLKyZLUylMLy7MJyu','6Aok5OgC5zAi','vdPgWRKHBmke','Bhz4p0ddUI7dJG0','6zAI6zQE5PEP6zs1A8oOmW','WRtdUmofWPyraSo6q8kIWR1QrszVwG','o37dGxTJWOfq','W6qoW70','WPpcPSkvWR3cU8o7WPZdPHO','WPldRmk0kmosBmoH','WQlORPdMS4FLPztOT7Hs4P+CW6m','W4RdO8kPeq','W4KnWPNcUG8sWQTcWOZdUsy9','mNRdHMK','iSo3ECkF','WRpdRmoSWRCw','WQWLlq','BqZcNeWHWQqQW6W','tSoVACklsSk7','W7tcJ8kjW5y3W4ldGNu','W4lcUaCicW','WPvtW5VdRe9r','jqTkASoRza','ohRdN20','5lQL6lgXW53WKloV','WPJcH3JcPwVdR8oNW6ZdNCk6wwxdMG','W7lcQcldNmolwuW','56szCEI9SoIHM+MxK+MyK+AuLEMxRW','p3xdGw1WWPi','xCkDWR5YW7FdTa7cTSkfW6hcVaBdMa','WR4QmLq','WQ5cW5y','qSoaWPi','pNyt','6lwf5yYf5Psu5PwY','FwtcRuqUWOBcQW','EX3cHvqCWQ4MW73dJSo4dSo2cc7cQSkfomk/oqPXB8k+W77dSGNdHHJcRIlcVmkeWQi','W4xcN0rsW6WWsSobW53cRfzQW4JdTsBcVSo3W6ZdQCoDW7m','wSkZW7dcVa','W6CFW6Wr','WRnxWR1vW6XeCmkrWQ8EW40GlG','W5BdSSk8rmoAsSo1','6AkC5y675lIo5yQz5AsJ5yM85OMx5yIwWP3cTW','W7NcOeuVjJu','tgxcK8ovW6q','WQVdSSob','5lIh5yQC6l2Z5BIVbWu','BqtcK1e','b8ktWObB','BCo/pCo8','dmknWPRdRmkAW4j1','zmomWOy','W7RcOXldG8olw0LyW6hcQCk2oCk0WOHzlCoIW4jTrKZdHCoWoHniWPNcMa','wSkvWQP3W4BdUcpcPmkEWRZcJapdLmkfAq','8lwiNg4','msmDymo7edRdJL8rW5xdNW','W654W4zeWP/cUq','W5ldUmk6','WORcGGSMavtcKG','nSoYeCo8p8kzWPy','WO7cS8kkWRe','W5ZcVq8ehCoiaW','fMiAW5f2mq','wMpcLSoOW7K','WQSYWOhcLq','W6HUW4fUWPFcUmo5W67dVSo5xCkVWP3cNG','cCkjWOldRCkRW5HSja','W4lcSq0ab8omdSo6eq5sWQzkWOT2','W5ldSSkZr8olua','lGTqqCo+EbddISoeb8osWQNdOmotANhcIwHD'];_0x1b48=function(){return _0x749280;};return _0x1b48();}!(async()=>{const _0x4295c6=_0x4ef45a;notify[_0x4295c6(0x277,'H2zy')]({'title':$[_0x4295c6(0x27c,'[5Rm')]}),await Main(),isNotify&¬ify['getMessage']()&&await notify[_0x4295c6(0x253,'t@6G')]();})()[_0x4ef45a(0x212,'phao')](_0x12b4b2=>$[_0x4ef45a(0x224,'H$IO')](_0x12b4b2))[_0x4ef45a(0x214,'U!xK')](()=>$[_0x4ef45a(0x245,'jsvL')]());function _0x5cfb(_0xd0f684,_0x5a30a2){const _0x1b4824=_0x1b48();return _0x5cfb=function(_0x5cfb21,_0x3cf7ac){_0x5cfb21=_0x5cfb21-0x1c3;let _0x515c8e=_0x1b4824[_0x5cfb21];if(_0x5cfb['iXFuPP']===undefined){var _0x27103e=function(_0x21c538){const _0x12b4b2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18d806='',_0x4c6e18='';for(let _0x255761=0x0,_0x1a6517,_0x228e85,_0x1230dd=0x0;_0x228e85=_0x21c538['charAt'](_0x1230dd++);~_0x228e85&&(_0x1a6517=_0x255761%0x4?_0x1a6517*0x40+_0x228e85:_0x228e85,_0x255761++%0x4)?_0x18d806+=String['fromCharCode'](0xff&_0x1a6517>>(-0x2*_0x255761&0x6)):0x0){_0x228e85=_0x12b4b2['indexOf'](_0x228e85);}for(let _0x2ac776=0x0,_0x1a76ad=_0x18d806['length'];_0x2ac776<_0x1a76ad;_0x2ac776++){_0x4c6e18+='%'+('00'+_0x18d806['charCodeAt'](_0x2ac776)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c6e18);};const _0x272156=function(_0xb1ad1c,_0x49d2cf){let _0x55c50c=[],_0x49c34e=0x0,_0x43616a,_0x1aeabf='';_0xb1ad1c=_0x27103e(_0xb1ad1c);let _0x2c6ae4;for(_0x2c6ae4=0x0;_0x2c6ae4<0x100;_0x2c6ae4++){_0x55c50c[_0x2c6ae4]=_0x2c6ae4;}for(_0x2c6ae4=0x0;_0x2c6ae4<0x100;_0x2c6ae4++){_0x49c34e=(_0x49c34e+_0x55c50c[_0x2c6ae4]+_0x49d2cf['charCodeAt'](_0x2c6ae4%_0x49d2cf['length']))%0x100,_0x43616a=_0x55c50c[_0x2c6ae4],_0x55c50c[_0x2c6ae4]=_0x55c50c[_0x49c34e],_0x55c50c[_0x49c34e]=_0x43616a;}_0x2c6ae4=0x0,_0x49c34e=0x0;for(let _0x167d93=0x0;_0x167d93<_0xb1ad1c['length'];_0x167d93++){_0x2c6ae4=(_0x2c6ae4+0x1)%0x100,_0x49c34e=(_0x49c34e+_0x55c50c[_0x2c6ae4])%0x100,_0x43616a=_0x55c50c[_0x2c6ae4],_0x55c50c[_0x2c6ae4]=_0x55c50c[_0x49c34e],_0x55c50c[_0x49c34e]=_0x43616a,_0x1aeabf+=String['fromCharCode'](_0xb1ad1c['charCodeAt'](_0x167d93)^_0x55c50c[(_0x55c50c[_0x2c6ae4]+_0x55c50c[_0x49c34e])%0x100]);}return _0x1aeabf;};_0x5cfb['kDAoff']=_0x272156,_0xd0f684=arguments,_0x5cfb['iXFuPP']=!![];}const _0x3c80a6=_0x1b4824[0x0],_0x5218cd=_0x5cfb21+_0x3c80a6,_0x5d22df=_0xd0f684[_0x5218cd];return!_0x5d22df?(_0x5cfb['cYttjo']===undefined&&(_0x5cfb['cYttjo']=!![]),_0x515c8e=_0x5cfb['kDAoff'](_0x515c8e,_0x3cf7ac),_0xd0f684[_0x5218cd]=_0x515c8e):_0x515c8e=_0x5d22df,_0x515c8e;},_0x5cfb(_0xd0f684,_0x5a30a2);}async function Main(){const _0x231c16=_0x4ef45a;try{try{const _0x4c6e18=parseInt(taskThreads);_0x4c6e18>0x0&&_0x4c6e18!==0x1&&(taskThreads=_0x4c6e18);}catch{taskThreads=0x1;}taskThreads=Math['min'](taskThreads,maxThreads),$['waitTime']=null;if(runInterval)try{const _0x255761=parseInt(runInterval);_0x255761>=0x0&&($[_0x231c16(0x205,'C4y^')]=_0x255761);}catch{console['log'](_0x231c16(0x1f0,'^@0g'));}$[_0x231c16(0x238,'x*pY')]=[],console[_0x231c16(0x23b,'fS(]')](_0x231c16(0x22e,'a9Fk')+$['name']+'变量开启状态=========='),console[_0x231c16(0x1c6,'PKWN')](_0x231c16(0x237,'KgHz')),console[_0x231c16(0x23f,'t@6G')]('代理开关:\x20['+common[_0x231c16(0x25b,'kRK!')]()+']'),console[_0x231c16(0x1c5,'O0Eu')](_0x231c16(0x269,'H$IO')+$[_0x231c16(0x1e7,'w2Y[')]/0x3e8+_0x231c16(0x280,'xyVb')),console[_0x231c16(0x1d2,'IxU]')](_0x231c16(0x22a,'Zhhk')+(isNotify?'开启':'关闭')+']'),console[_0x231c16(0x1ef,'V0[6')](_0x231c16(0x1ff,'5dB^')+pinFilter['join'](',\x20')+']'),console[_0x231c16(0x1d2,'IxU]')](_0x231c16(0x1f9,'U!xK')+$[_0x231c16(0x1e1,'kRK!')]+_0x231c16(0x217,'jsvL')),console[_0x231c16(0x21c,'Zhhk')](''),await common['concTask'](taskThreads,cookiesArr,taskFnc),$[_0x231c16(0x236,'phao')]=![],$[_0x231c16(0x1f7,'t@6G')]=![];$['needRemoveCookieIndex'][_0x231c16(0x21a,'O(1H')]>0x0&&(cookiesArr=cookiesArr[_0x231c16(0x248,'t@6G')]((_0x1a6517,_0x228e85)=>!$[_0x231c16(0x23c,'jwHU')]['includes'](_0x228e85+0x1)),$['needRemoveCookieIndex']=[]);const _0x18d806=notify[_0x231c16(0x221,'w2Y[')]();_0x18d806&&console[_0x231c16(0x234,'x*pY')]('\x0a📣\x20运行结果\x0a'+_0x18d806[_0x231c16(0x1df,'C4y^')](/:/g,_0x231c16(0x1ec,'O0Eu')));}catch(_0x1230dd){console[_0x231c16(0x1f1,'2&ii')](_0x231c16(0x1f4,'Zhhk')+_0x1230dd);}}async function taskFnc(_0x2ac776,_0x1a76ad){const _0x1e0277=_0x4ef45a;if($['runEnd'])return{'runEnd':!![]};const _0xb1ad1c=decodeURIComponent(common[_0x1e0277(0x1e6,'es1#')](_0x2ac776,_0x1e0277(0x218,'@BVa')));function _0x49d2cf(_0x16db24,_0x5ea013){const _0x5a648b=_0x1e0277;if(_0x16db24['length']<=0x4)return _0x16db24;else{const _0xc12cb=_0x16db24['slice'](0x0,0x2),_0x1ee50e=_0x16db24[_0x5a648b(0x279,'vfxq')](-0x2),_0x2b3715=Math['max'](_0x5ea013-_0xc12cb[_0x5a648b(0x1d0,'[L*s')]-_0x1ee50e[_0x5a648b(0x1e9,'KgHz')],0x0),_0x226555='*'['repeat'](_0x2b3715);return _0xc12cb+_0x226555+_0x1ee50e;}}const _0x55c50c=decodeURIComponent(_0xb1ad1c),_0x49c34e=_0x49d2cf(_0x55c50c,0x6),_0x43616a='【账号'+_0x1a76ad+'】'+_0x49c34e+':',_0x1aeabf=notify['create'](_0x1a76ad,_0xb1ad1c);if(pinFilter[_0x1e0277(0x27b,'E$p@')]>0x0&&(pinFilter['includes'](_0xb1ad1c)||pinFilter[_0x1e0277(0x278,'R!K2')](encodeURIComponent(_0xb1ad1c)))){_0x1aeabf[_0x1e0277(0x26c,'O(1H')](_0x1e0277(0x215,'D8]@')),console['log'](_0x1aeabf[_0x1e0277(0x1fa,'8bF8')]()),$[_0x1e0277(0x1ca,'^@0g')][_0x1e0277(0x235,'#%Jw')](_0x1a76ad);return;}const _0x2c6ae4=await common['getLoginStatus'](_0x2ac776);if(!_0x2c6ae4&&typeof _0x2c6ae4===_0x1e0277(0x27f,'V0[6')){console[_0x1e0277(0x1f1,'2&ii')](_0x43616a+'账号无效'),_0x1aeabf[_0x1e0277(0x22c,'aPuh')](_0x1e0277(0x1c7,'@BVa')),$['needRemoveCookieIndex'][_0x1e0277(0x25c,'C4y^')](_0x1a76ad);return;}const _0x167d93=common[_0x1e0277(0x208,'kRK!')](_0xb1ad1c);let _0x23a8bc=![],_0x439371=![],_0x4a5249,_0x4b2722,_0x45c10b=CryptoJS[_0x1e0277(0x204,'^@0g')](_0x2ac776)[_0x1e0277(0x261,'xyVb')]();_0x4a5249='',_0x4b2722=0x0,await _0x1b2d8b(_0x1e0277(0x255,'5dB^'));if(_0x23a8bc)return;if(_0x4a5249){if(!_0x4a5249['awardStatus']&&_0x4a5249[_0x1e0277(0x282,'5dB^')]){let _0x23d7b6=_0x4a5249['taskThreshold']-_0x4a5249[_0x1e0277(0x222,'es1#')];if(_0x23d7b6>0x0)for(let _0x567991=0x0;_0x567991<_0x23d7b6;_0x567991++){console[_0x1e0277(0x25a,'H$IO')](_0x43616a+_0x1e0277(0x1d3,'4A0Z')+_0x4a5249['taskProgress']+'/'+_0x4a5249['taskThreshold']),_0x4b2722=0x1,await _0x1b2d8b('seckillViewTask'),await $[_0x1e0277(0x1c3,'2&ii')](parseInt($[_0x1e0277(0x276,'jsvL')]*0x1+0x5dc,0xa)),_0x4a5249[_0x1e0277(0x24d,'a9Fk')]>=_0x4a5249['taskThreshold']&&(_0x4b2722=0x2,await _0x1b2d8b(_0x1e0277(0x209,'H$IO')),await $[_0x1e0277(0x1fe,'#%Jw')](parseInt($[_0x1e0277(0x247,'2NUa')]*0x1+0x5dc,0xa)),_0x4b2722==0x2&&(console[_0x1e0277(0x1de,'KgHz')](_0x43616a+'领取任务奖励成功:\x20'+_0x4a5249[_0x1e0277(0x243,'8*nD')]+'京豆\x20🐶'),_0x1aeabf[_0x1e0277(0x27a,'4A0Z')](_0x1e0277(0x1cf,'jsvL')+_0x4a5249[_0x1e0277(0x26e,'D8]@')]+_0x1e0277(0x249,'w(Xc'))));}else console[_0x1e0277(0x20d,'5!YX')](_0x43616a+_0x1e0277(0x241,'AJbR')+_0x4a5249['taskProgress']+'/'+_0x4a5249['taskThreshold']),_0x4b2722=0x2,await _0x1b2d8b(_0x1e0277(0x201,'O0Eu')),await $[_0x1e0277(0x262,'wXkU')](parseInt($['waitTime']*0x1+0x5dc,0xa)),_0x4b2722==0x2&&(console[_0x1e0277(0x25a,'H$IO')](_0x43616a+'领取任务奖励成功:\x20'+_0x4a5249[_0x1e0277(0x1ed,'L2BF')]+_0x1e0277(0x213,'x*pY')),_0x1aeabf[_0x1e0277(0x281,'[5Rm')](_0x1e0277(0x227,'es1#')+_0x4a5249[_0x1e0277(0x231,'AJbR')]+_0x1e0277(0x27d,'a9Fk')));}else console[_0x1e0277(0x206,'xyVb')](_0x43616a+'今天已完成任务');await _0x1b2d8b('popRetainWindow'),_0x439371&&(await _0x346fd1(),await $['wait'](parseInt($[_0x1e0277(0x24e,'D8]@')]*0x1+0x5dc,0xa)));}if($[_0x1e0277(0x20a,'3(!P')])return{'runEnd':!![]};await $[_0x1e0277(0x1ee,'w(Xc')](parseInt($[_0x1e0277(0x210,'5dB^')]*0x1+0x5dc,0xa));async function _0x43ed08(_0x2b363f,_0x4f6069){const _0x713359=_0x1e0277;try{switch(_0x2b363f){case _0x713359(0x1f6,'w(Xc'):_0x4f6069[_0x713359(0x1d6,'fS(]')]==='0'&&_0x4f6069['data']?_0x4a5249=_0x4f6069[_0x713359(0x232,'wXkU')]:(msg=common['getErrorMsg'](_0x4f6069),console[_0x713359(0x1de,'KgHz')](''+_0x43616a+_0x4f6069['errorMessage']),_0x23a8bc=!![]);break;case'popRetainWindow':_0x4f6069[_0x713359(0x252,'V0[6')]==='0'&&_0x4f6069[_0x713359(0x1cb,'w(Xc')]&&([_0x713359(0x266,'&KYa')][_0x713359(0x258,'[5Rm')](_0x3abd2c=>_0x4f6069[_0x713359(0x1d5,'@BVa')][_0x713359(0x242,'2&ii')]['includes'](_0x3abd2c))&&(_0x439371=!![]));break;}}catch(_0x415083){console[_0x713359(0x1d8,'wXkU')]('❌\x20未能正确处理\x20'+_0x2b363f+_0x713359(0x21f,'wXkU')+(_0x415083[_0x713359(0x26b,'[5Rm')]||_0x415083));}}async function _0x1b2d8b(_0x180a6a){const _0x40a66c=_0x1e0277;if($[_0x40a66c(0x1e3,'x*pY')])return;let _0x2f4d66='',_0x3de70d=null,_0x5b9fcc=null,_0x4fa1ef=_0x40a66c(0x25d,'aPuh'),_0x4b46fc={},_0x2d34ca={};switch(_0x180a6a){case _0x40a66c(0x26a,'IxU]'):_0x2d34ca={'appId':_0x40a66c(0x260,'IxU]'),'functionId':_0x40a66c(0x1e8,'vfxq'),'appid':_0x40a66c(0x229,'O(1H'),'clientVersion':common['getLatestAppVersion'](),'client':_0x40a66c(0x274,'8bF8'),'body':{'taskType':_0x4b2722,'skuId':_0x4b2722==0x1?_0x40a66c(0x23d,'4A0Z')+common['genRandomString'](0x9,_0x40a66c(0x203,'8*nD')):undefined},'version':'4.7','ua':_0x167d93,'t':!![],'bu1':_0x40a66c(0x226,'2&ii'),'tokenCache':![]};if(_0x4b2722===0x0)delete _0x2d34ca[_0x40a66c(0x21e,'PKWN')][_0x40a66c(0x1d1,'iVdD')];_0x4b46fc=await H5st[_0x40a66c(0x1c8,'jwHU')](_0x2d34ca),_0x2f4d66='https://api.m.jd.com/client.action',_0x3de70d=_0x4b46fc['paramsData'];break;case _0x40a66c(0x207,'@BVa'):_0x2d34ca={'appId':_0x40a66c(0x24c,'aPuh'),'functionId':_0x40a66c(0x25f,'3(!P'),'appid':_0x40a66c(0x1da,'5dB^'),'clientVersion':common[_0x40a66c(0x25e,'Zhhk')](),'client':_0x40a66c(0x264,'[5Rm'),'body':{},'version':_0x40a66c(0x1f3,'3(!P'),'ua':_0x167d93,'t':!![],'bu1':'lite_0.1.5','tokenCache':![]},_0x4b46fc=await H5st[_0x40a66c(0x250,'xyVb')](_0x2d34ca),_0x2f4d66=_0x40a66c(0x223,'jsvL'),_0x3de70d=_0x4b46fc['paramsData'];break;default:console['log'](_0x40a66c(0x256,'O(1H')+_0x180a6a);return;}const _0x5461b7={'screen':_0x40a66c(0x230,'iVdD'),'networkType':_0x40a66c(0x1d4,'jsvL'),'d_model':_0x40a66c(0x267,'x*pY'),'osVersion':common[_0x40a66c(0x1ea,'E$p@')](),'openudid':_0x45c10b,'uuid':_0x45c10b};_0x3de70d&&Object['assign'](_0x3de70d,_0x5461b7);_0x5b9fcc&&Object[_0x40a66c(0x1dd,'es1#')](_0x5b9fcc,_0x5461b7);const _0x232a09={'url':_0x2f4d66,'method':_0x4fa1ef,'headers':{'Accept':_0x40a66c(0x1c9,'jsvL'),'Accept-Encoding':_0x40a66c(0x200,'(Nef'),'Accept-Language':_0x40a66c(0x220,'O0Eu'),'Connection':_0x40a66c(0x240,'&KYa'),'Content-Type':'application/x-www-form-urlencoded','Cookie':_0x2ac776,'Origin':_0x40a66c(0x1f8,'H$IO'),'Referer':'https://pro.m.jd.com/mall/active/Md9FMi1pJXg2q7qc8CmE9FNYDS4/index.html','x-rp-client':'h5_1.0.0','Sec-Fetch-Dest':_0x40a66c(0x1e4,'iVdD'),'Sec-Fetch-Mode':'cors','Sec-Fetch-Site':'same-origin','User-Agent':_0x167d93},'params':_0x5b9fcc,'data':_0x3de70d,'timeout':0x7530};_0x4fa1ef===_0x40a66c(0x211,'PKWN')&&(delete _0x232a09['data'],delete _0x232a09[_0x40a66c(0x1ce,'KgHz')][_0x40a66c(0x1dc,'(Nef')]);const _0x3b636a=0x5;let _0x48faf9=0x0,_0x4c1d0b=null;while(_0x48faf9<_0x3b636a){_0x48faf9>0x0&&await $['wait'](0x3e8);const _0xa7e9cc=await common[_0x40a66c(0x1d7,'w2Y[')](_0x232a09);if(!_0xa7e9cc['success']){_0x4c1d0b=_0x40a66c(0x1db,'aPuh')+_0x180a6a+_0x40a66c(0x26f,'O(1H')+_0xa7e9cc[_0x40a66c(0x1f2,'J$o3')],_0x48faf9++;continue;}if(!_0xa7e9cc[_0x40a66c(0x272,'[5Rm')]){_0x4c1d0b=_0x40a66c(0x219,'Zhhk')+_0x180a6a+_0x40a66c(0x265,'C4y^'),_0x48faf9++;continue;}await _0x43ed08(_0x180a6a,_0xa7e9cc[_0x40a66c(0x20f,'O(1H')]);break;}_0x48faf9>=_0x3b636a&&console[_0x40a66c(0x1c5,'O0Eu')](_0x4c1d0b);}async function _0x346fd1(){const _0x149ecf=_0x1e0277,_0x2acc47={'has_native':'0','babelChannel':_0x149ecf(0x270,'KgHz'),'commontitle':'no','transparent':'1','hybrid_err_view':'1','copSource':_0x149ecf(0x1e2,'vfxq'),'jumpFrom':'1','tttparams':btoa(JSON[_0x149ecf(0x26d,'kRK!')]({'gLat':'','un_area':'','dLat':'','prstate':'0','addressId':'','lat':'','posLat':'','posLng':'','gps_area':_0x149ecf(0x22f,'8*nD'),'lng':'','gLng':'','model':_0x149ecf(0x20b,'jwHU'),'dLng':''}))},_0x147477=new URLSearchParams(_0x2acc47)['toString'](),_0x522036=await common['request']({'url':_0x149ecf(0x216,'#%Jw')+_0x147477,'method':_0x149ecf(0x20c,'8bF8'),'headers':{'Origin':'https://pro.m.jd.com','Referer':_0x149ecf(0x1fd,'t@6G'),'Cookie':_0x2ac776,'User-Agent':_0x167d93,'hybridXslAvailableElements':_0x149ecf(0x21b,'IxU]'),'Host':_0x149ecf(0x225,'x*pY'),'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'},'proxy':null,'debug':![],'timeout':0x7530}),_0x3d61e6=_0x522036['data'];return _0x3d61e6;}}
|
||
// 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) }
|