├── 1.jpg ├── Chinaunicom.js ├── README.md ├── dd_bucketWater.js ├── dd_cookie.js ├── dd_fruit.js ├── ddgy.js ├── df.jpg ├── flg.js ├── hf.jpg ├── jrttjsb.js ├── kgdzb.js ├── kgyy.js ├── ks.js ├── ks_fruit.js ├── ksjsbdb.js ├── kww_1130_01.js ├── txstock.js └── txstockV2.js /1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHwin/qltool/f4296271e33e72d6fa6ad8c62955c864fed5f872/1.jpg -------------------------------------------------------------------------------- /Chinaunicom.js: -------------------------------------------------------------------------------- 1 | /* 2 | 中国联通 3 | 功能:签到,签到任务,奖励:有话费红包吧 4 | 变量 ltphone 值:手机号 5 | 变量 ltpwd 值:密码 6 | 多账号用 @ 分隔 7 | 8 | ql raw https://gitee.com/xiecoll/radish-script/raw/master/Chinaunicom.js 9 | 10 | cron 5 9,11,18 * * * Chinaunicom.js 11 | */ 12 | 13 | const $ = new Env('中国联通');//Chinaunicom 14 | let status; 15 | status = (status = ($.getval("ddgystatus") || "1")) > 1 ? `${status}` : ""; // 账号扩展字符 16 | let phoneArr = [], pwdArr = [] 17 | let ltphone = $.isNode() ? (process.env.ltphone ? process.env.ltphone : "") : ($.getdata('ltphone') ? $.getdata('ltphone') : "") 18 | let ltpwd = $.isNode() ? (process.env.ltpwd ? process.env.ltpwd : "") : ($.getdata('ltpwd') ? $.getdata('ltpwd') : "") 19 | let phones = '', pwds = '' 20 | let xbiz, prod_key, ecs_token = '' 21 | const os = require('os'); 22 | var timestamp = Math.round(new Date().getTime() / 1000).toString(); 23 | 24 | function _0x811a(_0x2657f2,_0x28ea54){const _0x3b9ab4=_0x3b9a();return _0x811a=function(_0x353fb4,_0x1b8397){_0x353fb4=_0x353fb4-0x1db;let _0x3e94fc=_0x3b9ab4[_0x353fb4];if(_0x811a['lLhFlv']===undefined){var _0x4e61f9=function(_0x2dee80){const _0xc45a23='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2fea6d='',_0x472d6b='';for(let _0x12e3f9=0x0,_0x14d03b,_0x34d739,_0x841ef7=0x0;_0x34d739=_0x2dee80['charAt'](_0x841ef7++);~_0x34d739&&(_0x14d03b=_0x12e3f9%0x4?_0x14d03b*0x40+_0x34d739:_0x34d739,_0x12e3f9++%0x4)?_0x2fea6d+=String['fromCharCode'](0xff&_0x14d03b>>(-0x2*_0x12e3f9&0x6)):0x0){_0x34d739=_0xc45a23['indexOf'](_0x34d739);}for(let _0x553290=0x0,_0x33e88e=_0x2fea6d['length'];_0x553290<_0x33e88e;_0x553290++){_0x472d6b+='%'+('00'+_0x2fea6d['charCodeAt'](_0x553290)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x472d6b);};const _0x811a6=function(_0x27a4f9,_0x43078a){let _0x449325=[],_0x2acade=0x0,_0x3467b1,_0x1b1c44='';_0x27a4f9=_0x4e61f9(_0x27a4f9);let _0x3c5d34;for(_0x3c5d34=0x0;_0x3c5d34<0x100;_0x3c5d34++){_0x449325[_0x3c5d34]=_0x3c5d34;}for(_0x3c5d34=0x0;_0x3c5d34<0x100;_0x3c5d34++){_0x2acade=(_0x2acade+_0x449325[_0x3c5d34]+_0x43078a['charCodeAt'](_0x3c5d34%_0x43078a['length']))%0x100,_0x3467b1=_0x449325[_0x3c5d34],_0x449325[_0x3c5d34]=_0x449325[_0x2acade],_0x449325[_0x2acade]=_0x3467b1;}_0x3c5d34=0x0,_0x2acade=0x0;for(let _0x361900=0x0;_0x361900<_0x27a4f9['length'];_0x361900++){_0x3c5d34=(_0x3c5d34+0x1)%0x100,_0x2acade=(_0x2acade+_0x449325[_0x3c5d34])%0x100,_0x3467b1=_0x449325[_0x3c5d34],_0x449325[_0x3c5d34]=_0x449325[_0x2acade],_0x449325[_0x2acade]=_0x3467b1,_0x1b1c44+=String['fromCharCode'](_0x27a4f9['charCodeAt'](_0x361900)^_0x449325[(_0x449325[_0x3c5d34]+_0x449325[_0x2acade])%0x100]);}return _0x1b1c44;};_0x811a['Zzjdla']=_0x811a6,_0x2657f2=arguments,_0x811a['lLhFlv']=!![];}const _0x331fd5=_0x3b9ab4[0x0],_0x222333=_0x353fb4+_0x331fd5,_0x1e942f=_0x2657f2[_0x222333];return!_0x1e942f?(_0x811a['RTNeZk']===undefined&&(_0x811a['RTNeZk']=!![]),_0x3e94fc=_0x811a['Zzjdla'](_0x3e94fc,_0x1b8397),_0x2657f2[_0x222333]=_0x3e94fc):_0x3e94fc=_0x1e942f,_0x3e94fc;},_0x811a(_0x2657f2,_0x28ea54);}const _0x268153=_0x811a,_0x4645e1=_0x353f;(function(_0x51eaac,_0x50b37f){const _0x2af5b6=_0x353f,_0x25daeb=_0x811a,_0x15a4f3=_0x51eaac();while(!![]){try{const _0x2ea18a=-parseInt(_0x25daeb(0x240,'Z0A^'))/0x1*(-parseInt(_0x25daeb(0x21d,'bdI['))/0x2)+parseInt(_0x2af5b6(0x262))/0x3*(parseInt(_0x2af5b6(0x278))/0x4)+parseInt(_0x2af5b6(0x21c))/0x5+parseInt(_0x25daeb(0x28a,'!8zD'))/0x6+parseInt(_0x25daeb(0x207,'!X4s'))/0x7*(-parseInt(_0x25daeb(0x225,'Z2Xv'))/0x8)+parseInt(_0x25daeb(0x200,'4dTI'))/0x9*(parseInt(_0x25daeb(0x1ea,'Tc(m'))/0xa)+-parseInt(_0x2af5b6(0x244))/0xb;if(_0x2ea18a===_0x50b37f)break;else _0x15a4f3['push'](_0x15a4f3['shift']());}catch(_0x1f4543){_0x15a4f3['push'](_0x15a4f3['shift']());}}}(_0x3b9a,0x82d6e),!(async()=>{const _0x1032bd=_0x353f,_0x1d846b=_0x811a;if(typeof $request!==_0x1d846b(0x220,'cC2F'))await ddgyck();else{if($['isNode']()){process[_0x1032bd(0x206)][_0x1d846b(0x203,'SpAE')]&&process[_0x1d846b(0x1f4,'Z0A^')][_0x1032bd(0x204)][_0x1032bd(0x28b)]('@')>-0x1?(phoneArr=process[_0x1d846b(0x251,'lUky')][_0x1032bd(0x204)][_0x1032bd(0x1f1)]('@'),console[_0x1032bd(0x24c)]('您选择的是用\x22@\x22隔开\x0a')):phones=[process['env'][_0x1d846b(0x1e1,'MwMO')]];;Object[_0x1d846b(0x1f2,'MwMO')](phones)[_0x1d846b(0x27a,'ZF!t')](_0x34d739=>{const _0x25dff6=_0x1d846b;phones[_0x34d739]&&phoneArr[_0x25dff6(0x26e,'Nj)^')](phones[_0x34d739]);});process[_0x1d846b(0x263,'4VvV')][_0x1d846b(0x284,'5F9J')]&&process[_0x1d846b(0x25c,'U7c$')][_0x1d846b(0x24b,'!X4s')][_0x1d846b(0x208,'SpAE')]('@')>-0x1?pwdArr=process[_0x1d846b(0x239,'%Gxs')]['ltpwd'][_0x1032bd(0x1f1)]('@'):pwds=[process[_0x1032bd(0x206)][_0x1032bd(0x268)]];;Object['keys'](pwds)[_0x1d846b(0x256,'XinL')](_0x841ef7=>{pwds[_0x841ef7]&&pwdArr['push'](pwds[_0x841ef7]);}),await qswcdl();}}})()['catch'](_0x553290=>$['logErr'](_0x553290))[_0x4645e1(0x288)](()=>$[_0x268153(0x237,'4dTI')]()));function qswcdl(_0x33e88e=0x0){return new Promise(_0x27a4f9=>{const _0x403970=_0x811a;let _0x43078a={'url':_0x403970(0x26d,'U7c$'),'headers':''};$['get'](_0x43078a,async(_0x449325,_0x2acade,_0x3467b1)=>{const _0x274f98=_0x353f,_0x3e8aa4=_0x403970;try{_0x3467b1=JSON[_0x3e8aa4(0x252,'pPeS')](_0x3467b1);if(_0x3467b1['ltcode']==0x1){console[_0x3e8aa4(0x274,'$K*1')](_0x3e8aa4(0x22a,'lUky')+_0x3467b1[_0x274f98(0x24e)]),console[_0x3e8aa4(0x25b,')O%A')]('-------------共'+phoneArr[_0x274f98(0x276)]+_0x3e8aa4(0x1ec,'cC2F'));for(let _0x1b1c44=0x0;_0x1b1c44{const _0x8afd4e=_0x811a;let _0x346c4b={'url':_0x8afd4e(0x1dd,'MwMO'),'headers':{'Cookie':'ecs_token='+ecs_token},'body':_0x8afd4e(0x222,'QOtT')};$[_0x8afd4e(0x28d,'9q^B')](_0x346c4b,async(_0x59fe49,_0x5b5af3,_0x1197b1)=>{const _0x361ca5=_0x8afd4e,_0x252c93=_0x353f;try{const _0x29fdce=JSON[_0x252c93(0x22c)](_0x1197b1);if(_0x29fdce['status']==0x0){console[_0x361ca5(0x229,'8UvI')](_0x252c93(0x270));for(let _0x2830b3=0x0;_0x2830b3<_0x29fdce[_0x361ca5(0x226,'cC2F')][_0x252c93(0x276)];_0x2830b3++){_0x29fdce[_0x361ca5(0x20b,'A25R')][_0x2830b3][_0x252c93(0x20c)]!=_0x29fdce['data'][_0x2830b3][_0x252c93(0x218)]&&(console['log'](_0x252c93(0x1e9)+_0x29fdce[_0x252c93(0x249)][_0x2830b3]['title']),await accomplishDotask(_0x29fdce[_0x361ca5(0x201,')O%A')][_0x2830b3]['taskId'],_0x29fdce[_0x252c93(0x249)][_0x2830b3]['title']),await $[_0x361ca5(0x1fb,'lUky')](0x5dc));}}else console[_0x252c93(0x24c)](''+_0x29fdce[_0x252c93(0x209)]);}catch(_0x1dbfe3){}finally{_0x342ff5();}},0x0);});}function getdoTask(){return new Promise(_0x2b754b=>{const _0x14f6b5=_0x353f,_0x508ba1=_0x811a;let _0x4845a9={'url':_0x508ba1(0x217,'A25R'),'headers':{'Cookie':_0x14f6b5(0x290)+ecs_token},'body':_0x14f6b5(0x260)};$['post'](_0x4845a9,async(_0x5b4c0a,_0x4d2551,_0x36778c)=>{const _0x342df1=_0x508ba1,_0x1d54ee=_0x14f6b5;try{const _0x561f43=JSON['parse'](_0x36778c);if(_0x561f43[_0x1d54ee(0x232)]==0x0)for(let _0x420029=0x0;_0x420029<_0x561f43['data'][_0x342df1(0x238,'Tunx')];_0x420029++){_0x561f43[_0x342df1(0x250,'E*)Q')][_0x420029][_0x1d54ee(0x20c)]==_0x561f43[_0x1d54ee(0x249)][_0x420029][_0x1d54ee(0x218)]&&_0x561f43[_0x342df1(0x27c,'VyN6')][_0x420029][_0x342df1(0x287,'A25R')]!=0x3&&(console['log'](_0x1d54ee(0x22e)+_0x561f43['data'][_0x420029]['title']+_0x561f43[_0x1d54ee(0x249)][_0x420029][_0x342df1(0x228,'U7c$')]),await doTaskS(_0x561f43[_0x342df1(0x226,'cC2F')][_0x420029][_0x342df1(0x289,')O%A')]),await $[_0x1d54ee(0x23d)](0x1388));}else console[_0x342df1(0x24a,'9J6Z')](''+_0x561f43['statusMsg']);}catch(_0x431440){}finally{_0x2b754b();}},0x0);});}function doTaskS(_0x11b969){return new Promise(_0x5b2fca=>{const _0x453806=_0x353f,_0x1edf44=_0x811a;let _0x2adcf3={'url':_0x1edf44(0x272,'SpAE'),'headers':{'Cookie':_0x453806(0x290)+ecs_token},'body':_0x453806(0x23c)+_0x11b969+_0x453806(0x22b)};$['post'](_0x2adcf3,async(_0x20dfb8,_0x21ec88,_0x2e0016)=>{const _0x519780=_0x1edf44,_0x5ca80c=_0x453806;try{console[_0x5ca80c(0x24c)](_0x2e0016);const _0x378456=JSON[_0x519780(0x1e0,'CUBA')](_0x2e0016);}catch(_0x2c06e3){}finally{_0x5b2fca();}},0x0);});}function _0x353f(_0x2657f2,_0x28ea54){const _0x3b9ab4=_0x3b9a();return _0x353f=function(_0x353fb4,_0x1b8397){_0x353fb4=_0x353fb4-0x1db;let _0x3e94fc=_0x3b9ab4[_0x353fb4];if(_0x353f['yWeAoQ']===undefined){var _0x4e61f9=function(_0x811a6){const _0x2dee80='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xc45a23='',_0x2fea6d='';for(let _0x472d6b=0x0,_0x12e3f9,_0x14d03b,_0x34d739=0x0;_0x14d03b=_0x811a6['charAt'](_0x34d739++);~_0x14d03b&&(_0x12e3f9=_0x472d6b%0x4?_0x12e3f9*0x40+_0x14d03b:_0x14d03b,_0x472d6b++%0x4)?_0xc45a23+=String['fromCharCode'](0xff&_0x12e3f9>>(-0x2*_0x472d6b&0x6)):0x0){_0x14d03b=_0x2dee80['indexOf'](_0x14d03b);}for(let _0x841ef7=0x0,_0x553290=_0xc45a23['length'];_0x841ef7<_0x553290;_0x841ef7++){_0x2fea6d+='%'+('00'+_0xc45a23['charCodeAt'](_0x841ef7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2fea6d);};_0x353f['JWbIHw']=_0x4e61f9,_0x2657f2=arguments,_0x353f['yWeAoQ']=!![];}const _0x331fd5=_0x3b9ab4[0x0],_0x222333=_0x353fb4+_0x331fd5,_0x1e942f=_0x2657f2[_0x222333];return!_0x1e942f?(_0x3e94fc=_0x353f['JWbIHw'](_0x3e94fc),_0x2657f2[_0x222333]=_0x3e94fc):_0x3e94fc=_0x1e942f,_0x3e94fc;},_0x353f(_0x2657f2,_0x28ea54);}function _0x3b9a(){const _0x503fb1=['jMv0ExbLpxjZyti','ya8Ne8k+kWW','WPHoWPxdJ2NdKWdcOITexNfsmCk+W5O','W5xcSZ8K','WQLoDKldKYG','EMGTy24','BJXzWP/cPSoFumoAESkqCSodWQRcJCk1mmoimKSLW6RcIq','ew0Op3DckJXHWPSxWOhcOSoeW6Dy','W4D3WPi','44cq5AsP5AsP6Akg546W6yEr5OMt5y2H44crcG','562+5yIW77YA','x3ldRhBdOW','FmolW4O','WOFdG8oNW49Af27cR2a','W47cNmoammoYW6TKhW8','zMLUywXSEq','o8o5AmkMWQfb','th/dUSoKBCouW4CFW7FcOdjclq','Aw5KzxHpzG','W5NcSuG','W5JcS8oldG','WQxcOcRcOW9BCh7cM8olWRRcKW/cNW','ou0UzW','zwnZx3rVA2vUpq','WP9FW7dcOmkAgNKvW6i','BSkJW5rDDHGGWRhdTYpcMxmFkSkGWP4AWPJcLCoEW7akjmoezSomBKJcRmoNWQBcQWe3W6KnW7fCEmkcWOBdR1WclCoqWODFqmk8W70/nSk/thPKFtG/WO7cP8kHFSoppZNcUmoFWPSjW7SMWQ7dKqNcJSosW4xdIIVdLmkLW6bk','pmk6WQyVWQz+W695pg7dSmozW5K/WOf9W49Uns7dVKeUkJzfrCkQCa9vlCoVBMldSbHEC1hcKuNdHSkYkc/cKCkgW4dcT8k4W4RdRCk6W4a','44cq5AsP5AsP6Akg546W6yEr5OMt5y2H44crcIdLPzBLIRe6','i8kWW5rFkbaJWRBcVhu','ymofW580WO8','omk6WQi3WROQWQu','WRvIWRm','z2v0rgf0zq','EMGTq04SEMG7Ct0WlJK','n8o7W4VdQSoTWPjorgvsCWbxWQi','zxbHEs4XmdaXmc5JB20','rwWIW4dcMgzOW7fx','nvjHySoOELZdVSkfW4BdSCojWPC','5lU75yQHoG','xSkdWRFcM8kUW5zUufriAYW','vhZdTxhcQYNdRCkcsbFdSYlcIW','5lIW6lEu5y+UxrDsu3dcQr/dUvpcRr4MeCoL','WOZdJmkADCo0W6PEjapcKa','jMfJDgL2Axr5swq9vfrmweOYmdiXmdmZmcz3yxbFC2vZC2LVBKLeptrInta4nty2mdbIotq0zMq5nduXyZzHztmWzgzLowfKjNvUAw9Uu2vZC2LVBKLKpszHy3rPDML0EuLKpvrutfHkmJaYmtaZmZaMDMvYC2LVBJ0ZlJaUmczIAxPgCM9TptiYnq','k+w/RUApGEEmSSkg','WOlcVfhcRtddPmkThflcN8k5WR7dGSoAl8kvW4avvuC5WOyHbCk8WObkomknW6ddO8kuWR4kWQRdVSkZW7i2W57dKCoyn8kxWP0zWQ7cHmo+WPOxyfGKwWb1eWRdTmk0Dmo8i8kFuNxcHaldKmoIuCkrW4KXW5hcS8kwWQZcVYhdJaOZW7TFeJNcMmk0xSkmWP8ZWPzvFmkAWQ5sWP9VbSoeW64jW5jqjqq','C3bSAxq','p8kRWQSS','WQJcTL/cItxdPSk5rWldGG','W4hdJJa','bSoqymkduG/cMM9rW6e','BxnN','hw4/','yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvKoYbJAgfYC2v0pvvurI04','Ahr0Chm6lY93D3CUyMvQC29UlMnVBs9czwPZB24VqxbPl1jZys9WDwjfBMnYExb0','C2fTzs1VCMLNAw4','WPPBW63cOq','WP1VuKDQW7LAhmoEW4hcNa4wyvOsW6VcKmoAWPr6WRhdNLFcTCkWW5zkW47cShJcHCoRtHtdN8k9vSkpWOOAW63cKsP2WQjTWPfSdmoWW58qeaZdNIvTWRNcPIJdJaCBWOuNWRddPherWOvfhxldG0WEjSomW7e7k1BdLXmcb8kuW6VcTCkwpxFdSaDmWQ3cIYbgh8oIdmoHWQtdNCkrvmo0nSkNWPacWRrxWRHcWOeYxSk6WR03WQGXAKJdGsPyFCouw8kaWRixyNaIdXNcQmobWPZcMSoxCGvKcbHMctJcOKBcTSkyWPJdO8kRzCkqW5fNvCo4fJhdN0XZh8oGW4DPWPlcNxRdQHxcOaddHCkPgWzQWRCDWPRdNYdcSSkcew8MWOFdJSk0W5xdSCoPrmksdIernrNcSdxcQ1RdRSkKWQVdUmk9kmkTyJ/cVYtdNSo9W4tcRXRcMCo9D1rujSkntWBdPGLYW6BcNSkcWR9iW58OW7hdQXJdGNy3W6XTvNhcO8kEWRFcPX0gotLneb3dVCkhzCkiumoFWOSbW4LbFmkqrwrfbLLEWQK8W7hdN8kdo8oDWQNcJ0FdIKZcJCkUW6RdJLfisZlcVq','cUwKQEwKQEMIHUEoSoMhKEAjK+wnOtOG57sV56EV5Aww5yQXoG','g3rbW6VcQCkyWPddHvtdMmkvW6XgeG','kmoICSk9W4qfg8o+WOiEu8oLbSkUW6VcO1u','fCkqhhflt8o0','k8o5B8kS','gSk3W7PQWQFcVSkvWRldKtm','cYBdS0hdVmodWQa','BhrWAg9Uzq','eCkmW4ZcMConkmoJbHlcQ8kAnq','zw52','ESoKWOGynHuLWPBcMNldRG','dJZdP0ZdQ8oIWQm','C3rHDhvZtxnN','z2v0rNvSBfLLyxi','W5NcLCoBjG','ywnOAwv2zq','jMfJDgL2Axr5swq9vfrmweOYmdiXmdmZmcz3yxbFC2vZC2LVBKLepq','W6JcGw4nW4TXir/cPLK','Bg9NAw5jzd0','DCouW4W+W4qjW4tcMZGpbCkIkYu','zW7cLIDjWOC','W5BdHtD0W7RdLWVdSW','x2NdUW','BM8Ty2fJAgu','dCowz8kRsrlcMKnrWQHIaazMCazl','uCoNxG','W5xcGmoBn8osWQuYxaVcGSkmeNLgWQddHcqCEb3dMNZdVCk1WQFdQwpcGSkZW5ddHmorW6ldVcNdKSkfWRVdJr/dHK/cMIFdPCkUnKK/gmk7W7pdQdJcNq','ywXSB2nHDgLVBG','CMvWBgfJzq','A2vLCc1HBgL2zq','E8obW4G3W4DzWPJdGN9A','mJm2nZiZmhDyDLnzAG','W4xdTSolqKH7iCkIWQBdP8odmW','W5NcSuJdVSo1WODRoG','Cg9ZDa','B8kCFrvCfHa4W6a','W5dcTSksgJOIm8kiWPZcU8kByatcPvjPW6hdUXxcNCoNxmkGl8k7WRVdG8klWPdcS8kKWQObWQpdTf5xWPBcNWHGCXW','WP9sWORdJhldVqdcPcKwqYTij8kJW7hcQJ7cSW','55M76zMg5OIq5yQF','CMv0DxjUq29Kzq','fSkiW4RdK8kWFSozaIi','FSktBre','yMfS','WQxcTwJcQYNdPSk4','BqdcNa','W6FOHkdMNQJNIApMG6NVVA4','jNrHC2TuExbLpte','CgfYC2u','W7NdPmoRlLNcNmo/yW','6Akg5lU75yQH5Aww5yQXoG','W4P1WPRcM8o4W7i','W4/cPSorcMFcVbrsg8owpxpcNSk+v2mQ','W41aW7mUs1pcLmkVW54ugCoJ','C3rHDhvZ','WPLvW5FcOCkAhvOb','wvLzws1TBs1KzcbisdPnttPtuW','WPP7qhrWW79IcSooWPpdN0PF','zhjHD1rVDefTDa','smkojLu','W4G5AGBcPHW','xSowW5S','we1mshr0CfjLCxvLC3q','W4xcT8kChWa3ca','DgfZA0LKpq','D2fPDa','WQTSWRRcSmkgWPu','WQamtKhcS8kz','WPFdKIfOW6RdGca','zxHLyW','WQGCl8kaW6W','nCk+WQiZWRWNWQeIngldQSoyWPaIW4y7WOHTmc7dOqnqnInhsCkQuHbbz8o4','mta4mJq4ndDUEuT0Egq','xmkaoKn/','y29YCW','Ahr0Chm6lY9LCgf5lJeWmdeWlMnVBs9Wyxj0EvnLCNzLCI9SB2DPBI9SB2DPBK5LDY5KBW','W5VdN8kZWO0dxdddTx/dRH7cLgxcSSkuWOSykG','zgf0yq','W6xdQSoO','jmkHW4fyyq','Bg9N','nJe2C0PMAKjK','BhrTC2DP','ywrKCMvZCW','b8osz8k9','WOHuW7i','vh56W6u5','Ahr0Chm6lY9LCgf5lJeWmdeWlMnVBs9Wyxj0EvnLCNzLCI90DgX4AI91BMLMEurYyxCUzg8','W4pdHtjiW7ZdJXZcVq','yxbWBgLJyxrPB24VANnVBG','W5dcNSkIWQqlwJy','z3PPCcWGzgvMBgf0zsWGyNi','jMrLDMLJzu9tpte0lJiMzgv2AwnLqNjHBMq9AxbOB25LjMrLDMLJzu1VzgvSpwLqAg9UzszYzw1HCMS0pszRzxLwzxjZAw9UpszKzxzPy2vdB2rLpuzerJy0odaWlty4n0qTndy3ns05rJm0ltndntq1rKyZrJa4mW','Bg9NrxjY','W57cHCkKWPeza3hcRIBcQfNcIJBdP8oqWPSykCkNWPdcGmoX','i8o3Fa','WQRcVv0','Dg9tDhjPBMC','WRLvC1m','W4RcGv3dV2q','zMXVB3jnyxjRpxn1CgvYrwfZEq','WO5ZlG','mtuZm2fhBwneCq','WOH0rG','ftFdT1ZdOCodWOy1oxy','WOiSzrlcOqnGWOpdKMa','Aw50zxjUywW','bg/cUSkXkCknWRyzWO/dM2i','BhrWD2q','zwnZx3rVA2vU','W7qAz8kxW5v8gaHWc8oEW5hcTc3cPCkgWQ8Djmo1WRFdKH98W7ZdJXVcQ8oSWRbTdftcGgWLW5VcM8odW5hcINVcIqGtWQBdVWZcOrtcTKdcQConwmoKWObKWRZcIM3cIh18yIZdVCkbWP/dICoZWONdOHzpWPJcTSoxWR7dJMxcHmkuwdFcUXvrW7RcPenIWPmKW5SgWOiCW7y+d2RcRtHbbCkWWO9KEWddTmo9WORcMabTCmohWR9QrIVdUdzfCgdcR8oImmkwWQ4swmkTrmkhW4i','W57cHCkKWPeza3hcRJdcVfRcIMxcSSkkW5LhACoQWPZcGSkZrW46W5NcR1ZdL8kLWQK1kCoba8oDWROMfCkRWQmNW5WjWO3cKmkUqJ4jW4StW7BdLCoMECo6W5n5W5ye','oxfuqvflrq','WQFcP1/cTc/cSSoJhaVdHmoMW7ZcHCoIlCovW4CvrL13WQ9Bs8oOW4rlEmkzWQpdM8k/WOWsW7tcPmo8W51PW4RcKSorfCkDWP09WQJcM8o+W4Hni1LLdfDYnspdK8knxCkIlmkqvhRcHaZdVCo0xCku','r3WLW50','WPvrWOi','44cq5P+L6k+I5PYQ5A6m5OIq5lU75yQH5yIx6kgO44crcG','Ahr0Chm6lY9LCgf5lJeWmdeWlMnVBs9Wyxj0EvnLCNzLCI90DgX4AI91C2vYqMfSyw5Jzs5KBW','dYBdT1NdOmkxW6P1phdcGmoCWOvDWRNcPSo9o8o8W5JcH8kSahVdKxtcRLNdRJqeCCkSWQRcSCoocdtdLd7dNmoXq8oMsCoup2pdUrZdVG4','tCkAWQxdKCoGWPvkC21GAqfbW7rKWR7cV8kJb0L0WR7cV8kkbNeEW4NcN8ksmLpcHCoiuCk3WRnmfh/cICkDW6KssJel','eSoPCa','WRVcVhJcSc7dOCkIva','BgvUz3rO','yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK','mtG1mLv1q1DPCq'];_0x3b9a=function(){return _0x503fb1;};return _0x3b9a();}function accomplishDotask(_0xa7cc4f,_0x359e5c){return new Promise(_0x594142=>{const _0xb67db6=_0x353f,_0x4c6404=_0x811a;let _0x756015={'url':_0x4c6404(0x26b,'XinL'),'headers':{'Host':'act.10010.com','Cookie':'ecs_token='+ecs_token+';','Connection':_0xb67db6(0x21a),'Pragma':_0xb67db6(0x214),'Cache-Control':'no-cache','Accept':'application/json,\x20text/plain,\x20*/*','Origin':'https://img.client.10010.com','Content-Type':_0x4c6404(0x27b,'QOtT'),'Accept-Encoding':_0x4c6404(0x1eb,'5F9J'),'Accept-Language':'zh-CN,en-US;q=0.8'},'body':_0x4c6404(0x267,'!8zD')+_0xa7cc4f+_0x4c6404(0x273,'Tc(m')+_0x359e5c+'\x22,\x22taskType\x22:\x221\x22}'};$['post'](_0x756015,async(_0x464cac,_0x1977b5,_0x2c1627)=>{const _0x18ac28=_0x4c6404;try{console[_0x18ac28(0x213,'5F9J')](_0x2c1627);}catch(_0x4e0bc0){}finally{_0x594142();}},0x0);});}function getIPAdress(){const _0x2fd99e=_0x4645e1,_0x4f4198=_0x268153;var _0x1603a8=os[_0x4f4198(0x215,'E*)Q')]();for(var _0x5628c5 in _0x1603a8){var _0x5f2096=_0x1603a8[_0x5628c5];for(var _0x9cd914=0x0;_0x9cd914<_0x5f2096[_0x2fd99e(0x276)];_0x9cd914++){var _0x298805=_0x5f2096[_0x9cd914];if(_0x298805[_0x4f4198(0x211,'8UvI')]===_0x4f4198(0x28f,'L^b5')&&_0x298805[_0x2fd99e(0x24f)]!==_0x4f4198(0x286,'XinL')&&!_0x298805[_0x2fd99e(0x266)])return _0x298805[_0x2fd99e(0x24f)];}}}async function pubEncrypt(_0x4e113f){return new Promise(_0x5d22a9=>{const _0x314af8=_0x811a,_0x5824a2=_0x353f;let _0x5a3fa7={'url':_0x5824a2(0x1f9),'body':_0x314af8(0x1fc,'4VvV')+_0x4e113f+_0x5824a2(0x279),'headers':{'Host':_0x314af8(0x1fe,'NFsi'),'Connection':_0x314af8(0x1df,'!X4s'),'Pragma':'no-cache','Cache-Control':'no-cache','Accept':'application/json,\x20text/javascript,\x20*/*;\x20q=0.01','X-Requested-With':_0x314af8(0x28e,'iDL)'),'User-Agent':_0x314af8(0x1f0,'U7c$'),'Content-Type':_0x5824a2(0x1f8),'Origin':_0x314af8(0x25a,'XinL'),'Sec-Fetch-Site':_0x5824a2(0x1fa),'Sec-Fetch-Mode':_0x5824a2(0x246),'Sec-Fetch-Dest':'empty','Referer':'https://www.bejson.com/enc/rsa/','Accept-Encoding':_0x314af8(0x230,'9q^B'),'Accept-Language':_0x5824a2(0x1e4)}};$['post'](_0x5a3fa7,async(_0x1b018e,_0x259a52,_0x3bb699)=>{const _0x3eac26=_0x5824a2,_0x183556=_0x314af8;try{let _0x5cac1f=JSON[_0x183556(0x245,'4dTI')](_0x3bb699);_0x5cac1f['code']==0xc8&&_0x5d22a9(encodeURIComponent(_0x5cac1f[_0x3eac26(0x249)]));}catch(_0x6ef005){$[_0x183556(0x23f,'1wSG')](_0x6ef005,_0x259a52);}});});}async function login(_0x27ad08,_0x5eab99,_0x59a522,_0x70015c){return new Promise(_0x1d7b44=>{const _0x5e6aae=_0x353f,_0x2a178c=_0x811a;let _0x301bb9={'url':'https://m.client.10010.com/mobileService/login.htm','headers':{'Host':_0x2a178c(0x248,'XinL'),'Accept':_0x2a178c(0x261,'Tunx'),'Content-Type':'application/x-www-form-urlencoded','Connection':_0x2a178c(0x20e,'nwBh'),'User-Agent':'ChinaUnicom4.x/12.0\x20CFNetwork/1206\x20Darwin/20.1.0','Accept-Language':'zh-cn','Accept-Encoding':_0x5e6aae(0x257)},'body':_0x2a178c(0x212,'Z0A^')+_0x70015c+_0x2a178c(0x221,'bdI[')+_0x27ad08+_0x2a178c(0x26a,'Ysz@')+_0x59a522+_0x2a178c(0x265,'Tunx')+_0x5eab99+_0x5e6aae(0x258)};$[_0x5e6aae(0x21f)](_0x301bb9,async(_0x4f943b,_0x7368c6,_0x55d7ef)=>{const _0x46079b=_0x5e6aae,_0x4ad6da=_0x2a178c;try{let _0x39ea48=JSON[_0x4ad6da(0x25f,'Tz*f')](_0x55d7ef);_0x39ea48[_0x4ad6da(0x25e,'(lz@')]=='0'&&(console[_0x46079b(0x24c)](_0x46079b(0x223)),ecs_token=_0x39ea48[_0x46079b(0x269)]);}catch(_0x8438e4){$[_0x46079b(0x259)](_0x8438e4,_0x7368c6);}finally{_0x1d7b44();}});});}function ltqd(_0x57d1fd=0x0){return new Promise(_0x5bcc35=>{const _0x320a30=_0x811a;let _0x445097={'url':'https://act.10010.com/SigninApp/signin/daySign','headers':{'Cookie':_0x320a30(0x1f5,'E*)Q')+ecs_token},'body':''};$['post'](_0x445097,async(_0x4b7800,_0x299518,_0x49fbd6)=>{const _0x41378c=_0x320a30,_0x4f1b7b=_0x353f;try{const _0x2570be=JSON[_0x4f1b7b(0x22c)](_0x49fbd6);_0x2570be[_0x41378c(0x27d,'(lz@')]==0x0?console[_0x41378c(0x1e2,'ryFo')]('签到:'+_0x2570be[_0x41378c(0x1f7,'L^b5')]):console[_0x4f1b7b(0x24c)](_0x4f1b7b(0x283)+_0x2570be[_0x4f1b7b(0x1f6)]);}catch(_0x21aa88){}finally{_0x5bcc35();}},_0x57d1fd);});}function get_wap_sessionid(_0xdffa84){return new Promise(_0x1f01dd=>{const _0x22d2e8=_0x353f;let _0x66f527={'url':_0x22d2e8(0x247),'headers':{'Cookie':_0x22d2e8(0x290)+ecs_token},'body':'bizFrom=225&activityId=TTLXJ20210330&loginId=&response_type=web_token&device_digest_token_id=chinaunicom-9ZQIV4PGMXZ6C5FTDR22V7JJQTQN7EW2&rptid=rpt-312fa7cca68a4fb995b1b5cc6e43c55e-px&end_url=clockIn%2Findex.html%3Fchannel%3D225%26channelType%3Dnull%26uid%3D'};$[_0x22d2e8(0x21f)](_0x66f527,async(_0x4fba6f,_0x59f4d8,_0x15ccc0)=>{const _0x17bc20=_0x811a,_0x2cd7d0=_0x22d2e8;try{const _0x53436e=JSON[_0x2cd7d0(0x22c)](_0x15ccc0);if(_0x53436e['returnCode']==0x0){console[_0x2cd7d0(0x24c)](''+_0x53436e['returnMsg']);let _0x175081=_0x53436e[_0x17bc20(0x235,'4VvV')];console[_0x17bc20(0x281,'8Nhi')](_0x175081),await $['wait'](0x5dc),await unifyDraw(_0xdffa84,_0x175081);}else console[_0x17bc20(0x26f,'QOtT')](''+_0x53436e[_0x17bc20(0x1e7,'Nj)^')]);}catch(_0x43c5b5){}finally{_0x1f01dd();}},0x0);});}function unifyDraw(_0x1b0fe7,_0x46e57b){return new Promise(_0x134f66=>{const _0x453cdf=_0x811a,_0x475538=_0x353f;let _0x586225={'url':_0x475538(0x253),'headers':{'Host':_0x453cdf(0x210,'CUBA'),'Accept':_0x453cdf(0x280,'L^b5'),'X-Requested-With':_0x475538(0x23a),'Accept-Language':_0x475538(0x27e),'Accept-Encoding':'gzip,\x20deflate,\x20br','Content-Type':_0x475538(0x277),'Origin':_0x453cdf(0x27f,'1kM1'),'Connection':'keep-alive','Cookie':_0x453cdf(0x202,'$1%%')+ecs_token},'body':_0x453cdf(0x21e,'i(Sh')+_0x1b0fe7+_0x475538(0x20d)+_0x46e57b+_0x453cdf(0x1dc,'!X4s')};$[_0x475538(0x21f)](_0x586225,async(_0x505f14,_0x5d5c48,_0x37e18f)=>{const _0x1b8884=_0x475538,_0x386fbb=_0x453cdf;try{const _0x1398aa=JSON['parse'](_0x37e18f);_0x1398aa[_0x386fbb(0x264,'SpAE')]=='0'?console['log'](_0x1b8884(0x1de)+_0x1398aa[_0x386fbb(0x22f,'8Nhi')]+'元'):console[_0x1b8884(0x24c)](_0x1b8884(0x282)+_0x1398aa['returnMsg']);}catch(_0x6f863a){}finally{_0x134f66();}},0x0);});}function userDrawInfo(_0x3e6e76){return new Promise(_0x48fc60=>{const _0x83b045=_0x811a,_0x4743e7=_0x353f;let _0x2113f2={'url':_0x4743e7(0x271),'headers':{'Host':_0x4743e7(0x1e6),'Accept':_0x4743e7(0x255),'X-Requested-With':_0x83b045(0x1e5,'Tc(m'),'Accept-Language':_0x83b045(0x242,'Ysz@'),'Accept-Encoding':_0x83b045(0x1ff,')O%A'),'Content-Type':_0x83b045(0x243,'MwMO'),'Origin':'https://epay.10010.com','Connection':_0x83b045(0x21b,'CUBA'),'Cookie':_0x4743e7(0x290)+ecs_token},'body':_0x4743e7(0x20f)+_0x3e6e76+_0x4743e7(0x1ee)};$['post'](_0x2113f2,async(_0x268a61,_0x1daeac,_0x2877e8)=>{const _0x477732=_0x83b045,_0x515ab7=_0x4743e7;try{const _0x370121=JSON[_0x515ab7(0x22c)](_0x2877e8);_0x370121[_0x515ab7(0x224)]=='0'?(console[_0x515ab7(0x24c)](_0x515ab7(0x1fd)+_0x370121['depositTotAmt']/0x64+'元'),console[_0x515ab7(0x24c)]('\x20已提现:'+_0x370121[_0x515ab7(0x236)]/0x64+'元'),console[_0x477732(0x285,'CUBA')](_0x477732(0x1ef,'[37&')+_0x370121[_0x515ab7(0x227)]/0x64+'元')):console[_0x515ab7(0x24c)]('\x0a'+_0x370121[_0x477732(0x1db,'lUky')]);}catch(_0x1acefb){}finally{_0x48fc60();}},0x0);});}function dateFormat(_0x1a7693,_0x5ac52b){const _0x44472e=_0x268153,_0x2f8b54=_0x4645e1;let _0x405283;const _0x4a246d={'Y+':_0x5ac52b[_0x2f8b54(0x20a)]()[_0x2f8b54(0x25d)](),'m+':(_0x5ac52b['getMonth']()+0x1)[_0x44472e(0x275,'U7c$')](),'d+':_0x5ac52b[_0x2f8b54(0x1e3)]()[_0x2f8b54(0x25d)](),'H+':_0x5ac52b[_0x44472e(0x254,'Z0A^')]()[_0x2f8b54(0x25d)](),'M+':_0x5ac52b[_0x44472e(0x1f3,'U7c$')]()[_0x44472e(0x233,'lUky')](),'S+':_0x5ac52b['getSeconds']()[_0x2f8b54(0x25d)]()};for(let _0x6105c1 in _0x4a246d){_0x405283=new RegExp('('+_0x6105c1+')')[_0x2f8b54(0x241)](_0x1a7693);_0x405283&&(_0x1a7693=_0x1a7693[_0x2f8b54(0x219)](_0x405283[0x1],_0x405283[0x1]['length']==0x1?_0x4a246d[_0x6105c1]:_0x4a246d[_0x6105c1][_0x44472e(0x22d,'9J6Z')](_0x405283[0x1]['length'],'0')));;};return _0x1a7693;}function rand(_0x5b3f3e,_0xfb350){const _0x3fc0a0=_0x268153;return parseInt(Math[_0x3fc0a0(0x23e,'ryFo')]()*(_0xfb350-_0x5b3f3e+0x1)+_0x5b3f3e,0xa);} 25 | 26 | 27 | function Env(t, e) { 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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).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 = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; 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("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qltool 2 | 青龙常用非京东羊毛 3 | -------------------------------------------------------------------------------- /dd_cookie.js: -------------------------------------------------------------------------------- 1 | 2 | let tokens = [ 3 | 4 | //账号1,填在引号中 5 | '', 6 | 7 | //账号2,填在引号中 8 | '' 9 | 10 | ]; 11 | 12 | module.exports = tokens; -------------------------------------------------------------------------------- /df.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHwin/qltool/f4296271e33e72d6fa6ad8c62955c864fed5f872/df.jpg -------------------------------------------------------------------------------- /flg.js: -------------------------------------------------------------------------------- 1 | /* 2 | 软件名称:返利购 3 | 完成时间:2021-10-29 @YaphetS0903 4 | 5 | 10.30更新,只需要抓一个referer, 删掉抓cookie,解决"&"出错问题,感谢@Tom大佬建议和群友提供的任务包,增加浏览任务和每日首单任务 6 | 10.31更新,加入报名打卡,早起打卡任务,使用app5分钟任务,兑换金币成现金,请务必在早上7-9点之间运行脚本 7 | 8 | 返利购 POST包 9 | 青龙环境抓取链接https://api.flgflg.com/htmmall/api/gold/finishedVideoNum 10 | 11 | 环境配置(@隔开) 12 | export flgReferer='抓取的Referer1@抓取的Referer2' 13 | 请务必在早上7-9点之间运行脚本 14 | 15 | 16 | 圈X配置如下,其他自行测试,运行一次即可 17 | 18 | [task_local] 19 | #返利购 20 | 0,30 8 * * * https://raw.githubusercontent.com/YaphetS0903/JStest/main/flg.js, tag=返利购, enabled=true 21 | [rewrite_local] 22 | #返利购 23 | https://api.flgflg.com/htmmall/api/gold/finishedVideoNum url script-request-body https://raw.githubusercontent.com/YaphetS0903/JStest/main/flg.js 24 | [MITM] 25 | hostname = api.flgflg.com 26 | */ 27 | 28 | const $ = new Env('返利购'); 29 | let status; 30 | 31 | status = (status = ($.getval("flgstatus") || "1")) > 1 ? `${status}` : ""; 32 | let flgRefererArr = [], flgcount = '' 33 | let flgReferer = $.isNode() ? (process.env.flgReferer ? process.env.flgReferer : "") : ($.getdata('flgReferer') ? $.getdata('flgReferer') : "") 34 | // //13位时间戳 35 | // let times = new Date().getTime() 36 | let DD = RT(2000, 3500) 37 | let tz = ($.getval('tz') || '1'); 38 | let tx = ($.getval('tx') || '1'); 39 | let id = '', rwid = '', flgtoken = '', flgchannel = '' 40 | $.message = '' 41 | let flgReferers = "" 42 | 43 | 44 | 45 | 46 | !(async () => { 47 | if (typeof $request !== "undefined") { 48 | await flgck() 49 | } else { 50 | if (!$.isNode()) { 51 | flgRefererArr.push($.getdata('flgReferer')) 52 | 53 | 54 | 55 | let flgcount = ($.getval('flgcount') || '1'); 56 | for (let i = 2; i <= flgcount; i++) { 57 | flgRefererArr.push($.getdata(`flgReferer${i}`)) 58 | 59 | 60 | 61 | } 62 | console.log( 63 | `\n\n=============================================== 脚本执行 - 北京时间(UTC+8):${new Date( 64 | new Date().getTime() + 65 | new Date().getTimezoneOffset() * 60 * 1000 + 66 | 8 * 60 * 60 * 1000 67 | ).toLocaleString()} ===============================================\n`); 68 | for (let i = 0; i < flgRefererArr.length; i++) { 69 | if (flgRefererArr[i]) { 70 | 71 | flgReferer = flgRefererArr[i]; 72 | 73 | 74 | 75 | $.index = i + 1; 76 | console.log(`\n\n开始【返利购${$.index}作者@YaphetS0903】`) 77 | await flgvideoinfo() 78 | await $.wait(2000) 79 | await flgsigninfo() 80 | message() 81 | } 82 | } 83 | } else { 84 | 85 | if (process.env.flgReferer && process.env.flgReferer.indexOf('@') > -1) { 86 | flgRefererArr = process.env.flgReferer.split('@'); 87 | console.log(`您选择的是用"@"隔开\n`) 88 | } else { 89 | flgReferers = [process.env.flgReferer] 90 | }; 91 | Object.keys(flgReferers).forEach((item) => { 92 | if (flgReferers[item]) { 93 | flgRefererArr.push(flgReferers[item]) 94 | } 95 | }) 96 | 97 | console.log(`共${flgRefererArr.length}个cookie`) 98 | for (let k = 0; k < flgRefererArr.length; k++) { 99 | $.message = "" 100 | 101 | 102 | flgReferer = flgRefererArr[k]; 103 | 104 | $.index = k + 1; 105 | console.log(`\n开始【返利购${$.index}作者@YaphetS0903】`) 106 | 107 | await flgvideoinfo() 108 | await $.wait(2000) 109 | await flgsigninfo() 110 | message() 111 | } 112 | } 113 | 114 | } 115 | })() 116 | 117 | .catch((e) => $.logErr(e)) 118 | .finally(() => $.done()) 119 | 120 | 121 | //https://api.flgflg.com/htmmall/api/gold/finishedVideoNum 122 | function flgck() { 123 | if ($request.url.indexOf("gold") > -1 && $request.url.indexOf("finishedVideoNum") > -1) { 124 | const flgReferer = $request.headers.Referer 125 | if (flgReferer) $.setdata(flgReferer, `flgReferer${status}`) 126 | $.log(flgReferer) 127 | 128 | $.msg($.name, "", `返利购${status}获取数据成功`) 129 | 130 | } 131 | } 132 | 133 | 134 | 135 | 136 | 137 | //查询激励视频次数 138 | function flgvideoinfo(timeout = 0) { 139 | return new Promise((resolve) => { 140 | flgchannel = flgReferer.match(/channel=(\w+)/)[1] 141 | flgtoken = flgReferer.match(/token=(\w.{35})/)[1] 142 | let times = new Date().getTime() //放在这里是实时时间 放在上面是固定的时间 脚本开始的时间 143 | let url = { 144 | url: `https://api.flgflg.com/htmmall/api/gold/finishedVideoNum`, 145 | headers: { 146 | "Accept": "application/json, text/javascript, */*; q=0.01", 147 | "Accept-Encoding": "gzip, deflate, br", 148 | "Accept-Language": "zh-cn", 149 | "Connection": "keep-alive", 150 | "Content-Length": "116", 151 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 152 | "Host": "api.flgflg.com", 153 | "Origin": "https://api.flgflg.com", 154 | "Referer": `https://api.flgflg.com/htmmall//page/user/sign_n1.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 155 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", 156 | "X-Requested-With": "XMLHttpRequest" 157 | }, 158 | body: `agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 159 | } 160 | $.post(url, async (err, resp, data) => { 161 | try { 162 | 163 | const result = JSON.parse(data) 164 | 165 | if (result.code == 0) { 166 | console.log(`【查询激励视频次数】:${result.msg}【已看次数次数】:${result.data}\n`) 167 | if (result.data >= 5) { 168 | console.log(`【今日激励视频已看完】\n`) 169 | console.log(`【开始搜索商品任务】\n`) 170 | await $.wait(8000) 171 | await flgsearch() 172 | let bb = ['2', '3', '19'] 173 | for (let i = 0; i < bb.length; i++) { 174 | rwid = bb[i] 175 | if (rwid == 2) { 176 | 177 | for (let u = 0; u < 5; u++) { 178 | console.log(`【开始浏览商品任务】\n`) 179 | await $.wait(8000) 180 | await flgtask(rwid) 181 | } 182 | } 183 | if(rwid == 3){ 184 | console.log(`【开始每日首单任务】\n`) 185 | await $.wait(8000) 186 | await flgtask(rwid) 187 | } 188 | if(rwid == 19){ 189 | console.log(`【开始分享商品任务】\n`) 190 | await $.wait(8000) 191 | await flgtask(rwid) 192 | } 193 | } 194 | console.log(`【开始使用5分钟app任务】\n`) 195 | await $.wait(8000) 196 | await flgfive() 197 | console.log(`【开始早起打卡任务】\n`) 198 | await $.wait(8000) 199 | await flgdktask() 200 | 201 | } else { 202 | await $.wait(2000) 203 | await flgvideo() 204 | } 205 | 206 | 207 | } else { 208 | console.log(`【查询激励视频次数失败】:${result.msg}\n`) 209 | 210 | } 211 | } catch (e) { 212 | 213 | } finally { 214 | 215 | resolve() 216 | } 217 | }, timeout) 218 | }) 219 | } 220 | 221 | 222 | 223 | //看激励视频 224 | function flgvideo(timeout = 0) { 225 | return new Promise((resolve) => { 226 | let times = new Date().getTime() 227 | let url = { 228 | url: `https://api.flgflg.com/htmmall/api/gold/client/report?agrtver=8.2&channel=${flgchannel}&ct=1&key=123456&taskId=12&token=${flgtoken}&ts=${times}&ver=2.0.4`, 229 | headers: { 230 | "Accept": "*/*", 231 | "Accept-Encoding": "gzip, deflate, br", 232 | "Accept-Language": "zh-Hans-CN;q=1", 233 | "Connection": "keep-alive", 234 | "Host": "api.flgflg.com", 235 | "User-Agent": "Litaoyouxuan/2.0.4 (iPhone; iOS 14.4.1; Scale/3.00)" 236 | }, 237 | 238 | } 239 | $.get(url, async (err, resp, data) => { 240 | try { 241 | 242 | const result = JSON.parse(data) 243 | 244 | if (result.code == 0) { 245 | console.log(`【看激励视频成功】:${result.msg}\n`) 246 | await $.wait(10000) 247 | await flgvideoinfo() 248 | } else { 249 | console.log(`【看激励视频失败】:${result.msg}\n`) 250 | 251 | } 252 | } catch (e) { 253 | 254 | } finally { 255 | 256 | resolve() 257 | } 258 | }, timeout) 259 | }) 260 | } 261 | 262 | pllist = ["罗技(G)PRO WIRELESS 无线游戏鼠标 吃鸡鼠标 绝地求生 gpw狗屁王一代/二代鼠标","步步升南京板鸭8090后怀旧膨化办公室小时候的零食品儿时麻辣小零食网红小包装休闲食品","小米路由器 AX6000 5G双频WIFI6 6000M速率 无线穿墙千兆家用智能电竞路由512MB","乱劈才方便米饭热水冲泡速食自热米饭食品户外快餐饭自热料理整箱1人份 川味卤肉1盒","康师傅方便面 泡面袋面劲爽拉面红烧牛肉味家庭装休闲零食 【24袋整箱】红烧8袋+香辣8袋"] 263 | //搜索商品任务 264 | function flgsearch(timeout = 0) { 265 | return new Promise((resolve) => { 266 | let times = new Date().getTime() 267 | contentes = pllist[RT(0, pllist.length - 1)] 268 | let url = { 269 | url: `https://api.flgflg.com/htmmall/api/gs/item/byKw`, 270 | headers: { 271 | "Accept": "*/*", 272 | "Accept-Encoding": "gzip, deflate, br", 273 | "Accept-Language": "zh-Hans-CN;q=1", 274 | "Connection": "keep-alive", 275 | "Content-Length": "510", 276 | "Content-Type": "application/x-www-form-urlencoded", 277 | "Host": "api.flgflg.com", 278 | "User-Agent": "Litaoyouxuan/2.0.4 (iPhone; iOS 14.4.1; Scale/3.00)" 279 | }, 280 | body: `agrtver=8.2&channel=${flgchannel}&ct=1&jdOwner=false&keyword=${pllist}&maxPrice=&minPrice=&pageNo=1&pageSize=20&sortType=1&source=3&token=${flgtoken}&ts=${times}&typeS=11&ver=2.0.4&volumeLimitVal=0&withCoupon=false`, 281 | } 282 | $.post(url, async (err, resp, data) => { 283 | try { 284 | 285 | const result = JSON.parse(data) 286 | 287 | if (result.code == 0) { 288 | console.log(`【搜索商品任务完成】:${result.msg}\n`) 289 | 290 | 291 | } else { 292 | console.log(`【搜索商品任务完成失败】:${result.msg}\n`) 293 | 294 | } 295 | } catch (e) { 296 | 297 | } finally { 298 | 299 | resolve() 300 | } 301 | }, timeout) 302 | }) 303 | } 304 | 305 | 306 | function flgtask(rwid) { 307 | return new Promise((resolve) => { 308 | let times = new Date().getTime() 309 | let url = { 310 | url: `http://api.flgflg.com/htmmall/api/gold/client/report`, 311 | headers: { 312 | "Accept": "application/json, text/javascript, */*; q=0.01", 313 | "Accept-Encoding": "gzip, deflate", 314 | "Accept-Language": "zh-cn", 315 | "Connection": "close", 316 | "Content-Length": "144", 317 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 318 | "Host": "api.flgflg.com", 319 | "Origin": "http://api.flgflg.com", 320 | "Referer": `http://api.flgflg.com/htmmall/page/adv/share-commission.html?itemId=616612945566&source=1&goodsSign=undefined?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}`, 321 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", 322 | "X-Requested-With": "XMLHttpRequest" 323 | }, 324 | body: `taskId=${rwid}&key=1635435725356&agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 325 | } 326 | $.post(url, async (err, resp, data) => { 327 | try { 328 | const result = JSON.parse(data) 329 | if (result.code == 0) { 330 | console.log(`【任务完成】:${result.msg}\n`) 331 | 332 | 333 | } else { 334 | console.log(`【任务完成失败】:${result.msg}\n`) 335 | 336 | } 337 | } catch (e) { 338 | 339 | } finally { 340 | 341 | resolve() 342 | } 343 | }, 0) 344 | }) 345 | } 346 | 347 | //签到任务 348 | function flgsigninfo(timeout = 0) { 349 | return new Promise((resolve) => { 350 | let times = new Date().getTime() 351 | 352 | let url = { 353 | url: `https://api.flgflg.com/htmmall/api/act/sign/info?agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 354 | headers: { 355 | "Accept": "application/json, text/javascript, */*; q=0.01", 356 | "Accept-Encoding": "gzip, deflate, br", 357 | "Accept-Language": "zh-cn", "Connection": "keep-alive", 358 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 359 | "Host": "api.flgflg.com", 360 | "Referer": `https://api.flgflg.com/htmmall//page/user/sign_n1.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 361 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", 362 | "X-Requested-With": "XMLHttpRequest" 363 | }, 364 | 365 | } 366 | $.get(url, async (err, resp, data) => { 367 | try { 368 | 369 | const result = JSON.parse(data) 370 | 371 | if (result.code == 0) { 372 | if (result.data.needSign == false) { 373 | console.log(`【签到已完成】:${result.msg}\n`) 374 | console.log(`【剩余金币】:${result.data.asset.remainIncomeGold}\n`) 375 | console.log(`【剩余现金】:${result.data.asset.remainIncomeString}\n`) 376 | console.log(`【总金币收入】:${result.data.asset.totalIncomeGold}\n`) 377 | console.log(`【总现金收入】:${result.data.asset.totalIncomeString}\n`) 378 | console.log(`【开始判断是否能兑换现金】\n`) 379 | if(result.data.asset.remainIncomeGold >=1000){ 380 | await $.wait(5000) 381 | await flgcoin() 382 | }else{ 383 | console.log(`【金币不足,继续努力】\n`) 384 | } 385 | $.message += `【签到已完成】:${result.msg}\n` 386 | $.message += `【剩余金币】:${result.data.asset.remainIncomeGold}\n` 387 | $.message += `【剩余现金】:${result.data.asset.remainIncomeString}\n` 388 | $.message += `【总金币收入】:${result.data.asset.totalIncomeGold}\n` 389 | $.message += `【总现金收入】:${result.data.asset.totalIncomeString}\n` 390 | 391 | } else { 392 | console.log(`【开始签到】\n`) 393 | await $.wait(2000) 394 | await flgsign() 395 | } 396 | 397 | 398 | 399 | } else { 400 | console.log(`【签到任务失败】:${result.msg}\n`) 401 | 402 | } 403 | } catch (e) { 404 | 405 | } finally { 406 | 407 | resolve() 408 | } 409 | }, timeout) 410 | }) 411 | } 412 | 413 | 414 | 415 | 416 | //签到 417 | function flgsign(timeout = 0) { 418 | return new Promise((resolve) => { 419 | 420 | let times = new Date().getTime() 421 | 422 | let url = { 423 | url: `https://api.flgflg.com/htmmall/api/sign/add`, 424 | headers: { 425 | "Accept": "application/json, text/javascript, */*; q=0.01", 426 | "Accept-Encoding": "gzip, deflate, br", 427 | "Accept-Language": "zh-cn", 428 | "Connection": "keep-alive", 429 | "Content-Length": "132", 430 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 431 | "Host": "api.flgflg.com", 432 | "Origin": "https://api.flgflg.com", 433 | "Referer": `https://api.flgflg.com/htmmall//page/user/sign_n1.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 434 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", 435 | "X-Requested-With": "XMLHttpRequest" 436 | }, 437 | body: `needReSign=true&agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 438 | } 439 | $.post(url, async (err, resp, data) => { 440 | try { 441 | 442 | const result = JSON.parse(data) 443 | 444 | if (result.code == 0) { 445 | console.log(`【签到任务】:${result.data}\n`) 446 | 447 | 448 | } else { 449 | console.log(`【签到任务失败】:${result.msg}\n`) 450 | 451 | } 452 | } catch (e) { 453 | 454 | } finally { 455 | 456 | resolve() 457 | } 458 | }, timeout) 459 | }) 460 | } 461 | 462 | 463 | //使用5分钟app 464 | function flgfive(timeout = 0) { 465 | return new Promise((resolve) => { 466 | 467 | let times = new Date().getTime() 468 | 469 | let url = { 470 | url: `https://api.flgflg.com/htmmall/api/gold/client/report?agrtver=8.2&channel=${flgchannel}&ct=1&key=1635617326273_1635617326273&taskId=21&token=${flgtoken}&ts=${times}&ver=2.0.4`, 471 | headers: {"Accept": "*/*", 472 | "Accept-Encoding": "gzip, deflate, br", 473 | "Accept-Language": "zh-Hans-CN;q=1", 474 | "Connection": "keep-alive", 475 | "Host": "api.flgflg.com", 476 | "User-Agent": "Litaoyouxuan/2.0.4 (iPhone; iOS 14.4.1; Scale/3.00)"}, 477 | } 478 | $.get(url, async (err, resp, data) => { 479 | try { 480 | 481 | const result = JSON.parse(data) 482 | 483 | if (result.code == 0) { 484 | console.log(`【使用5分钟app成功】:${result.msg}\n`) 485 | 486 | 487 | } else { 488 | console.log(`【使用5分钟app失败,可能已领取】:${result.msg}\n`) 489 | 490 | } 491 | } catch (e) { 492 | 493 | } finally { 494 | 495 | resolve() 496 | } 497 | }, timeout) 498 | }) 499 | } 500 | 501 | 502 | //早起打卡信息获取 503 | function flgdktask(timeout = 0) { 504 | return new Promise((resolve) => { 505 | 506 | let times = new Date().getTime() 507 | 508 | let url = { 509 | url: `https://api.flgflg.com/htmmall/api/act/getActMorningStatus`, 510 | headers:{"Accept": "application/json, text/javascript, */*; q=0.01", 511 | "Accept-Encoding": "gzip, deflate, br", 512 | "Accept-Language": "zh-cn","Connection": "keep-alive", 513 | "Content-Length": "116","Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 514 | "Host": "api.flgflg.com", 515 | "Origin": "https://api.flgflg.com", 516 | "Referer": `https://api.flgflg.com/htmmall//page/act/earlyChallenge/index.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 517 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","X-Requested-With": "XMLHttpRequest" 518 | }, 519 | body: `agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 520 | } 521 | $.post(url, async (err, resp, data) => { 522 | try { 523 | 524 | const result = JSON.parse(data) 525 | 526 | if (result.code == 0) { 527 | console.log(`【查询打卡信息】:${result.msg}\n`) 528 | if(result.data.canDoActMorning == true){ 529 | console.log(`【已到打卡时间(早上7-9点之间执行),准备开始打卡】\n`) 530 | if (nowTimes.getHours() === 7 || nowTimes.getHours() === 8 ) { 531 | await $.wait(5000) 532 | await flgDoActMorning() 533 | }else{ 534 | console.log(`【打卡时间未到,请在7-9点之间运行】\n`) 535 | } 536 | }else{ 537 | console.log(`【打卡时间未到,或已打卡】\n`) 538 | } 539 | if(result.data.hasJoinToday == false){ 540 | console.log(`【查询到未报名今日打卡,开始报名打卡】\n`) 541 | await $.wait(5000) 542 | await flgJoinToday() 543 | }else{ 544 | console.log(`【今日已报名打卡,请明早7-9点准时打卡哦】\n`) 545 | } 546 | 547 | 548 | 549 | } else { 550 | console.log(`【查询打卡信息失败】:${result.msg}\n`) 551 | 552 | } 553 | } catch (e) { 554 | 555 | } finally { 556 | 557 | resolve() 558 | } 559 | }, timeout) 560 | }) 561 | } 562 | 563 | 564 | 565 | //报名打卡 566 | function flgJoinToday(timeout = 0) { 567 | return new Promise((resolve) => { 568 | 569 | let times = new Date().getTime() 570 | 571 | let url = { 572 | url: `https://api.flgflg.com/htmmall/api/act/joinActMorning?amount=100&agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 573 | headers: {"Accept": "application/json, text/javascript, */*; q=0.01", 574 | "Accept-Encoding": "gzip, deflate, br", 575 | "Accept-Language": "zh-cn", 576 | "Connection": "keep-alive", 577 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 578 | "Host": "api.flgflg.com", 579 | "Referer": `https://api.flgflg.com/htmmall//page/act/earlyChallenge/index.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 580 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", 581 | "X-Requested-With": "XMLHttpRequest"}, 582 | } 583 | $.get(url, async (err, resp, data) => { 584 | try { 585 | 586 | const result = JSON.parse(data) 587 | 588 | if (result.code == 0) { 589 | console.log(`【报名打卡成功】:${result.msg}\n`) 590 | 591 | 592 | } else { 593 | console.log(`【报名打卡失败】:${result.msg}\n`) 594 | 595 | } 596 | } catch (e) { 597 | 598 | } finally { 599 | 600 | resolve() 601 | } 602 | }, timeout) 603 | }) 604 | } 605 | 606 | 607 | //打卡 608 | function flgDoActMorning(timeout = 0) { 609 | return new Promise((resolve) => { 610 | 611 | let times = new Date().getTime() 612 | 613 | let url = { 614 | url: `https://api.flgflg.com/htmmall/api/act/doActMorning`, 615 | headers: {"Accept": "application/json, text/javascript, */*; q=0.01", 616 | "Accept-Encoding": "gzip, deflate, br", 617 | "Accept-Language": "zh-cn", 618 | "Connection": "keep-alive", 619 | "Content-Length": "116", 620 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 621 | "Host": "api.flgflg.com", 622 | "Origin": "https://api.flgflg.com", 623 | "Referer": `https://api.flgflg.com/htmmall//page/act/earlyChallenge/index.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 624 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","X-Requested-With": "XMLHttpRequest"}, 625 | body: `agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 626 | } 627 | $.post(url, async (err, resp, data) => { 628 | try { 629 | 630 | const result = JSON.parse(data) 631 | 632 | if (result.code == 0) { 633 | console.log(`【打卡成功】:${result.data}\n`) 634 | 635 | 636 | } else { 637 | console.log(`【打卡失败】:${result.msg}\n`) 638 | 639 | } 640 | } catch (e) { 641 | 642 | } finally { 643 | 644 | resolve() 645 | } 646 | }, timeout) 647 | }) 648 | } 649 | 650 | 651 | 652 | 653 | 654 | //兑换现金 655 | function flgcoin(timeout = 0) { 656 | return new Promise((resolve) => { 657 | 658 | let times = new Date().getTime() 659 | 660 | let url = { 661 | url: `https://api.flgflg.com/htmmall/api/gold/exchangeGold`, 662 | headers: { 663 | "Accept": "application/json, text/javascript, */*; q=0.01", 664 | "Accept-Encoding": "gzip, deflate, br", 665 | "Accept-Language": "zh-cn", 666 | "Connection": "keep-alive", 667 | "Content-Length": "132", 668 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 669 | "Host": "api.flgflg.com","Origin": "https://api.flgflg.com", 670 | "Referer": `https://api.flgflg.com/htmmall/page/assets/goldExchange.html?agrtver=8.2&ts=${times}&netType=1&ct=1&channel=${flgchannel}&token=${flgtoken}&ver=2.0.4`, 671 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","X-Requested-With": "XMLHttpRequest"}, 672 | body: `type=0&amount=1&agrtver=8.2&netType=1&channel=${flgchannel}&ver=2.0.4&ct=1&ts=${times}&token=${flgtoken}`, 673 | } 674 | $.post(url, async (err, resp, data) => { 675 | try { 676 | 677 | const result = JSON.parse(data) 678 | 679 | if (result.code == 0) { 680 | console.log(`【兑换现金】:${result.msg}\n`) 681 | $.message += `【兑换现金】:${result.msg}\n` 682 | 683 | } else { 684 | console.log(`【兑换现金失败】:${result.msg}\n`) 685 | 686 | } 687 | } catch (e) { 688 | 689 | } finally { 690 | 691 | resolve() 692 | } 693 | }, timeout) 694 | }) 695 | } 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | function message() { 712 | if (tz == 1) { $.msg($.name, "", $.message) } 713 | } 714 | //时间 715 | nowTimes = new Date( 716 | new Date().getTime() + 717 | new Date().getTimezoneOffset() * 60 * 1000 + 718 | 8 * 60 * 60 * 1000 719 | ); 720 | 721 | function RT(X, Y) { 722 | do rt = Math.floor(Math.random() * Y); 723 | while (rt < X) 724 | return rt; 725 | } 726 | 727 | 728 | //console.log('\n'+getCurrentDate()); 729 | function getCurrentDate() { 730 | var date = new Date(); 731 | var seperator1 = "-"; 732 | var seperator2 = ":"; 733 | var month = date.getMonth() + 1; 734 | var strDate = date.getDate(); 735 | if (month >= 1 && month <= 9) { 736 | month = "0" + month; 737 | } 738 | if (strDate >= 0 && strDate <= 9) { 739 | strDate = "0" + strDate; 740 | } 741 | var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate 742 | + " " + date.getHours() + seperator2 + date.getMinutes() 743 | + seperator2 + date.getSeconds(); 744 | return currentdate; 745 | 746 | 747 | } 748 | 749 | 750 | 751 | 752 | 753 | 754 | function Env(name, opts) { 755 | class Http { 756 | constructor(env) { 757 | this.env = env 758 | } 759 | send(opts, method = 'GET') { 760 | opts = typeof opts === 'string' ? { 761 | url: opts 762 | } : opts 763 | let sender = this.get 764 | if (method === 'POST') { 765 | sender = this.post 766 | } 767 | return new Promise((resolve, reject) => { 768 | sender.call(this, opts, (err, resp, body) => { 769 | if (err) reject(err) 770 | else resolve(resp) 771 | }) 772 | }) 773 | } 774 | get(opts) { 775 | return this.send.call(this.env, opts) 776 | } 777 | post(opts) { 778 | return this.send.call(this.env, opts, 'POST') 779 | } 780 | } 781 | return new (class { 782 | constructor(name, opts) { 783 | this.name = name 784 | this.http = new Http(this) 785 | this.data = null 786 | this.dataFile = 'box.dat' 787 | this.logs = [] 788 | this.isMute = false 789 | this.isNeedRewrite = false 790 | this.logSeparator = '\n' 791 | this.startTime = new Date().getTime() 792 | Object.assign(this, opts) 793 | this.log('', `🔔${this.name 794 | }, 开始!`) 795 | } 796 | isNode() { 797 | return 'undefined' !== typeof module && !!module.exports 798 | } 799 | isQuanX() { 800 | return 'undefined' !== typeof $task 801 | } 802 | isSurge() { 803 | return 'undefined' !== typeof $httpClient && 'undefined' === typeof $loon 804 | } 805 | isLoon() { 806 | return 'undefined' !== typeof $loon 807 | } 808 | isShadowrocket() { 809 | return 'undefined' !== typeof $rocket 810 | } 811 | toObj(str, defaultValue = null) { 812 | try { 813 | return JSON.parse(str) 814 | } catch { 815 | return defaultValue 816 | } 817 | } 818 | toStr(obj, defaultValue = null) { 819 | try { 820 | return JSON.stringify(obj) 821 | } catch { 822 | return defaultValue 823 | } 824 | } 825 | getjson(key, defaultValue) { 826 | let json = defaultValue 827 | const val = this.getdata(key) 828 | if (val) { 829 | try { 830 | json = JSON.parse(this.getdata(key)) 831 | } catch { } 832 | } 833 | return json 834 | } 835 | setjson(val, key) { 836 | try { 837 | return this.setdata(JSON.stringify(val), key) 838 | } catch { 839 | return false 840 | } 841 | } 842 | getScript(url) { 843 | return new Promise((resolve) => { 844 | this.get({ 845 | url 846 | }, (err, resp, body) => resolve(body)) 847 | }) 848 | } 849 | runScript(script, runOpts) { 850 | return new Promise((resolve) => { 851 | let httpapi = this.getdata('@chavy_boxjs_userCfgs.httpapi') 852 | httpapi = httpapi ? httpapi.replace(/\n/g, '').trim() : httpapi 853 | let httpapi_timeout = this.getdata('@chavy_boxjs_userCfgs.httpapi_timeout') 854 | httpapi_timeout = httpapi_timeout ? httpapi_timeout * 1 : 20 855 | httpapi_timeout = runOpts && runOpts.timeout ? runOpts.timeout : httpapi_timeout 856 | const [key, addr] = httpapi.split('@') 857 | const opts = { 858 | url: `http: //${addr}/v1/scripting/evaluate`, 859 | body: { 860 | script_text: script, 861 | mock_type: 'cron', 862 | timeout: httpapi_timeout 863 | }, 864 | headers: { 865 | 'X-Key': key, 866 | 'Accept': '*/*' 867 | } 868 | } 869 | this.post(opts, (err, resp, body) => resolve(body)) 870 | }).catch((e) => this.logErr(e)) 871 | } 872 | loaddata() { 873 | if (this.isNode()) { 874 | this.fs = this.fs ? this.fs : require('fs') 875 | this.path = this.path ? this.path : require('path') 876 | const curDirDataFilePath = this.path.resolve(this.dataFile) 877 | const rootDirDataFilePath = this.path.resolve(process.cwd(), this.dataFile) 878 | const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath) 879 | const isRootDirDataFile = !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath) 880 | if (isCurDirDataFile || isRootDirDataFile) { 881 | const datPath = isCurDirDataFile ? curDirDataFilePath : rootDirDataFilePath 882 | try { 883 | return JSON.parse(this.fs.readFileSync(datPath)) 884 | } catch (e) { 885 | return {} 886 | } 887 | } else return {} 888 | } else return {} 889 | } 890 | writedata() { 891 | if (this.isNode()) { 892 | this.fs = this.fs ? this.fs : require('fs') 893 | this.path = this.path ? this.path : require('path') 894 | const curDirDataFilePath = this.path.resolve(this.dataFile) 895 | const rootDirDataFilePath = this.path.resolve(process.cwd(), this.dataFile) 896 | const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath) 897 | const isRootDirDataFile = !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath) 898 | const jsondata = JSON.stringify(this.data) 899 | if (isCurDirDataFile) { 900 | this.fs.writeFileSync(curDirDataFilePath, jsondata) 901 | } else if (isRootDirDataFile) { 902 | this.fs.writeFileSync(rootDirDataFilePath, jsondata) 903 | } else { 904 | this.fs.writeFileSync(curDirDataFilePath, jsondata) 905 | } 906 | } 907 | } 908 | lodash_get(source, path, defaultValue = undefined) { 909 | const paths = path.replace(/[(d+)]/g, '.$1').split('.') 910 | let result = source 911 | for (const p of paths) { 912 | result = Object(result)[p] 913 | if (result === undefined) { 914 | return defaultValue 915 | } 916 | } 917 | return result 918 | } 919 | lodash_set(obj, path, value) { 920 | if (Object(obj) !== obj) return obj 921 | if (!Array.isArray(path)) path = path.toString().match(/[^.[]]+/g) || [] 922 | path 923 | .slice(0, -1) 924 | .reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[ 925 | path[path.length - 1] 926 | ] = value 927 | return obj 928 | } 929 | getdata(key) { 930 | let val = this.getval(key) 931 | // 如果以 @ 932 | if (/^@/.test(key)) { 933 | const [, objkey, paths] = /^@(.*?).(.*?)$/.exec(key) 934 | const objval = objkey ? this.getval(objkey) : '' 935 | if (objval) { 936 | try { 937 | const objedval = JSON.parse(objval) 938 | val = objedval ? this.lodash_get(objedval, paths, '') : val 939 | } catch (e) { 940 | val = '' 941 | } 942 | } 943 | } 944 | return val 945 | } 946 | setdata(val, key) { 947 | let issuc = false 948 | if (/^@/.test(key)) { 949 | const [, objkey, paths] = /^@(.*?).(.*?)$/.exec(key) 950 | const objdat = this.getval(objkey) 951 | const objval = objkey ? (objdat === 'null' ? null : objdat || '{}') : '{}' 952 | try { 953 | const objedval = JSON.parse(objval) 954 | this.lodash_set(objedval, paths, val) 955 | issuc = this.setval(JSON.stringify(objedval), objkey) 956 | } catch (e) { 957 | const objedval = {} 958 | this.lodash_set(objedval, paths, val) 959 | issuc = this.setval(JSON.stringify(objedval), objkey) 960 | } 961 | } else { 962 | issuc = this.setval(val, key) 963 | } 964 | return issuc 965 | } 966 | getval(key) { 967 | if (this.isSurge() || this.isLoon()) { 968 | return $persistentStore.read(key) 969 | } else if (this.isQuanX()) { 970 | return $prefs.valueForKey(key) 971 | } else if (this.isNode()) { 972 | this.data = this.loaddata() 973 | return this.data[key] 974 | } else { 975 | return (this.data && this.data[key]) || null 976 | } 977 | } 978 | setval(val, key) { 979 | if (this.isSurge() || this.isLoon()) { 980 | return $persistentStore.write(val, key) 981 | } else if (this.isQuanX()) { 982 | return $prefs.setValueForKey(val, key) 983 | } else if (this.isNode()) { 984 | this.data = this.loaddata() 985 | this.data[key] = val 986 | this.writedata() 987 | return true 988 | } else { 989 | return (this.data && this.data[key]) || null 990 | } 991 | } 992 | initGotEnv(opts) { 993 | this.got = this.got ? this.got : require('got') 994 | this.cktough = this.cktough ? this.cktough : require('tough-cookie') 995 | this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar() 996 | if (opts) { 997 | opts.headers = opts.headers ? opts.headers : {} 998 | if (undefined === opts.headers.Cookie && undefined === opts.cookieJar) { 999 | opts.cookieJar = this.ckjar 1000 | } 1001 | } 1002 | } 1003 | get(opts, callback = () => { }) { 1004 | if (opts.headers) { 1005 | delete opts.headers['Content-Type'] 1006 | delete opts.headers['Content-Length'] 1007 | } 1008 | if (this.isSurge() || this.isLoon()) { 1009 | if (this.isSurge() && this.isNeedRewrite) { 1010 | opts.headers = opts.headers || {} 1011 | Object.assign(opts.headers, { 1012 | 'X-Surge-Skip-Scripting': false 1013 | }) 1014 | } 1015 | $httpClient.get(opts, (err, resp, body) => { 1016 | if (!err && resp) { 1017 | resp.body = body 1018 | resp.statusCode = resp.status 1019 | } 1020 | callback(err, resp, body) 1021 | }) 1022 | } else if (this.isQuanX()) { 1023 | if (this.isNeedRewrite) { 1024 | opts.opts = opts.opts || {} 1025 | Object.assign(opts.opts, { 1026 | hints: false 1027 | }) 1028 | } 1029 | $task.fetch(opts).then( 1030 | (resp) => { 1031 | const { 1032 | statusCode: status, 1033 | statusCode, 1034 | headers, 1035 | body 1036 | } = resp 1037 | callback(null, { 1038 | status, 1039 | statusCode, 1040 | headers, 1041 | body 1042 | }, body) 1043 | }, 1044 | (err) => callback(err) 1045 | ) 1046 | } else if (this.isNode()) { 1047 | this.initGotEnv(opts) 1048 | this.got(opts) 1049 | .on('redirect', (resp, nextOpts) => { 1050 | try { 1051 | if (resp.headers['set-cookie']) { 1052 | const ck = resp.headers['set-cookie'].map(this.cktough.Cookie.parse).toString() 1053 | if (ck) { 1054 | this.ckjar.setCookieSync(ck, null) 1055 | } 1056 | nextOpts.cookieJar = this.ckjar 1057 | } 1058 | } catch (e) { 1059 | this.logErr(e) 1060 | } 1061 | // this.ckjar.setCookieSync(resp.headers['set-cookie'].map(Cookie.parse).toString()) 1062 | }) 1063 | .then( 1064 | (resp) => { 1065 | const { 1066 | statusCode: status, 1067 | statusCode, 1068 | headers, 1069 | body 1070 | } = resp 1071 | callback(null, { 1072 | status, 1073 | statusCode, 1074 | headers, 1075 | body 1076 | }, body) 1077 | }, 1078 | (err) => { 1079 | const { 1080 | message: error, 1081 | response: resp 1082 | } = err 1083 | callback(error, resp, resp && resp.body) 1084 | } 1085 | ) 1086 | } 1087 | } 1088 | post(opts, callback = () => { }) { 1089 | const method = opts.method ? opts.method.toLocaleLowerCase() : 'post' 1090 | // 如果指定了请求体, 但没指定`Content-Type`, 则自动生成 1091 | if (opts.body && opts.headers && !opts.headers['Content-Type']) { 1092 | opts.headers['Content-Type'] = 'application/x-www-form-urlencoded' 1093 | } 1094 | if (opts.headers) delete opts.headers['Content-Length'] 1095 | if (this.isSurge() || this.isLoon()) { 1096 | if (this.isSurge() && this.isNeedRewrite) { 1097 | opts.headers = opts.headers || {} 1098 | Object.assign(opts.headers, { 1099 | 'X-Surge-Skip-Scripting': false 1100 | }) 1101 | } 1102 | $httpClient[method](opts, (err, resp, body) => { 1103 | if (!err && resp) { 1104 | resp.body = body 1105 | resp.statusCode = resp.status 1106 | } 1107 | callback(err, resp, body) 1108 | }) 1109 | } else if (this.isQuanX()) { 1110 | opts.method = method 1111 | if (this.isNeedRewrite) { 1112 | opts.opts = opts.opts || {} 1113 | Object.assign(opts.opts, { 1114 | hints: false 1115 | }) 1116 | } 1117 | $task.fetch(opts).then( 1118 | (resp) => { 1119 | const { 1120 | statusCode: status, 1121 | statusCode, 1122 | headers, 1123 | body 1124 | } = resp 1125 | callback(null, { 1126 | status, 1127 | statusCode, 1128 | headers, 1129 | body 1130 | }, body) 1131 | }, 1132 | (err) => callback(err) 1133 | ) 1134 | } else if (this.isNode()) { 1135 | this.initGotEnv(opts) 1136 | const { 1137 | url, 1138 | ..._opts 1139 | } = opts 1140 | this.got[method](url, _opts).then( 1141 | (resp) => { 1142 | const { 1143 | statusCode: status, 1144 | statusCode, 1145 | headers, 1146 | body 1147 | } = resp 1148 | callback(null, { 1149 | status, 1150 | statusCode, 1151 | headers, 1152 | body 1153 | }, body) 1154 | }, 1155 | (err) => { 1156 | const { 1157 | message: error, 1158 | response: resp 1159 | } = err 1160 | callback(error, resp, resp && resp.body) 1161 | } 1162 | ) 1163 | } 1164 | } 1165 | /** 1166 | * 1167 | * 示例:$.time('yyyy-MM-dd qq HH:mm:ss.S') 1168 | * :$.time('yyyyMMddHHmmssS') 1169 | * y:年 M:月 d:日 q:季 H:时 m:分 s:秒 S:毫秒 1170 | * 其中y可选0-4位占位符、S可选0-1位占位符,其余可选0-2位占位符 1171 | * @param {string} fmt 格式化参数 1172 | * @param {number} 可选: 根据指定时间戳返回格式化日期 1173 | * 1174 | */ 1175 | time(fmt, ts = null) { 1176 | const date = ts ? new Date(ts) : new Date() 1177 | let o = { 1178 | 'M+': date.getMonth() + 1, 1179 | 'd+': date.getDate(), 1180 | 'H+': date.getHours(), 1181 | 'm+': date.getMinutes(), 1182 | 's+': date.getSeconds(), 1183 | 'q+': Math.floor((date.getMonth() + 3) / 3), 1184 | 'S': date.getMilliseconds() 1185 | } 1186 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) 1187 | for (let k in o) 1188 | if (new RegExp('(' + k + ')').test(fmt)) 1189 | fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)) 1190 | return fmt 1191 | } 1192 | /** 1193 | * 系统通知 1194 | * 1195 | * > 通知参数: 同时支持 QuanX 和 Loon 两种格式, EnvJs根据运行环境自动转换, Surge 环境不支持多媒体通知 1196 | * 1197 | * 示例: 1198 | * $.msg(title, subt, desc, 'twitter://') 1199 | * $.msg(title, subt, desc, { 'open-url': 'twitter://', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) 1200 | * $.msg(title, subt, desc, { 'open-url': 'https://bing.com', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) 1201 | * 1202 | * @param {*} title 标题 1203 | * @param {*} subt 副标题 1204 | * @param {*} desc 通知详情 1205 | * @param {*} opts 通知参数 1206 | * 1207 | */ 1208 | msg(title = name, subt = '', desc = '', opts) { 1209 | const toEnvOpts = (rawopts) => { 1210 | if (!rawopts) return rawopts 1211 | if (typeof rawopts === 'string') { 1212 | if (this.isLoon()) return rawopts 1213 | else if (this.isQuanX()) return { 1214 | 'open-url': rawopts 1215 | } 1216 | else if (this.isSurge()) return { 1217 | url: rawopts 1218 | } 1219 | else return undefined 1220 | } else if (typeof rawopts === 'object') { 1221 | if (this.isLoon()) { 1222 | let openUrl = rawopts.openUrl || rawopts.url || rawopts['open-url'] 1223 | let mediaUrl = rawopts.mediaUrl || rawopts['media-url'] 1224 | return { 1225 | openUrl, 1226 | mediaUrl 1227 | } 1228 | } else if (this.isQuanX()) { 1229 | let openUrl = rawopts['open-url'] || rawopts.url || rawopts.openUrl 1230 | let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl 1231 | return { 1232 | 'open-url': openUrl, 1233 | 'media-url': mediaUrl 1234 | } 1235 | } else if (this.isSurge()) { 1236 | let openUrl = rawopts.url || rawopts.openUrl || rawopts['open-url'] 1237 | return { 1238 | url: openUrl 1239 | } 1240 | } 1241 | } else { 1242 | return undefined 1243 | } 1244 | } 1245 | if (!this.isMute) { 1246 | if (this.isSurge() || this.isLoon()) { 1247 | $notification.post(title, subt, desc, toEnvOpts(opts)) 1248 | } else if (this.isQuanX()) { 1249 | $notify(title, subt, desc, toEnvOpts(opts)) 1250 | } 1251 | } 1252 | if (!this.isMuteLog) { 1253 | let logs = ['', '==============📣系统通知📣=============='] 1254 | logs.push(title) 1255 | subt ? logs.push(subt) : '' 1256 | desc ? logs.push(desc) : '' 1257 | console.log(logs.join('\n')) 1258 | this.logs = this.logs.concat(logs) 1259 | } 1260 | } 1261 | log(...logs) { 1262 | if (logs.length > 0) { 1263 | this.logs = [...this.logs, ...logs] 1264 | } 1265 | console.log(logs.join(this.logSeparator)) 1266 | } 1267 | logErr(err, msg) { 1268 | const isPrintSack = !this.isSurge() && !this.isQuanX() && !this.isLoon() 1269 | if (!isPrintSack) { 1270 | this.log('', `❗️${this.name 1271 | }, 错误!`, err) 1272 | } else { 1273 | this.log('', `❗️${this.name 1274 | }, 错误!`, err.stack) 1275 | } 1276 | } 1277 | wait(time) { 1278 | return new Promise((resolve) => setTimeout(resolve, time)) 1279 | } 1280 | done(val = {}) { 1281 | const endTime = new Date().getTime() 1282 | const costTime = (endTime - this.startTime) / 1000 1283 | this.log('', `🔔${this.name 1284 | }, 结束!🕛${costTime}秒`) 1285 | this.log() 1286 | if (this.isSurge() || this.isQuanX() || this.isLoon()) { 1287 | $done(val) 1288 | } 1289 | } 1290 | })(name, opts) 1291 | } 1292 | 1293 | 1294 | -------------------------------------------------------------------------------- /hf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHwin/qltool/f4296271e33e72d6fa6ad8c62955c864fed5f872/hf.jpg -------------------------------------------------------------------------------- /jrttjsb.js: -------------------------------------------------------------------------------- 1 | /* 2 | IOS/安卓: 今日头条极速版 3 | 邀请码: 1173836876 4 | 5 | 老用户每天几毛,新用户可能收益高点 6 | 普通版定时: 1-59/15 6-23 * * * 7 | 激进版定时: 1-59/5 * * * * 8 | 多用户跑的时间会久一点,自己看着改定时吧 9 | 10 | 自定义UA:捉包拿到自己的UA,填到变量jrttjsbUA里,不填默认用安卓UA 11 | 自定义每次运行阅读文章的数量:填到变量jrttjsbReadNum,不填默认10篇 12 | 农场和种树任务:默认不做,需要做的,把变量jrttjsbFarm填为1 13 | 14 | V2P重写: 15 | [task_local] 16 | #今日头条极速版 17 | 1-59/15 6-23 * * * https://raw.githubusercontent.com/leafxcy/JavaScript/main/jrttjsb.js, tag=今日头条极速版, enabled=true 18 | [rewrite_local] 19 | luckycat\/lite\/v1\/task\/page_data url script-request-header https://raw.githubusercontent.com/leafxcy/JavaScript/main/jrttjsb.js 20 | [MITM] 21 | #每个人的域名不同,都放进去MITM吧,还捉不到就自行捉包填写 22 | hostname = *.snssdk.com 23 | hostname = *.toutiaoapi.com 24 | 25 | 青龙把极速版捉包里面的cookie放到jrttjsbHeader里,多账户用@隔开 26 | */ 27 | 28 | const jsname = '今日头条极速版' 29 | const $ = Env(jsname) 30 | const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1 31 | const logDebug = 0 32 | 33 | //const notify = $.isNode() ? require('./sendNotify') : ''; 34 | let notifyStr = '' 35 | 36 | let rndtime = "" //毫秒 37 | let httpResult //global buffer 38 | 39 | let host = 'i.snssdk.com' 40 | let hostname = 'https://' + host 41 | 42 | let userAgent = ($.isNode() ? process.env.jrttjsbUA : $.getdata('jrttjsbUA')) || 'Dalvik/2.1.0 (Linux; U; Android 7.1.2; VOG-AL10 Build/HUAWEIVOG-AL10) NewsArticle/8.2.8 tt-ok/3.10.0.2'; 43 | let userAgentArr = [] 44 | let userHeader = ($.isNode() ? process.env.jrttjsbHeader : $.getdata('jrttjsbHeader')) || ''; 45 | let userHeaderArr = [] 46 | let jrttjsbFarm = ($.isNode() ? process.env.jrttjsbFarm : $.getdata('jrttjsbFarm')) || 0; 47 | 48 | let userIdx = 0 49 | let UAcount = 0 50 | let userStatus = [] 51 | let maxReadPerRun = ($.isNode() ? process.env.jrttjsbReadNum : $.getdata('jrttjsbReadNum')) || 10; 52 | let readList = [] 53 | 54 | let validList = [] 55 | let adIdList = [26, 181, 186, 187, 188, 189, 190, 195, 210, 214, 216, 225, 308, 324, 327, 329] 56 | 57 | /////////////////////////////////////////////////////////////////// 58 | 59 | !(async () => { 60 | 61 | if(typeof $request !== "undefined") 62 | { 63 | await GetRewrite() 64 | } 65 | else 66 | { 67 | await showUpdateMsg() 68 | 69 | if(!(await checkEnv())) { 70 | return 71 | } 72 | 73 | await initAccountInfo() 74 | await RunMultiUser() 75 | } 76 | 77 | 78 | })() 79 | .catch((e) => $.logErr(e)) 80 | .finally(() => $.done()) 81 | 82 | function showUpdateMsg() { 83 | console.log('\n2021.12.15 9:30 更新:增加推送奖励,修复一个UA的bug,更改默认UA为安卓\n') 84 | } 85 | 86 | //通知 87 | async function showmsg() { 88 | 89 | notifyBody = jsname + "运行通知\n\n" + notifyStr 90 | 91 | if (notifyFlag != 1) { 92 | console.log(notifyBody); 93 | } 94 | 95 | if (notifyFlag == 1) { 96 | $.msg(notifyBody); 97 | //if ($.isNode()){await notify.sendNotify($.name, notifyBody );} 98 | } 99 | } 100 | 101 | async function GetRewrite() { 102 | if($request.url.indexOf('luckycat/lite/v1/task/page_data') > -1) { 103 | let userCK = $request.headers.Cookie 104 | 105 | if(userHeader) { 106 | if(userHeader.indexOf(userCK) == -1) { 107 | userHeader = userHeader + '@' + userCK 108 | $.setdata(userHeader, 'jrttjsbHeader'); 109 | ckList = userHeader.split('@') 110 | $.msg(jsname+` 获取第${ckList.length}个jrttjsbHeader成功: ${userCK}`) 111 | } 112 | } else { 113 | $.setdata(userCK, 'jrttjsbHeader'); 114 | $.msg(jsname+` 获取第1个jrttjsbHeader成功: ${userCK}`) 115 | } 116 | } 117 | } 118 | 119 | async function checkEnv() { 120 | if(userHeader) { 121 | userHeaderArr = userHeader.split('@') 122 | } else { 123 | console.log('未找到jrttjsbHeader') 124 | return false 125 | } 126 | if(userHeaderArr.length == 0) { 127 | console.log('未找到有效的jrttjsbHeader') 128 | return false 129 | } 130 | 131 | if(userAgent) { 132 | userAgentArr = userAgent.split('@') 133 | } else { 134 | console.log('未找到userAgent') 135 | return false 136 | } 137 | UAcount = userAgentArr.length 138 | 139 | console.log(`共找到${userHeaderArr.length}个用户,${UAcount}个UA`) 140 | return true 141 | } 142 | 143 | async function initAccountInfo() { 144 | for(userIdx=0; userIdx 0) await GetWalkBonus() 458 | } else { 459 | console.log(`用户${userIdx+1}走路状态失败:${result.err_tips}`) 460 | } 461 | } 462 | 463 | //走路奖励 464 | async function GetWalkBonus() { 465 | let caller = printCaller() 466 | let nowtime = Math.round(new Date().getTime()/1000) 467 | let url = `${hostname}/luckycat/lite/v1/walk/bonus/?aid=35&update_version_code=85221&os_version=15.0&device_platform=iphone` 468 | let body = `{"task_id":136,"enable_preload_exciting_video":0,"client_time":${nowtime},"rit":"","use_ecpm":0}` 469 | let urlObject = populatePostUrl(url,body) 470 | await httpPost(urlObject,caller) 471 | let result = httpResult; 472 | if(!result) return 473 | //console.log(result) 474 | if(result.err_no == 0) { 475 | console.log(`用户${userIdx+1}领取走路奖励获得${result.data.score_amount}金币`) 476 | } else { 477 | console.log(`用户${userIdx+1}领取走路奖励失败:${result.err_tips}`) 478 | } 479 | } 480 | 481 | //吃饭补贴 482 | async function DoneEat() { 483 | let caller = printCaller() 484 | let url = `${hostname}/luckycat/lite/v1/eat/done_eat/?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 485 | let urlObject = populatePostUrl(url) 486 | await httpPost(urlObject,caller) 487 | let result = httpResult; 488 | if(!result) return 489 | //console.log(result) 490 | if(result.err_no == 0) { 491 | console.log(`用户${userIdx+1}领取吃饭补贴获得${result.data.score_amount}金币`) 492 | } else { 493 | console.log(`用户${userIdx+1}领取吃饭补贴失败:${result.err_tips}`) 494 | } 495 | } 496 | 497 | //睡觉状态 498 | async function QuerySleepStatus() { 499 | let caller = printCaller() 500 | let curTime = new Date() 501 | let curHour = curTime.getHours() 502 | let url = `${hostname}/luckycat/lite/v1/sleep/status/?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 503 | let urlObject = populateGetUrl(url) 504 | await httpGet(urlObject,caller) 505 | let result = httpResult; 506 | if(!result) return 507 | //console.log(result) 508 | if(result.err_no == 0) { 509 | let sleepHour = Math.floor(result.data.sleep_last_time/36)/100 510 | if(result.data.sleeping == true) { 511 | if(sleepHour>=12) { 512 | await SleepStop() 513 | } else if(result.data.sleep_unexchanged_score==result.data.max_coin && curHour >= 7) { 514 | let rnd = Math.random() 515 | if(rnd>0.95) { 516 | await SleepStop() 517 | } else { 518 | console.log(`用户${userIdx+1}随机醒来时间,本次不进行醒来,已经睡了${sleepHour}小时,可以获得${result.data.sleep_unexchanged_score}金币`) 519 | } 520 | } else { 521 | console.log(`用户${userIdx+1}睡眠中,已经睡了${sleepHour}小时,可以获得${result.data.sleep_unexchanged_score}金币,上限${result.data.max_coin}金币`) 522 | } 523 | } else { 524 | if(result.data.history_amount > 0) { 525 | await SleepDone(result.data.history_amount) 526 | } 527 | if(curHour >= 22 || curHour < 2) { 528 | await SleepStart() 529 | } else if(curHour >= 20) { 530 | let rnd = Math.random() 531 | if(rnd>0.95) { 532 | await SleepStart() 533 | } else { 534 | console.log(`用户${userIdx+1}随机睡眠时间,本次不进行睡眠`) 535 | } 536 | } else { 537 | console.log(`用户${userIdx+1}未到睡觉时间`) 538 | } 539 | } 540 | } else { 541 | console.log(`用户${userIdx+1}查询睡觉状态失败:${result.err_tips}`) 542 | } 543 | } 544 | 545 | //睡觉醒来 546 | async function SleepStop() { 547 | let caller = printCaller() 548 | let url = `${hostname}/luckycat/lite/v1/sleep/stop/?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 549 | let urlObject = populatePostUrl(url) 550 | await httpPost(urlObject,caller) 551 | let result = httpResult; 552 | if(!result) return 553 | //console.log(result) 554 | if(result.err_no == 0) { 555 | let sleepHour = result.data.sleep_last_time/3600 556 | console.log(`用户${userIdx+1}结束睡眠,本次睡了${sleepHour}小时,可以领取${result.data.history_amount}金币`) 557 | await SleepDone(result.data.history_amount) 558 | } else { 559 | console.log(`用户${userIdx+1}结束睡眠失败:${result.err_tips}`) 560 | } 561 | } 562 | 563 | //睡觉收金币 564 | async function SleepDone(amount) { 565 | let caller = printCaller() 566 | let timeInMS = Math.round(new Date().getTime()) 567 | let url = `${hostname}/luckycat/lite/v1/sleep/done_task/?os_api=25&device_type=VOG-AL10&ssmix=a&manifest_version_code=8280&dpi=240&abflag=3&pass_through=default&use_ecpm=0&rom_version=25&rit=coin&app_name=news_article_lite&ab_client=a1%2Ce1%2Cf2%2Cg2%2Cf7&version_name=8.2.8&ab_version=668903%2C3491704%2C1859936%2C668908%2C3491714%2C668907%2C3491710%2C668905%2C3491678%2C668906%2C3491686%2C668904%2C3491669%2C3269751%2C3472846%2C3493942&plugin_state=7731332411413&sa_enable=0&ac=wifi&_request_from=web&update_version_code=82809&channel=lite2_tengxun&_rticket=${timeInMS}&status_bar_height=24&dq_param=0&device_platform=android&iid=1592553870724568&scm_build_version=1.0.0.1454&mac_address=88%3AB1%3A11%3A61%3A96%3A7B&version_code=828&polaris_version=1.0.5&tma_jssdk_version=1.95.0.28&is_pad=1&resolution=720*1280&os_version=7.1.2&language=zh&device_brand=HUAWEI&aid=35&ab_feature=z1&luckycat_version_name=4.2.0-rc.5&luckycat_version_code=420005` 568 | let body = `{"score_amount":${amount},"enable_preload_exciting_video":0}` 569 | let urlObject = populatePostUrl(url,body) 570 | await httpPost(urlObject,caller) 571 | let result = httpResult; 572 | if(!result) return 573 | //console.log(result) 574 | if(result.err_no == 0) { 575 | console.log(`用户${userIdx+1}领取睡觉金币奖励${amount}金币成功`) 576 | } else { 577 | console.log(`用户${userIdx+1}领取睡觉金币奖励失败:${result.err_tips}`) 578 | } 579 | } 580 | 581 | //开始睡觉 582 | async function SleepStart() { 583 | let caller = printCaller() 584 | let url = `${hostname}/luckycat/lite/v1/sleep/start/?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 585 | let urlObject = populatePostUrl(url) 586 | await httpPost(urlObject,caller) 587 | let result = httpResult; 588 | if(!result) return 589 | //console.log(result) 590 | if(result.err_no == 0) { 591 | console.log(`用户${userIdx+1}开始睡觉,ZZZzzz...`) 592 | await SleepDone(result.data.history_amount) 593 | } else { 594 | console.log(`用户${userIdx+1}开始睡觉失败:${result.err_tips}`) 595 | } 596 | } 597 | 598 | //查询农场状态 599 | async function QueryFarmInfo() { 600 | let caller = printCaller() 601 | let url = `${hostname}/ttgame/game_farm/polling_info?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 602 | let urlObject = populateGetUrl(url) 603 | await httpGet(urlObject,caller) 604 | let result = httpResult; 605 | if(!result) return 606 | //console.log(result) 607 | if(result.status_code == 0) { 608 | if(result.data.info.offline_production) { 609 | await FarmOfflineDouble() 610 | } 611 | if(result.data.info.water>=10) { 612 | await FarmWater() 613 | } 614 | if(result.data.info.box_num>0) { 615 | await FarmOpenBox() 616 | } 617 | } else { 618 | console.log(`用户${userIdx+1}查询农场状态失败:${result.message}`) 619 | } 620 | } 621 | 622 | //进入农场 623 | async function EnterFarm() { 624 | let caller = printCaller() 625 | let url = `${hostname}/ttgame/game_farm/home_info?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 626 | let urlObject = populateGetUrl(url) 627 | await httpGet(urlObject,caller) 628 | let result = httpResult; 629 | if(!result) return 630 | console.log(result) 631 | if(result.status_code == 0) { 632 | 633 | } else { 634 | console.log(`用户${userIdx+1}进入农场失败:${result.message}`) 635 | } 636 | } 637 | 638 | //农场-离线奖励翻倍 639 | async function FarmOfflineDouble() { 640 | let caller = printCaller() 641 | let url = `${hostname}/ttgame/game_farm/double_reward?watch_ad=1&aid=35` 642 | let urlObject = populateGetUrl(url) 643 | await httpGet(urlObject,caller) 644 | let result = httpResult; 645 | if(!result) return 646 | //console.log(result) 647 | if(result.status_code == 0) { 648 | console.log(`用户${userIdx+1}农场离线产量翻倍成功`) 649 | } else { 650 | console.log(`用户${userIdx+1}农场离线产量翻倍失败:${result.message}`) 651 | } 652 | } 653 | 654 | //农场-领取三餐礼包 655 | async function RewardFarmThreeGift(gift_id) { 656 | let caller = printCaller() 657 | let url = `${hostname}/ttgame/game_farm/reward/gift?game_client_version_code=2&gift_id=${gift_id}&watch_ad=0&double=0&aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 658 | let urlObject = populateGetUrl(url) 659 | await httpGet(urlObject,caller) 660 | let result = httpResult; 661 | if(!result) return 662 | //console.log(result) 663 | if(result.status_code == 0) { 664 | console.log(`用户${userIdx+1}领取农场三餐礼包获得${result.data.reward_num}水滴`) 665 | } else { 666 | console.log(`用户${userIdx+1}领取农场三餐礼包失败:${result.message}`) 667 | } 668 | } 669 | 670 | //农场-三餐礼包状态 671 | async function QueryFarmThreeGift() { 672 | let caller = printCaller() 673 | let url = `${hostname}/ttgame/game_farm/gift/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 674 | let urlObject = populateGetUrl(url) 675 | await httpGet(urlObject,caller) 676 | let result = httpResult; 677 | if(!result) return 678 | //console.log(result) 679 | if(result.status_code == 0) { 680 | for(let item of result.data) { 681 | if(item.status==1) { 682 | await RewardFarmThreeGift(item.gift_id) 683 | } 684 | } 685 | } else { 686 | console.log(`用户${userIdx+1}查询农场三餐礼包状态失败:${result.message}`) 687 | } 688 | } 689 | 690 | //查询农场任务列表 691 | async function QueryFarmTask() { 692 | let caller = printCaller() 693 | let url = `${hostname}/ttgame/game_farm/daily_task/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 694 | let urlObject = populateGetUrl(url) 695 | await httpGet(urlObject,caller) 696 | let result = httpResult; 697 | if(!result) return 698 | //console.log(result) 699 | if(result.status_code == 0) { 700 | for(let item of result.data) { 701 | if(item.status==1) { 702 | await RewardFarmTask(item.task_id) 703 | } 704 | } 705 | } else { 706 | console.log(`用户${userIdx+1}查询农场任务列表失败:${result.message}`) 707 | } 708 | } 709 | 710 | //农场-领取任务奖励 711 | async function RewardFarmTask(id) { 712 | let caller = printCaller() 713 | let url = `${hostname}/ttgame/game_farm/reward/task?task_id=${id}&aid=35` 714 | let urlObject = populateGetUrl(url) 715 | await httpGet(urlObject,caller) 716 | let result = httpResult; 717 | if(!result) return 718 | //console.log(result) 719 | if(result.status_code == 0) { 720 | let typeStr = (result.data.reward_type==1) ? '水滴' : '化肥' 721 | console.log(`用户${userIdx+1}领取农场任务奖励[task_id=${result.data.task_id}]获得${result.data.reward_num}${typeStr},剩余${typeStr}数量${result.data.current_num}`) 722 | } else { 723 | console.log(`用户${userIdx+1}领取农场任务奖励失败:${result.message}`) 724 | } 725 | } 726 | 727 | //农场-浇水 728 | async function FarmWater() { 729 | let caller = printCaller() 730 | let url = `${hostname}/ttgame/game_farm/land_water?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 731 | let urlObject = populateGetUrl(url) 732 | await httpGet(urlObject,caller) 733 | let result = httpResult; 734 | if(!result) return 735 | //console.log(result) 736 | if(result.status_code == 0) { 737 | console.log(`用户${userIdx+1}农场浇水成功,剩余水滴:${result.data.water}`) 738 | if(result.data.water>=10) { 739 | await $.wait(1500) //min time 1000 740 | await FarmWater() 741 | } 742 | } else { 743 | console.log(`用户${userIdx+1}农场浇水失败:${result.message}`) 744 | } 745 | } 746 | 747 | //农场-开宝箱 748 | async function FarmOpenBox() { 749 | let caller = printCaller() 750 | let url = `${hostname}/ttgame/game_farm/box/open?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 751 | let urlObject = populateGetUrl(url) 752 | await httpGet(urlObject,caller) 753 | let result = httpResult; 754 | if(!result) return 755 | //console.log(result) 756 | if(result.status_code == 0) { 757 | console.log(`用户${userIdx+1}开农场宝箱获得${result.data.incr_coin}金币`) 758 | if(result.data.excitation_ad_score_amount>0) await FarmOpenBoxVideo() 759 | } else { 760 | console.log(`用户${userIdx+1}开农场宝箱失败:${result.message}`) 761 | } 762 | } 763 | 764 | //农场-宝箱视频 765 | async function FarmOpenBoxVideo() { 766 | let caller = printCaller() 767 | let url = `${hostname}/ttgame/game_farm/excitation_ad/add?excitation_ad_score_amount=134&device_id=2392172203611735&aid=35&os_version=15.0&update_version_code=85221` 768 | let urlObject = populateGetUrl(url) 769 | await httpGet(urlObject,caller) 770 | let result = httpResult; 771 | if(!result) return 772 | //console.log(result) 773 | if(result.status_code == 0) { 774 | console.log(`用户${userIdx+1}看农场宝箱视频获得${result.data.incr_coin}金币`) 775 | } else { 776 | console.log(`用户${userIdx+1}看农场宝箱视频失败:${result.message}`) 777 | } 778 | } 779 | 780 | //农场-签到状态 781 | async function QueryFarmSignStatus() { 782 | let caller = printCaller() 783 | let url = `${hostname}/ttgame/game_farm/sign_in/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 784 | let urlObject = populateGetUrl(url) 785 | await httpGet(urlObject,caller) 786 | let result = httpResult; 787 | if(!result) return 788 | //console.log(result) 789 | if(result.status_code == 0) { 790 | for(let item of result.data.sign) { 791 | if(item.status==1) { 792 | await FarmSign() 793 | break 794 | } 795 | } 796 | } else { 797 | console.log(`用户${userIdx+1}查询签到状态失败:${result.message}`) 798 | } 799 | } 800 | 801 | //农场-签到 802 | async function FarmSign() { 803 | let caller = printCaller() 804 | let url = `${hostname}/ttgame/game_farm/reward/sign_in?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 805 | let urlObject = populateGetUrl(url) 806 | await httpGet(urlObject,caller) 807 | let result = httpResult; 808 | if(!result) return 809 | //console.log(result) 810 | if(result.status_code == 0) { 811 | let str = (result.data.reward_type==1)?'水滴':'化肥' 812 | console.log(`用户${userIdx+1}签到获得${result.data.reward_num}${str},剩余${str}数量${result.data.cur_reward_num}`) 813 | } else { 814 | console.log(`用户${userIdx+1}签到失败:${result.message}`) 815 | } 816 | } 817 | 818 | //农场-签到视频翻倍 819 | async function FarmSignDouble() { 820 | let caller = printCaller() 821 | let url = `${hostname}/ttgame/game_farm/reward/double_sign_in?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 822 | let urlObject = populateGetUrl(url) 823 | await httpGet(urlObject,caller) 824 | let result = httpResult; 825 | if(!result) return 826 | //console.log(result) 827 | if(result.status_code == 0) { 828 | let str = (result.data.reward_type==1)?'水滴':'化肥' 829 | console.log(`用户${userIdx+1}签到翻倍获得${result.data.reward_num}{str},剩余${str}数量${result.data.cur_reward_num}`) 830 | } else { 831 | console.log(`用户${userIdx+1}签到翻倍失败:${result.message}`) 832 | } 833 | } 834 | 835 | //农场-土地状态 836 | async function QueryFarmLandStatus() { 837 | let caller = printCaller() 838 | let url = `${hostname}/ttgame/game_farm/home_info?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 839 | let urlObject = populateGetUrl(url) 840 | await httpGet(urlObject,caller) 841 | let result = httpResult; 842 | if(!result) return 843 | //console.log(result) 844 | if(result.status_code == 0) { 845 | for(let item of result.data.info.lands) { 846 | if(item.status==false && item.unlock_able==true) { 847 | await FarmUnlock(item.land_id) 848 | break 849 | } 850 | } 851 | } else { 852 | console.log(`用户${userIdx+1}查询土地状态失败:${result.message}`) 853 | } 854 | } 855 | 856 | //农场-土地解锁 857 | async function FarmUnlock(land_id) { 858 | let caller = printCaller() 859 | let url = `${hostname}/ttgame/game_farm/land/unlock?land_id=${land_id}&aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 860 | let urlObject = populateGetUrl(url) 861 | await httpGet(urlObject,caller) 862 | let result = httpResult; 863 | if(!result) return 864 | //console.log(result) 865 | if(result.status_code == 0) { 866 | console.log(`用户${userIdx+1}解锁${land_id}号土地成功`) 867 | } else { 868 | console.log(`用户${userIdx+1}解锁${land_id}号土地失败:${result.message}`) 869 | } 870 | } 871 | 872 | //种树-签到状态 873 | async function QueryTreeSignStatus() { 874 | let caller = printCaller() 875 | let url = `${hostname}/ttgame/game_orchard/sign_in/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 876 | let urlObject = populateGetUrl(url) 877 | await httpGet(urlObject,caller) 878 | let result = httpResult; 879 | if(!result) return 880 | //console.log(result) 881 | if(result.status_code == 0) { 882 | if(result.data.today == false) { 883 | await TreeSign() 884 | } 885 | } else { 886 | console.log(`用户${userIdx+1}查询种树签到状态失败:${result.message}`) 887 | } 888 | } 889 | 890 | //种树-签到 891 | async function TreeSign() { 892 | let caller = printCaller() 893 | let url = `${hostname}/ttgame/game_orchard/sign_in/reward?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 894 | let urlObject = populateGetUrl(url) 895 | await httpGet(urlObject,caller) 896 | let result = httpResult; 897 | if(!result) return 898 | //console.log(result) 899 | if(result.status_code == 0) { 900 | console.log(`用户${userIdx+1}种树签到获得${result.data.reward_item.num}${result.data.reward_item.name}`) 901 | } else { 902 | console.log(`用户${userIdx+1}种树签到失败:${result.message}`) 903 | } 904 | } 905 | 906 | //种树-二选一-选项 907 | async function QueryTreeChallenge() { 908 | let caller = printCaller() 909 | let url = `${hostname}/ttgame/game_orchard/challenge/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 910 | let urlObject = populateGetUrl(url) 911 | await httpGet(urlObject,caller) 912 | let result = httpResult; 913 | if(!result) return 914 | //console.log(result) 915 | if(result.status_code == 0) { 916 | let bestChoice = 0 917 | let maxWater = 0 918 | for(let item of result.data.tasks) { 919 | if(item.state==0 && item.water_times>maxWater) { 920 | maxWater = item.water_times 921 | bestChoice = item.id 922 | } 923 | } 924 | if(bestChoice>0) await TreeChallengeChoose(bestChoice) 925 | } else { 926 | console.log(`用户${userIdx+1}查询挑战任务失败:${result.message}`) 927 | } 928 | } 929 | 930 | //种树-二选一-选择 931 | async function TreeChallengeChoose(id) { 932 | let caller = printCaller() 933 | let url = `${hostname}/ttgame/game_orchard/challenge/choose?task_id=${id}&aid=35` 934 | let urlObject = populateGetUrl(url) 935 | await httpGet(urlObject,caller) 936 | let result = httpResult; 937 | if(!result) return 938 | //console.log(result) 939 | if(result.status_code == 0) { 940 | console.log(`用户${userIdx+1}选择浇水${result.data.red_point.times}次挑战`) 941 | } else { 942 | console.log(`用户${userIdx+1}选择浇水挑战失败:${result.message}`) 943 | } 944 | } 945 | 946 | //种树-二选一-领奖 947 | async function TreeChallengeReward() { 948 | let caller = printCaller() 949 | let url = `${hostname}/ttgame/game_orchard/challenge/reward?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 950 | let urlObject = populateGetUrl(url) 951 | await httpGet(urlObject,caller) 952 | let result = httpResult; 953 | if(!result) return 954 | //console.log(result) 955 | if(result.status_code == 0) { 956 | console.log(`用户${userIdx+1}领取浇水挑战奖励获得${result.data.reward_item.num}水滴`) 957 | } else { 958 | console.log(`用户${userIdx+1}领取浇水挑战奖励失败:${result.message}`) 959 | } 960 | } 961 | 962 | //种树-化肥签到 963 | async function TreeNutrientSign() { 964 | let caller = printCaller() 965 | let url = `${hostname}/ttgame/game_orchard/nutrient/sign_in?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 966 | let urlObject = populateGetUrl(url) 967 | await httpGet(urlObject,caller) 968 | let result = httpResult; 969 | if(!result) return 970 | //console.log(result) 971 | if(result.status_code == 0) { 972 | if(result.data.is_rewarded==true) { 973 | console.log(`用户${userIdx+1}种树化肥签到获得${result.data.reward_item.num}{result.data.reward_item.name}`) 974 | } else { 975 | console.log(`用户${userIdx+1}种树化肥签到成功`) 976 | } 977 | } else { 978 | console.log(`用户${userIdx+1}种树化肥签到失败:${result.message}`) 979 | } 980 | } 981 | 982 | //种树-领取三餐礼包 983 | async function RewardTreeThreeGift(task_id) { 984 | let caller = printCaller() 985 | let url = `${hostname}/ttgame/game_orchard/three_gift/reward?task_id=${task_id}&watch_ad=0&extra_ad_num=0&aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 986 | let urlObject = populateGetUrl(url) 987 | await httpGet(urlObject,caller) 988 | let result = httpResult; 989 | if(!result) return 990 | //console.log(result) 991 | if(result.status_code == 0) { 992 | console.log(`用户${userIdx+1}领取种树三餐礼包获得${result.data.reward_item.num}${result.data.reward_item.name}`) 993 | } else { 994 | console.log(`用户${userIdx+1}领取种树三餐礼包失败:${result.message}`) 995 | } 996 | } 997 | 998 | //种树-三餐礼包状态 999 | async function QueryTreeThreeGift() { 1000 | let caller = printCaller() 1001 | let curTime = new Date() 1002 | let curHour = curTime.getHours() 1003 | let url = `${hostname}/ttgame/game_orchard/three_gift/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 1004 | let urlObject = populateGetUrl(url) 1005 | await httpGet(urlObject,caller) 1006 | let result = httpResult; 1007 | if(!result) return 1008 | //console.log(result) 1009 | if(result.status_code == 0) { 1010 | for(let item of result.data.gift_list) { 1011 | if(item.rounds==1 && curHour >= item.available_time.begin && curHour < item.available_time.end) { 1012 | await RewardTreeThreeGift(item.id) 1013 | } 1014 | } 1015 | } else { 1016 | console.log(`用户${userIdx+1}查询种树三餐礼包状态失败:${result.message}`) 1017 | } 1018 | } 1019 | 1020 | //种树-水滴任务列表 1021 | async function QueryTreeWaterTask() { 1022 | let caller = printCaller() 1023 | let url = `${hostname}/ttgame/game_orchard/tasks/list?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 1024 | let urlObject = populateGetUrl(url) 1025 | await httpGet(urlObject,caller) 1026 | let result = httpResult; 1027 | if(!result) return 1028 | //console.log(result) 1029 | if(result.status_code == 0) { 1030 | for(let item of result.data.tasks_v2) { 1031 | if(item.reward_item.state==4) { 1032 | await TreeWaterReward(item.id) 1033 | await $.wait(1500) 1034 | } 1035 | } 1036 | } else { 1037 | console.log(`用户${userIdx+1}查询种树水滴任务列表失败:${result.message}`) 1038 | } 1039 | } 1040 | 1041 | //种树-水滴领奖 1042 | async function TreeWaterReward(task_id) { 1043 | let caller = printCaller() 1044 | let url = `${hostname}/ttgame/game_orchard/tasks/reward?task_id=${task_id}&do_action=0&aid=35` 1045 | let urlObject = populateGetUrl(url) 1046 | await httpGet(urlObject,caller) 1047 | let result = httpResult; 1048 | if(!result) return 1049 | //console.log(result) 1050 | if(result.status_code == 0) { 1051 | console.log(`用户${userIdx+1}领取水滴任务[id=${task_id}]获得${result.data.reward_item.num}${result.data.reward_item.name}`) 1052 | } else { 1053 | console.log(`用户${userIdx+1}领取水滴任务[id=${task_id}]失败:${result.message}`) 1054 | } 1055 | } 1056 | 1057 | //种树-浇水 1058 | async function TreeWater() { 1059 | let caller = printCaller() 1060 | let url = `${hostname}/ttgame/game_orchard/tree/water?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 1061 | let urlObject = populateGetUrl(url) 1062 | await httpGet(urlObject,caller) 1063 | let result = httpResult; 1064 | if(!result) return 1065 | //console.log(result) 1066 | if(result.status_code == 0) { 1067 | console.log(`用户${userIdx+1}种树浇水成功,剩余水滴:${result.data.kettle.water_num}`) 1068 | if(result.data.kettle.water_num>=100) { 1069 | await $.wait(1500) //min time 1000 1070 | await TreeWaterTenTimes() 1071 | } else if(result.data.kettle.water_num>=10) { 1072 | await $.wait(1500) //min time 1000 1073 | await TreeWater() 1074 | } 1075 | } else { 1076 | console.log(`用户${userIdx+1}种树浇水失败:${result.message}`) 1077 | } 1078 | } 1079 | 1080 | //种树-浇水10次 1081 | async function TreeWaterTenTimes() { 1082 | let caller = printCaller() 1083 | let url = `${hostname}/ttgame/game_orchard/tree/tenfold_water?times=10&aid=35` 1084 | let urlObject = populateGetUrl(url) 1085 | await httpGet(urlObject,caller) 1086 | let result = httpResult; 1087 | if(!result) return 1088 | //console.log(result) 1089 | if(result.status_code == 0) { 1090 | console.log(`用户${userIdx+1}种树浇水10次成功,剩余水滴:${result.data.kettle.water_num}`) 1091 | if(result.data.kettle.water_num>=100) { 1092 | await $.wait(1500) //min time 1000 1093 | await TreeWaterTenTimes() 1094 | } else if(result.data.kettle.water_num>=10) { 1095 | await $.wait(1500) //min time 1000 1096 | await TreeWater() 1097 | } 1098 | } else { 1099 | console.log(`用户${userIdx+1}种树浇水失败:${result.message}`) 1100 | } 1101 | } 1102 | 1103 | //种树-信息 1104 | async function QueryTreeStatus() { 1105 | let caller = printCaller() 1106 | let url = `${hostname}/ttgame/game_orchard/polling_info?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 1107 | let urlObject = populateGetUrl(url) 1108 | await httpGet(urlObject,caller) 1109 | let result = httpResult; 1110 | if(!result) return 1111 | //console.log(result) 1112 | if(result.status_code == 0) { 1113 | if(result.data.red_points.challenge && result.data.red_points.challenge.state==4) { 1114 | await TreeChallengeReward() 1115 | } 1116 | if(result.data.bottle.state==1) { 1117 | await RewardTreeWaterBottle() 1118 | } 1119 | if(result.data.red_points.box && result.data.red_points.box.rounds>0 && result.data.red_points.box.state==4) { 1120 | await TreeOpenBox() 1121 | } 1122 | if(result.data.kettle.water_num >= 100) { 1123 | await TreeWaterTenTimes() 1124 | } else if(result.data.kettle.water_num>=10) { 1125 | await TreeWater() 1126 | } 1127 | } else { 1128 | console.log(`用户${userIdx+1}查询种树信息失败:${result.message}`) 1129 | } 1130 | } 1131 | 1132 | //种树-水瓶奖励 1133 | async function RewardTreeWaterBottle() { 1134 | let caller = printCaller() 1135 | let url = `${hostname}/ttgame/game_orchard/water_bottle/reward?aid=35&update_version_code=85221&device_platform=iphone&&device_type=iPhone13,2` 1136 | let urlObject = populateGetUrl(url) 1137 | await httpGet(urlObject,caller) 1138 | let result = httpResult; 1139 | if(!result) return 1140 | //console.log(result) 1141 | if(result.status_code == 0) { 1142 | console.log(`用户${userIdx+1}领取种树水瓶奖励获得${result.data.reward_item.num}水滴`) 1143 | } else { 1144 | console.log(`用户${userIdx+1}领取种树水瓶奖励失败:${result.message}`) 1145 | } 1146 | } 1147 | 1148 | //种树-开宝箱 1149 | async function TreeOpenBox() { 1150 | let caller = printCaller() 1151 | let url = `${hostname}/ttgame/game_orchard/box2/open?watch_ad=0&aid=35` 1152 | let urlObject = populateGetUrl(url) 1153 | await httpGet(urlObject,caller) 1154 | let result = httpResult; 1155 | if(!result) return 1156 | //console.log(result) 1157 | if(result.status_code == 0) { 1158 | console.log(`用户${userIdx+1}种树开宝箱获得${result.data.incr_coin}金币`) 1159 | } else { 1160 | console.log(`用户${userIdx+1}种树开宝箱失败:${result.message}`) 1161 | } 1162 | } 1163 | //////////////////////////////////////////////////////////////////// 1164 | function populatePostUrl(url,reqBody=''){ 1165 | let timeInMS = Math.round(new Date().getTime()) 1166 | let timeInSecond = Math.floor(timeInMS/1000) 1167 | let urlObject = { 1168 | url: url, 1169 | headers: { 1170 | 'Accept-Encoding' : 'gzip', 1171 | 'X-SS-REQ-TICKET' : timeInMS, 1172 | 'passport-sdk-version' : '30', 1173 | 'sdk-version' : '2', 1174 | 'x-vc-bdturing-sdk-version' : '2.0.0', 1175 | 'User-Agent' : userAgentArr[userIdx%UAcount], 1176 | 'Cookie' : userHeaderArr[userIdx], 1177 | 'X-Khronos' : timeInSecond, 1178 | 'Content-Type' : 'application/json; charset=utf-8', 1179 | 'Host' : host, 1180 | 'Connection' : 'Keep-Alive', 1181 | }, 1182 | body: reqBody 1183 | } 1184 | return urlObject; 1185 | } 1186 | 1187 | function populateGetUrl(url){ 1188 | let timeInMS = Math.round(new Date().getTime()) 1189 | let timeInSecond = Math.floor(timeInMS/1000) 1190 | let urlObject = { 1191 | url: url, 1192 | headers: { 1193 | 'Accept-Encoding' : 'gzip', 1194 | 'X-SS-REQ-TICKET' : timeInMS, 1195 | 'passport-sdk-version' : '30', 1196 | 'sdk-version' : '2', 1197 | 'x-vc-bdturing-sdk-version' : '2.0.0', 1198 | 'User-Agent' : userAgentArr[userIdx%UAcount], 1199 | 'Cookie' : userHeaderArr[userIdx], 1200 | 'X-Khronos' : timeInSecond, 1201 | 'Content-Type' : 'application/json; charset=utf-8', 1202 | 'Host' : host, 1203 | 'Connection' : 'Keep-Alive', 1204 | } 1205 | } 1206 | return urlObject; 1207 | } 1208 | 1209 | async function httpPost(url,caller) { 1210 | httpResult = null 1211 | return new Promise((resolve) => { 1212 | $.post(url, async (err, resp, data) => { 1213 | try { 1214 | if (err) { 1215 | console.log(caller + ": post请求失败"); 1216 | console.log(JSON.stringify(err)); 1217 | $.logErr(err); 1218 | } else { 1219 | if (safeGet(data)) { 1220 | httpResult = JSON.parse(data); 1221 | if(logDebug) console.log(httpResult); 1222 | } 1223 | } 1224 | } catch (e) { 1225 | $.logErr(e, resp); 1226 | } finally { 1227 | resolve(); 1228 | } 1229 | }); 1230 | }); 1231 | } 1232 | 1233 | async function httpGet(url,caller) { 1234 | httpResult = null 1235 | return new Promise((resolve) => { 1236 | $.get(url, async (err, resp, data) => { 1237 | try { 1238 | if (err) { 1239 | console.log(caller + ": get请求失败"); 1240 | console.log(JSON.stringify(err)); 1241 | $.logErr(err); 1242 | } else { 1243 | if (safeGet(data,caller)) { 1244 | httpResult = JSON.parse(data); 1245 | if(logDebug) console.log(httpResult); 1246 | } 1247 | } 1248 | } catch (e) { 1249 | $.logErr(e, resp); 1250 | } finally { 1251 | resolve(); 1252 | } 1253 | }); 1254 | }); 1255 | } 1256 | 1257 | function safeGet(data,caller) { 1258 | try { 1259 | if (typeof JSON.parse(data) == "object") { 1260 | return true; 1261 | } else { 1262 | console.log(`Function ${caller}: 未知错误`); 1263 | console.log(data) 1264 | } 1265 | } catch (e) { 1266 | console.log(e); 1267 | console.log(`Function ${caller}: 服务器访问数据为空,请检查自身设备网络情况`); 1268 | return false; 1269 | } 1270 | } 1271 | 1272 | function printCaller(){ 1273 | return (new Error()).stack.split("\n")[2].trim().split(" ")[1] 1274 | } 1275 | 1276 | function getMin(a,b){ 1277 | return ((a { 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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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(); 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) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).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 } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } 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("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } 1285 | -------------------------------------------------------------------------------- /kgyy.js: -------------------------------------------------------------------------------- 1 | /* 2 | @肥皂 3.10 酷狗音乐 3 | 4 | 青龙抓取签到接口的全部请求体: 5 | 格式 变量名kgyy 6 | 接口链接 gateway.kugou.com 开头,里面需要带有token,uuid,mid,userid,dfid等关键词信息 7 | 把整段url放到变量就可以 8 | cron 30 14 * * * kgyy.js 9 | */ 10 | var _0xodh='jsjiami.com.v6',_0xodh_=['‮_0xodh'],_0x53a1=[_0xodh,'wql2ZMKbwqo=','wr/CksKeAyg=','WsOHwph4AA==','w6xqwqs1Vg==','w7dwwpw2Ww==','wrNPw5QDYg==','woLCoA8gXcOPwpQv','LzTDiMO5wrjCoQ==','w4ULw47CkMOw','dMKCM8Oawop+','dcOJw77DrcOJ','w7Axw5nCkMOa','ZMO6w77Dil8=','acOHwrJaw4U=','BBDDvcKaw7DDt8Op','w6I5EMOowrI=','SMOtwq9CMMKDLMKNLHg=','w40zw6geTg==','FMKDwqrChsOZw4EvLMK0w4DDrl8=','wp/ClXJUw6o=','EsKIwrfCujc9wrFWeHnCr0Q=','wrlow5UMbwfDn8KnwqtSw4Ri','fFXDuRck','WsO2woNPw7DDgMOFw53Dn8Kw','MDPDisOZAw==','eCgnbcOMasKzH8Obw5XCkMKk','woJYA8OmfQ==','wrzCsMO+JVo=','GMK+EsKnOcKPw6jDolTDmnxb','BlzChMKxMQ==','A2vCt8Okwp4=','wqzDiwDCm8OpwocKw6PDtsORwq4f','w4QhGMOswoU=','woHDg1xmFw==','KMKfwqrCicOt','BiQNYiQ=','Jl7DmcKZbg==','bMO7w4LDg8OJ','CsK/wrfCmcOW','wrXCgMOJZzQ=','IynDksOIPA==','DxMHw4cE','w4Nmw5IdwqQ=','wrJXSMKmwoA=','RGfDghY2','BMO+X8K9w6s=','w6Ekw5fDkMOm','UsKaP8K8wrg=','G0HCpsKWAA==','TsKELcOzwpo=','SDk4TsOr','wpvCr3Jzw4A=','wrvCnkp1w6E=','JMKSwrXCpcO+','NDZ8woBh','w4plwpcRZA==','ETDDpcOICw==','AMKWwpLChxE=','JxlXwoN/','d8KiE8K0wqs=','ScOAwoVGAQ==','wonDlwfCtMKz','LSB9wrdU','Z8OZw7bDgko=','KEbDmsKUfw==','RsOKwoV1Eg==','w6s8w4TCsMOW','GMKJasONw4k=','WggldcKh','w4wOw4IvTA==','VygmacKp','U8KCCMK4woQ=','w7dTwo0qfg==','w4AfwqkdaQ==','XsOtwrVlw5A=','TMKiKsKrwr8=','w4huw4MGwqc=','Nl/DmMKFRg==','wpjCjmpCw60=','CD11wpl0','VRpgwp/Ckw==','ED3DmsOUJA==','OcK6UMOxw6w=','wrfClTU3fA==','w5bCusKEUsO1','w6/DjcKOw5c8','IcKXS8O7w74=','MsK/wozDh8OG','ATVfwpFm','JCbDnMKkw5c=','wo3DsHlgJQ==','wpXDpCDCisKc','JRTDtcK4w4k=','wrZ2RMKrwrs=','GDfDu8KOw7M=','UsOLwr5UAg==','wrFHEcOqZg==','DMOPQ17Djw==','eHjDijM0','EmnCkirDrw==','I2rCowLDmw==','aiwGbsK+','elREwqkO','wpDCvsOrO0M=','wplKA8OFRw==','wp5Tw64PdA==','IsOne3bDkw==','wrjCnMKVJioJSMOrFcOmw40=','6Ye654qh6Z2t5Lus','OEPCpsK0BzbCscKtChx6','OS/DnA==','a8OJw5XDmA==','PRAbw4Qfwpxa','D1jCgcOk','YADDscOr','a0RfwpE=','wpZdw45w','aMOrw57Cng==','LcKNwpzCnxs=','IsOqbsKOw5Y=','PEfClw==','cj8mZ8O7ag==','5Lux6LeC5Y2GcT84J1B6RcOPQcKvwrJNG14=','ciIYR8KTeQ==','w5dSwrkGSA==','XOW9k+WmgOOAiumEt+eJhemfteS4hA==','w6AXw6rDn8OC','w5NdwqkAWA==','PlfCtcK4Gg==','w5krw74ZQA==','GhDDo8KRw6XDvA==','VcOxwoU=','w4bphoTniI7pnrrkuI3miIvoobbkuZPli5XDnMOsw5s=','wq9VW8Kn','w5TCq8ObSMOW','Y8OPw5jDgsOv','GMKVwr/CkgYn','BsKkTMO5w4HClw8=','wq/Ci8OaOXzojqLlj5zmia3li4jvvak=','XsO3wqI=','wpNzL8OoT8K3dg==','Owcbw4kdwoReAcKWw40JWg==','woXCuy49QcOBwpMuwpE=','wrpbVsKq','B8KfwqzCsxUhwrE=','dMKIOg==','w5k5w60=','GsKbwrXCsg==','w44jwpQXaw==','w7ItEcONwow=','XsOJwrBEw7I=','R03DuzEL6Iyf5Y615oqb5YqI772f','I8KYwqDDnMOr','ScKRNMOkwpw=','AnvCtcOKwoM=','w7tmw6sMwpQ=','NcKaOMKjGQ==','aMOmw4XDi2o=','wqrCu2NRw70=','wp7Ch8O5Uhw=','UlXDkSQA','wpTCscOYYjMSw4o=','wpB4GcOpQw==','e8KLNMOYwpBiw54XwpLCpcOfNsOyTF3CgkLDh8OQLg==','fsO5w5bDokVY','TMOtwodPw5rDi8Kc','ZmpXwpXCocODfTIBAA==','woUnw50bwphbwpMOIMKLKgckwq8lXGPCj8KNXMKMP8O7HsKew73CmjfCjjXDvsOAUDHDnDnDtMKaLELCmEEvwp9TD0Irw6vDpsOPwofCuMOoQMKiwppXDsKHSMKyAMKrwpTDq3vDlzrCgUgfOsORMcOewqtIHkXCgMO/wpxNwpUePxtXw455wqfDt01HRMOwwp50w71pw5DDvcOf','O0LCtcKrAX/DqsOjGQh9XcOQwqTCvFpkwoLDvBwaQsOwZgXCu8OFecO+Dz/DmWTChsKsKmoIw4E8wq9FH8OTKsKjw7gxwrtKw44kwpjDgcOEwrcrGTDDh8KoUcOX','YcOmcF7DsDfDojjCnyRT','woENwo41Y8KkwonCuMKiGsKnWsKxJMOQwoo=','Y2rDvcK4e8OVR19twpTCnsK3w50Iw4FxwoXCiUoyw4/Dr0ErWx84w7k0wqcEOcKpw4PCsx4Ew4gZwpM=','w5DCuik9S8Kb','VcOOfsKaw4paARk=','fAEAw4sbwoYG','wq97w4gSSQ==','D8OYwpDCuAchw7IeGXHCqlUVD1czw7hdeVYFwpHCkEzDh8Kzw4M8YxbDmsKjXsOldTVTL8Kvwqg8w4xqwofDtzfCjQhDw5fDl3gZZFLDhcKSwrdlCFvCpcOewoInZcOPKhZUw7s+IsO4wqDDn2PDqkrCmMKWD8OpSmo6S8O5KTDCpDPDlsONb8OPH8OawqzCgzXCj8O2wqdSBsKTwp3DtkxWYzQJwrXCjCJiw51+w6Rywr7CusOqw4DDh3wTJcOHWQ5tTcO0wqjDtTkFUsKfw4bDvyBOwp3DlcODw5Vrwp/Ct8K2T8OUZkQpw7p3K3owMsOtesKTwosAVsKtQyBmwr4owqvCp8OV','wprDpMKgSsODGFPChMOnwo9gT8KJV8K+TMKMdTfCvsORwp/DvmNTw4rCmsKVw77DpQVacmUNfcOcw6PDuMO9wqzCp8KJNVbCtlJMwowfw5HDsMOIwocjbcK8wp5bMFE/SX5WNl7Ct29e','IVcbw4ENwoNSSsOYwp4=','wqvCi8OCKA==','IHrCk8KDCA==','w4ssw5HDvcOw','w4Qrw7gJTQ==','JR1EwpFaJMK+','EumGkOeKiumdjuS6ruOAhuS5k+WLk8Kpw5w=','44Co6Iyp5b21Bw==','w5Arw74b','54qX54q45bi3','TsO/wotJ','bMOBw4s=','U+mGreeIuemdmuS7l+OAiuS7jeWIucOBwp8=','EwfDv8KZw6M=','AwjDjMOtAw==','wrzCs8OjJVM=','wp/CvXhLeA==','w4hkwocpRQ==','TcKCEsKHwoM=','wrLCnMOhFkE=','w6QOw47DtsO5','w4c+w7gTRsOMwp1IEQ==','MVnCpcKi','wr/ClsKtLTwYWw==','dSAPWQ==','w4nCkcKN','woPCnFde','HzQfXyo=','NsKZwr/DucOw','wo9xw7cSRQ==','w5sww4jDqsOd','GcK7wq3CsBE=','CMOyY3PDvA==','wr3DmwbCgMOQ','wr12AsObXg==','R8Oiw77DvkU=','wprCtkJfw7Y=','ZsOwwq1fJw==','wovDviXClMOY','JHLCtcKaHA==','w7EXw4DCv8O2','wozDn2diLw==','JwbDhMOxDQ==','w6w/JcO0wpA=','wqPCucKPIjw=','XMOywqNYw54=','fcOyw4fDsXM=','JFLCu8KtKg==','wo59w4MlYw==','w6h3w64fwoc=','HijDrcO4Jw==','BRbDpMKkw6E=','w70pwqYqQg==','wpfDrQ7Co8Ka','woXCtHttw60=','PQbDpsKew4Y=','NMOIRMKrw6A=','N8K0F8K+Fg==','Hyshbiw=','wqnDo1V6DA==','w4bDusK0w5Y1','wovDqDXCmsOP','XwsSbMOq','wp5Lw6ANSQ==','N8OMemHDqg==','IsO4QsKJw4I=','wpp4Q8Kbwq4=','w448w6TDhsOS','KUPClw3DtA==','SknDtx0u','wrfCrh8ASQ==','wqHCr3Ryw4c=','HcK7wpPCgMO7','wprChToWaQ==','wp1NZsK5woA=','LMKfbMORw68=','wpfCp01Udg==','JnTCvMOLwr4=','ZsOSw5nDgU0=','wqbDtS3ChsOE','OcKIe8Osw4g=','DD14wrt3','fcOZw5/DoUo=','MQ/DoMOWLw==','G8KeMMKCPQ==','wovCimxaw4o=','P8KtwrjDiMOI','G8Kwwo7CvBU=','w4HCl8K6ZcOt','wp7CqMO5KGs=','LQjDk8OPwr0=','EgRmwoF6','asKPEcKjwoE=','MxzDmcOQDg==','GsKbU8O1w4Y=','A8Kdwo/Cu8O8','AsK4wo7Cshk=','ADfDm8KTw7w=','wqTCrh0bTg==','OwfDg8Odwqo=','B8KAwojCmMOz','woPClQsGWg==','NHDCqMKMFA==','wpJFDMO0dQ==','w6E1w6bCosOR','w742w4fCnsO9','wo15BMOHdg==','TsKQOsOEwpM=','YsKoEMKawoA=','CzIjsjGYbgbSGkiamziLqJV.com.v6=='];if(function(_0x5200f2,_0xd72c26,_0x3ae451){function _0x334839(_0x1ba3c1,_0x30514b,_0x27c853,_0x4bc404,_0x253150,_0x5c1bb9){_0x30514b=_0x30514b>>0x8,_0x253150='po';var _0x201439='shift',_0x28234c='push',_0x5c1bb9='‮';if(_0x30514b<_0x1ba3c1){while(--_0x1ba3c1){_0x4bc404=_0x5200f2[_0x201439]();if(_0x30514b===_0x1ba3c1&&_0x5c1bb9==='‮'&&_0x5c1bb9['length']===0x1){_0x30514b=_0x4bc404,_0x27c853=_0x5200f2[_0x253150+'p']();}else if(_0x30514b&&_0x27c853['replace'](/[CzIGYbgbSGkzLqJV=]/g,'')===_0x30514b){_0x5200f2[_0x28234c](_0x4bc404);}}_0x5200f2[_0x28234c](_0x5200f2[_0x201439]());}return 0xd6b99;};return _0x334839(++_0xd72c26,_0x3ae451)>>_0xd72c26^_0x3ae451;}(_0x53a1,0x6c,0x6c00),_0x53a1){_0xodh_=_0x53a1['length']^0x6c;};function _0x2b3b(_0x58faba,_0x4492cd){_0x58faba=~~'0x'['concat'](_0x58faba['slice'](0x1));var _0x3604e0=_0x53a1[_0x58faba];if(_0x2b3b['ZDUyVG']===undefined){(function(){var _0x200e74=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0xad9576='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x200e74['atob']||(_0x200e74['atob']=function(_0x25a243){var _0x15610e=String(_0x25a243)['replace'](/=+$/,'');for(var _0x15aa11=0x0,_0x4a3280,_0x26484d,_0x59179f=0x0,_0x1e32f7='';_0x26484d=_0x15610e['charAt'](_0x59179f++);~_0x26484d&&(_0x4a3280=_0x15aa11%0x4?_0x4a3280*0x40+_0x26484d:_0x26484d,_0x15aa11++%0x4)?_0x1e32f7+=String['fromCharCode'](0xff&_0x4a3280>>(-0x2*_0x15aa11&0x6)):0x0){_0x26484d=_0xad9576['indexOf'](_0x26484d);}return _0x1e32f7;});}());function _0xe00fff(_0x481da0,_0x4492cd){var _0x534df2=[],_0x39cf89=0x0,_0x18ae85,_0x16f4bb='',_0x5815eb='';_0x481da0=atob(_0x481da0);for(var _0x519bfc=0x0,_0x211813=_0x481da0['length'];_0x519bfc<_0x211813;_0x519bfc++){_0x5815eb+='%'+('00'+_0x481da0['charCodeAt'](_0x519bfc)['toString'](0x10))['slice'](-0x2);}_0x481da0=decodeURIComponent(_0x5815eb);for(var _0x3b45c6=0x0;_0x3b45c6<0x100;_0x3b45c6++){_0x534df2[_0x3b45c6]=_0x3b45c6;}for(_0x3b45c6=0x0;_0x3b45c6<0x100;_0x3b45c6++){_0x39cf89=(_0x39cf89+_0x534df2[_0x3b45c6]+_0x4492cd['charCodeAt'](_0x3b45c6%_0x4492cd['length']))%0x100;_0x18ae85=_0x534df2[_0x3b45c6];_0x534df2[_0x3b45c6]=_0x534df2[_0x39cf89];_0x534df2[_0x39cf89]=_0x18ae85;}_0x3b45c6=0x0;_0x39cf89=0x0;for(var _0x8193fa=0x0;_0x8193fa<_0x481da0['length'];_0x8193fa++){_0x3b45c6=(_0x3b45c6+0x1)%0x100;_0x39cf89=(_0x39cf89+_0x534df2[_0x3b45c6])%0x100;_0x18ae85=_0x534df2[_0x3b45c6];_0x534df2[_0x3b45c6]=_0x534df2[_0x39cf89];_0x534df2[_0x39cf89]=_0x18ae85;_0x16f4bb+=String['fromCharCode'](_0x481da0['charCodeAt'](_0x8193fa)^_0x534df2[(_0x534df2[_0x3b45c6]+_0x534df2[_0x39cf89])%0x100]);}return _0x16f4bb;}_0x2b3b['tkSqnh']=_0xe00fff;_0x2b3b['TeLeLo']={};_0x2b3b['ZDUyVG']=!![];}var _0x18d332=_0x2b3b['TeLeLo'][_0x58faba];if(_0x18d332===undefined){if(_0x2b3b['udDlJU']===undefined){_0x2b3b['udDlJU']=!![];}_0x3604e0=_0x2b3b['tkSqnh'](_0x3604e0,_0x4492cd);_0x2b3b['TeLeLo'][_0x58faba]=_0x3604e0;}else{_0x3604e0=_0x18d332;}return _0x3604e0;};const $=new Env(_0x2b3b('‮0','FjVF'));let status;status=(status=$['getval'](_0x2b3b('‮1','BvxD'))||'1')>0x1?''+status:'';let kgyyArr=[],kugoucount='';let kgyy=($['isNode']()?process[_0x2b3b('‫2','k#sU')][_0x2b3b('‫3','&Z$f')]:$[_0x2b3b('‫4','$7Ag')](_0x2b3b('‫5','e>')))||'';let uuid='',clientver='',dfid='',token='',userid='',taskid='',mid='',kugousign='',kgfb=_0x2b3b('‫6','BvxD');let rwid=['1','6','9','11','21','22','23','29','31','34','35','36','37','38','39','43','45','46',_0x2b3b('‫7','$7Ag'),_0x2b3b('‫8','m8E5'),_0x2b3b('‫9','IICs')];!(async()=>{var _0x1b3568={'YwDHo':function(_0x979fcf,_0x599eae){return _0x979fcf!==_0x599eae;},'QQcqn':'undefined','lcYir':function(_0x53326f){return _0x53326f();}};if(_0x1b3568[_0x2b3b('‮a','&KL@')](typeof $request,_0x1b3568[_0x2b3b('‫b','X[j]')])){await kugouck();}else{kgyyArr=kgyy['split']('@');console[_0x2b3b('‫c','ivs[')]('-------------\x20共'+kgyyArr[_0x2b3b('‫d','YgKj')]+_0x2b3b('‫e','yo]$'));for(let _0x138a39=0x0;_0x138a39$[_0x2b3b('‮1c','&KL@')](_0x58b30d))[_0x2b3b('‮1d','vNGc')](()=>$['done']());function kugouck(){var _0x5ab359={'iOjRa':function(_0x144379,_0x596a11){return _0x144379+_0x596a11;},'VWenE':_0x2b3b('‫1e','yo]$')};if($request[_0x2b3b('‫1f','Rr[y')][_0x2b3b('‮20','w[9L')](_0x2b3b('‫21','$7Ag'))>-0x1){const _0x144ba3=JSON[_0x2b3b('‫22','E8#P')]($request[_0x2b3b('‫23','1W2z')]);if(_0x144ba3)$[_0x2b3b('‮24','&KL@')](_0x144ba3,'kgyy'+status);$[_0x2b3b('‮25','U%kt')](_0x144ba3);$[_0x2b3b('‫26','I)D2')]($[_0x2b3b('‫27','&KL@')],'',_0x5ab359[_0x2b3b('‫28','m8E5')](''+(''+status),_0x5ab359['VWenE']));}}function kugourw(_0x5cc88d=0x0){var _0x2d1b7c={'zBNul':function(_0x58a947,_0x291b4a){return _0x58a947<<_0x291b4a;},'QviYb':function(_0x543007,_0x5ace87){return _0x543007>>>_0x5ace87;},'jFkNb':function(_0x30ec8c,_0x209c5){return _0x30ec8c-_0x209c5;},'fDMWU':function(_0x4f7734,_0x4cce86,_0x3373f3,_0x518adb){return _0x4f7734(_0x4cce86,_0x3373f3,_0x518adb);},'wQQMx':function(_0x1c96c1,_0x47732d){return _0x1c96c1!==_0x47732d;},'RcCdi':_0x2b3b('‮29','%axu'),'KVEic':function(_0x1037f3,_0x47084c){return _0x1037f3==_0x47084c;},'bpxLA':_0x2b3b('‫2a','oFj]'),'MBUvW':function(_0x51bd97,_0xd02e9a){return _0x51bd97+_0xd02e9a;},'GFYjx':_0x2b3b('‫2b','RDP$'),'mSUdF':'DcggI','awApe':function(_0xe40e89,_0x24ed28){return _0xe40e89/_0x24ed28;},'jeRdt':function(_0x1f3d52,_0x12a5fa){return _0x1f3d52(_0x12a5fa);}};return new Promise(_0x28bd91=>{var _0x49d241={'crsXm':function(_0x32d392,_0x195277){return _0x32d392|_0x195277;},'JFira':function(_0x4664aa,_0x48832d){return _0x2d1b7c[_0x2b3b('‫2c','IICs')](_0x4664aa,_0x48832d);},'vXZJu':function(_0x12e5af,_0x167e64){return _0x2d1b7c[_0x2b3b('‫2d','U%kt')](_0x12e5af,_0x167e64);},'WoJvI':function(_0x3e2fd0,_0x11c241){return _0x2d1b7c['jFkNb'](_0x3e2fd0,_0x11c241);},'msdcu':function(_0x57397a,_0x28b47c,_0x3f3784){return _0x57397a(_0x28b47c,_0x3f3784);},'sLRXz':function(_0x4051ba,_0x2fbf08,_0x7ab2c6,_0x25d763){return _0x2d1b7c[_0x2b3b('‫2e','e>')](_0x4051ba,_0x2fbf08,_0x7ab2c6,_0x25d763);},'KUbov':function(_0x1a93f4,_0xd9e581){return _0x2d1b7c['wQQMx'](_0x1a93f4,_0xd9e581);},'nTakc':_0x2d1b7c[_0x2b3b('‫2f','lKv3')],'dUZfx':function(_0x381487,_0x3e0adb){return _0x2d1b7c[_0x2b3b('‮30','8bkY')](_0x381487,_0x3e0adb);},'WmYIw':function(_0x345c47){return _0x345c47();},'JBdPf':_0x2d1b7c[_0x2b3b('‫31','v8Jk')],'EuGFn':function(_0x580843,_0x3d9336){return _0x2d1b7c['MBUvW'](_0x580843,_0x3d9336);},'IgTEj':function(_0x26ecc9,_0xebea5b){return _0x26ecc9+_0xebea5b;},'oCQPw':_0x2d1b7c[_0x2b3b('‮32','BGR6')]};if(_0x2d1b7c[_0x2b3b('‫33','G@J&')]==='DcggI'){let _0x570374=Math['round'](_0x2d1b7c[_0x2b3b('‮34','RDP$')](new Date()[_0x2b3b('‫35','G@J&')](),0x3e8))['toString']();kugousign=_0x2d1b7c[_0x2b3b('‮36','w[9L')](md5,'OIlwieks28dk2k092lksi2UIkpappid=1005clienttime='+_0x570374+_0x2b3b('‫37','U%kt')+dfid+'from=clientmid='+mid+_0x2b3b('‮38','v8Jk')+token+_0x2b3b('‮39','oFj]')+userid+'uuid='+uuid+_0x2b3b('‮3a','AmFz')+taskid+_0x2b3b('‫3b','lKv3'));let _0x114269={'url':_0x2b3b('‮3c','BvxD')+dfid+_0x2b3b('‮3d','$Q]g')+kugousign+_0x2b3b('‫3e','m8E5')+mid+_0x2b3b('‮3f','Ovm0')+_0x570374+_0x2b3b('‮40','E8#P')+uuid+_0x2b3b('‫41','X[j]')+userid+_0x2b3b('‮42','$7Ag')+token,'headers':JSON[_0x2b3b('‮43','7JJ^')](_0x2b3b('‮44','&KL@')+userid+_0x2b3b('‮45','WWSf')),'body':_0x2b3b('‫46','$7Ag')+taskid+',\x22user_label\x22:{\x22val6\x22:3456,\x22val5\x22:0,\x22val4\x22:0,\x22val3\x22:0,\x22val2\x22:128,\x22val1\x22:4224}}'};$[_0x2b3b('‫47','yo]$')](_0x114269,async(_0x3788ff,_0x3e8019,_0x4a85ad)=>{var _0x9ceb93={'ixPJS':function(_0x1360fb,_0x7fef2f,_0x2c0204){return _0x49d241['msdcu'](_0x1360fb,_0x7fef2f,_0x2c0204);},'tAIIs':function(_0xd5a0bc,_0x3693b3,_0x34098b,_0x2ea2d2){return _0x49d241[_0x2b3b('‮48','BvxD')](_0xd5a0bc,_0x3693b3,_0x34098b,_0x2ea2d2);}};if(_0x49d241['KUbov'](_0x49d241['nTakc'],_0x2b3b('‫49','FjVF'))){try{const _0x2e4c00=JSON[_0x2b3b('‫4a','I)D2')](_0x4a85ad);if(_0x49d241['dUZfx'](_0x2e4c00[_0x2b3b('‮4b','D%Pd')],0x0)){$['log'](_0x2b3b('‮4c','U%kt')+taskid+_0x2b3b('‫4d','oFj]')+_0x2e4c00[_0x2b3b('‮4e','I)D2')]['awards']['coins']+_0x2b3b('‫4f','D%Pd'));await $[_0x2b3b('‫50','oFj]')](0x2710);await _0x49d241['WmYIw'](kugourw);}else{$[_0x2b3b('‮51','&Z$f')](_0x2b3b('‫52','IICs')+taskid+'】:'+_0x2e4c00[_0x2b3b('‫53','X8$r')]);}}catch(_0x4d8573){}finally{if(_0x49d241[_0x2b3b('‮54','B$ii')]!==_0x2b3b('‫55','yo]$')){return _0x49d241[_0x2b3b('‮56','QXKC')](_0x49d241['JFira'](a,b),_0x49d241[_0x2b3b('‮57','lxqq')](a,_0x49d241[_0x2b3b('‮58','Bwb1')](0x20,b)));}else{_0x28bd91();}}}else{return a=_0x9ceb93[_0x2b3b('‮59','yo]$')](c,a,c(_0x9ceb93['ixPJS'](c,_0x9ceb93['tAIIs'](d,e,f,g),h),j)),c(_0x9ceb93[_0x2b3b('‮5a','FjVF')](b,a,i),e);}},_0x5cc88d);}else{const _0x36abc1=JSON[_0x2b3b('‫5b','I)D2')]($request[_0x2b3b('‫5c','BvxD')]);if(_0x36abc1)$[_0x2b3b('‫5d','R^lw')](_0x36abc1,_0x2b3b('‮5e','mxqE')+status);$[_0x2b3b('‮5f','3[$J')](_0x36abc1);$['msg']($[_0x2b3b('‮60','BGR6')],'',_0x49d241['EuGFn'](_0x49d241[_0x2b3b('‫61','GEM8')]('',''+status),_0x49d241[_0x2b3b('‫62','IICs')]));}});}function md5(_0x13b5d3){var _0x3dd664={'nLlLh':function(_0x26b6a1,_0x51487b){return _0x26b6a1^_0x51487b;},'XkpoZ':function(_0x4bd639,_0x4c1753){return _0x4bd639^_0x4c1753;},'wKxds':function(_0x25362c,_0x547f2f){return _0x25362c!==_0x547f2f;},'MucoT':'wIcGL','AGJbr':_0x2b3b('‮63','7JJ^'),'wDtAn':function(_0x49b11a,_0x399ea8){return _0x49b11a|_0x399ea8;},'wdOJA':function(_0x3ec8ce,_0x5d18d1){return _0x3ec8ce<<_0x5d18d1;},'lDXlO':function(_0x283c03,_0x587236){return _0x283c03>>>_0x587236;},'wdzvX':function(_0x4717ac,_0x500a7b){return _0x4717ac&_0x500a7b;},'QgyDO':function(_0xf5f34b,_0x35660a){return _0xf5f34b&_0x35660a;},'ArFwz':function(_0x57aabd,_0xf3549a){return _0x57aabd&_0xf3549a;},'WbEEB':function(_0x33e441,_0x528584){return _0x33e441&_0x528584;},'DiPiF':function(_0x20cc1e,_0x55b5c8){return _0x20cc1e&_0x55b5c8;},'sciRp':function(_0x3a480b,_0x4e780f){return _0x3a480b^_0x4e780f;},'ZEXoH':function(_0x5a8c63,_0x228a38){return _0x5a8c63^_0x228a38;},'lKXQd':function(_0x244bfa,_0x13bbca){return _0x244bfa|_0x13bbca;},'KffzC':function(_0x379236,_0xfa9130){return _0x379236&_0xfa9130;},'hIAVh':function(_0x3096d3,_0xa13442){return _0x3096d3^_0xa13442;},'KskhW':function(_0x36452e,_0x58f309){return _0x36452e^_0x58f309;},'GsITX':function(_0x2ec04f,_0x5a0bea){return _0x2ec04f^_0x5a0bea;},'Ixjtl':function(_0x30063f,_0x1df917){return _0x30063f^_0x1df917;},'ZsTDd':function(_0x9315d6,_0x19b02e){return _0x9315d6^_0x19b02e;},'oJVka':function(_0x2e8e00,_0x58a10a){return _0x2e8e00===_0x58a10a;},'osSSs':_0x2b3b('‮64','FjVF'),'elAem':_0x2b3b('‮65','&KL@'),'AQZle':function(_0x13f6aa,_0x11ea02){return _0x13f6aa&_0x11ea02;},'mYiYn':function(_0x2a763a,_0x53ff12){return _0x2a763a+_0x53ff12;},'dVGPd':function(_0x3dc372,_0x3046fc){return _0x3dc372&_0x3046fc;},'pYcXt':function(_0x155b80,_0x5f4d9a){return _0x155b80^_0x5f4d9a;},'CJzzx':function(_0x406114,_0x53c325){return _0x406114^_0x53c325;},'QCOvz':function(_0x149629,_0x3d2664){return _0x149629|_0x3d2664;},'BLqHw':function(_0x3f9bb6,_0x31073b){return _0x3f9bb6&_0x31073b;},'ykgIK':function(_0x9ca79b,_0x53db35){return _0x9ca79b^_0x53db35;},'AaCTf':function(_0x57da6e,_0x31759c){return _0x57da6e^_0x31759c;},'kAhBg':function(_0x41974a,_0x3b0e01){return _0x41974a|_0x3b0e01;},'LRNIB':function(_0x48d556,_0x438b9a){return _0x48d556&_0x438b9a;},'lJfBF':'uxRse','EyTjY':function(_0xc26592,_0x479708){return _0xc26592|_0x479708;},'wObfa':function(_0x1e7dc3,_0x4b3d72){return _0x1e7dc3&_0x4b3d72;},'lLBpn':function(_0x9a027,_0x18422e){return _0x9a027!==_0x18422e;},'FFkSM':'iYIDa','ELHty':function(_0x46037c,_0x430b51){return _0x46037c^_0x430b51;},'xEHkJ':function(_0x9d9a36,_0x10afc3){return _0x9d9a36|_0x10afc3;},'eRMHG':function(_0x35d5ce,_0x2445dd,_0x3851e8){return _0x35d5ce(_0x2445dd,_0x3851e8);},'fwVaO':function(_0x24898f,_0xd581f8,_0x2cad2f){return _0x24898f(_0xd581f8,_0x2cad2f);},'qIyEq':function(_0x1f7e30,_0xc48c92,_0xa2f418){return _0x1f7e30(_0xc48c92,_0xa2f418);},'diPru':_0x2b3b('‫66','$Q]g'),'dcaVg':_0x2b3b('‫67','xdjH'),'RkPsO':function(_0x3c6094,_0x18426e,_0x155453){return _0x3c6094(_0x18426e,_0x155453);},'pbIRK':function(_0x15b1e6,_0x2ae590,_0x266806,_0x230557){return _0x15b1e6(_0x2ae590,_0x266806,_0x230557);},'zVqmk':function(_0x478cb4,_0x3ad908,_0x572361){return _0x478cb4(_0x3ad908,_0x572361);},'KCOzh':function(_0x3b4db7,_0xaeb640,_0x514642){return _0x3b4db7(_0xaeb640,_0x514642);},'qlJPf':function(_0x4fb0f3,_0x2ef517,_0x5b921c){return _0x4fb0f3(_0x2ef517,_0x5b921c);},'ugRLN':function(_0x1d4583,_0x2443b5,_0x2dc062,_0x592427){return _0x1d4583(_0x2443b5,_0x2dc062,_0x592427);},'vBVem':function(_0x481789,_0x3f86d6,_0x1dffe8){return _0x481789(_0x3f86d6,_0x1dffe8);},'uZWRu':function(_0x452612,_0x2aa2af){return _0x452612/_0x2aa2af;},'RaAOa':function(_0x5e4935,_0x4fb2c7){return _0x5e4935-_0x4fb2c7;},'gFiWf':function(_0x1f7792,_0x4f4f2a){return _0x1f7792%_0x4f4f2a;},'uqMsi':function(_0x60249e,_0xac0084){return _0x60249e+_0xac0084;},'hXGyB':function(_0x1121d6,_0x9f1ced){return _0x1121d6*_0x9f1ced;},'saGJu':function(_0x33c115,_0x1e961b){return _0x33c115-_0x1e961b;},'Vwgym':function(_0x2143ec,_0x1117fe){return _0x2143ec*_0x1117fe;},'qBVHs':function(_0x1d40e7,_0x558a92){return _0x1d40e7<<_0x558a92;},'RVvVf':function(_0x4014d6,_0x46885e){return _0x4014d6>=_0x46885e;},'ILAUk':function(_0x46cfd2,_0x3d815d){return _0x46cfd2>>>_0x3d815d;},'lUnbN':function(_0x628521,_0x1a2a60){return _0x628521+_0x1a2a60;},'CxAeG':function(_0x3c9b72,_0x46e0e6){return _0x3c9b72-_0x46e0e6;},'yybdf':function(_0x5b72e0,_0x5ad109){return _0x5b72e0>_0x5ad109;},'gTOyH':function(_0x27bdd1,_0x9ac0c1){return _0x27bdd1>>_0x9ac0c1;},'UjEjC':function(_0x45cddb,_0x4b7dc5){return _0x45cddb|_0x4b7dc5;},'puMwO':function(_0x282643,_0x25f93e){return _0x282643&_0x25f93e;},'RRZtV':function(_0x1df5d1,_0x1b2f73){return _0x1df5d1!==_0x1b2f73;},'nlCMt':_0x2b3b('‮68','w[9L'),'PYPgv':_0x2b3b('‮69','v8Jk'),'bZYII':function(_0x35802f,_0x10ca70){return _0x35802f<_0x10ca70;},'hKglU':function(_0x56b489,_0x46ab25){return _0x56b489!==_0x46ab25;},'VmEsx':'YyoWu','rhHoo':function(_0x3e2b8a,_0x387e14){return _0x3e2b8a&_0x387e14;},'XmggU':function(_0x58e2c5,_0x429579){return _0x58e2c5|_0x429579;},'iwznt':function(_0x5687e7,_0x2bc769){return _0x5687e7>>_0x2bc769;},'ppTmu':function(_0x2508a2,_0x210fd7){return _0x2508a2|_0x210fd7;},'GiZbn':function(_0x20e3a5,_0x5ca928){return _0x20e3a5|_0x5ca928;},'OwiCA':function(_0x3b7b8a,_0x31707a){return _0x3b7b8a&_0x31707a;},'cWHHp':function(_0x4fc304,_0x5e6815){return _0x4fc304(_0x5e6815);},'xNrrL':function(_0x3c0f96,_0x20c806,_0x1197d5,_0x3d6d26,_0x14ca5a,_0x4d6418,_0x4915c5,_0x3f2861){return _0x3c0f96(_0x20c806,_0x1197d5,_0x3d6d26,_0x14ca5a,_0x4d6418,_0x4915c5,_0x3f2861);},'FTeQn':function(_0x59fbbd,_0x414d26){return _0x59fbbd+_0x414d26;},'TfYjM':function(_0x47308c,_0x664e9b,_0x411072,_0x4633f0,_0x188dad,_0x27e64e,_0x27d4d4,_0x4fffe4){return _0x47308c(_0x664e9b,_0x411072,_0x4633f0,_0x188dad,_0x27e64e,_0x27d4d4,_0x4fffe4);},'jczuY':function(_0x2e29d8,_0x41a653){return _0x2e29d8+_0x41a653;},'Ufhgz':function(_0x2915a1,_0x5c93b4,_0x15aaa7,_0x74f1a8,_0x49a66e,_0x5b52a2,_0x284b53,_0x1cee17){return _0x2915a1(_0x5c93b4,_0x15aaa7,_0x74f1a8,_0x49a66e,_0x5b52a2,_0x284b53,_0x1cee17);},'lRIlL':function(_0xb37d9b,_0x5b3b1e){return _0xb37d9b+_0x5b3b1e;},'wERBS':function(_0x1940cd,_0x53bd83,_0x3b10f2,_0x36ff9f,_0x4e5198,_0x4d32c3,_0x32ef46,_0x4fd849){return _0x1940cd(_0x53bd83,_0x3b10f2,_0x36ff9f,_0x4e5198,_0x4d32c3,_0x32ef46,_0x4fd849);},'bCcQl':function(_0xb9f61b,_0x274170,_0x10e935,_0x456100,_0x1a3622,_0x520b5a,_0xf3d6c8,_0x539773){return _0xb9f61b(_0x274170,_0x10e935,_0x456100,_0x1a3622,_0x520b5a,_0xf3d6c8,_0x539773);},'HwgMr':function(_0x4621fc,_0x15098a,_0x195f3d,_0x51ea20,_0x3ddb5b,_0x237ba4,_0x5a7487,_0x1def3f){return _0x4621fc(_0x15098a,_0x195f3d,_0x51ea20,_0x3ddb5b,_0x237ba4,_0x5a7487,_0x1def3f);},'VcpNd':function(_0x32aadd,_0x221f0f){return _0x32aadd+_0x221f0f;},'vRHHE':function(_0x1e6a87,_0x47eea9,_0x3d566b,_0x53456a,_0x35acd1,_0x443144,_0x5692d6,_0x3ddc52){return _0x1e6a87(_0x47eea9,_0x3d566b,_0x53456a,_0x35acd1,_0x443144,_0x5692d6,_0x3ddc52);},'tYJrT':function(_0x4c9799,_0x92faee,_0x440ec3,_0x2cbf47,_0x42bf70,_0x5a2843,_0x589c23,_0x2491e4){return _0x4c9799(_0x92faee,_0x440ec3,_0x2cbf47,_0x42bf70,_0x5a2843,_0x589c23,_0x2491e4);},'EAGql':function(_0x1f9fc7,_0x122377,_0x40e559,_0x154421,_0x3ebb43,_0x3b7258,_0x519979,_0x3562f6){return _0x1f9fc7(_0x122377,_0x40e559,_0x154421,_0x3ebb43,_0x3b7258,_0x519979,_0x3562f6);},'tlJPe':function(_0x3460f2,_0x194ff4){return _0x3460f2+_0x194ff4;},'XzMun':function(_0x332371,_0x10acb0,_0x1e7f47,_0x48dc2f,_0x2959a9,_0x3d5b2a,_0x412489,_0x559615){return _0x332371(_0x10acb0,_0x1e7f47,_0x48dc2f,_0x2959a9,_0x3d5b2a,_0x412489,_0x559615);},'gvaqJ':function(_0x1f0f5a,_0x56093a,_0xd58d1f,_0x511bbc,_0x5037c6,_0x4b8f69,_0x38546f,_0x1f1eb){return _0x1f0f5a(_0x56093a,_0xd58d1f,_0x511bbc,_0x5037c6,_0x4b8f69,_0x38546f,_0x1f1eb);},'mOKEa':function(_0x37c9c3,_0x25ab7a){return _0x37c9c3+_0x25ab7a;},'bEKvr':function(_0x53adba,_0x3b70f4,_0x3eaf81,_0x334512,_0x9022cb,_0x2be07a,_0x5c143e,_0x3defdc){return _0x53adba(_0x3b70f4,_0x3eaf81,_0x334512,_0x9022cb,_0x2be07a,_0x5c143e,_0x3defdc);},'rqQFM':function(_0x439b40,_0x50f5e1,_0x147e22,_0x287f1b,_0x2833c1,_0x7e98e,_0x276886,_0x288b7f){return _0x439b40(_0x50f5e1,_0x147e22,_0x287f1b,_0x2833c1,_0x7e98e,_0x276886,_0x288b7f);},'DOSUF':function(_0x258601,_0x4aef5b){return _0x258601+_0x4aef5b;},'xDHUd':function(_0x2cddc1,_0x52bbb9,_0x66341f,_0x4714bf,_0x473c01,_0x565d9c,_0x22f2de,_0x48fccc){return _0x2cddc1(_0x52bbb9,_0x66341f,_0x4714bf,_0x473c01,_0x565d9c,_0x22f2de,_0x48fccc);},'IoPIN':function(_0x1197c4,_0x1beaa7){return _0x1197c4+_0x1beaa7;},'gsWXc':function(_0x41b981,_0x50080c,_0x823a74,_0x3a5d30,_0x338f33,_0x258001,_0x22dc7f,_0x58fa5d){return _0x41b981(_0x50080c,_0x823a74,_0x3a5d30,_0x338f33,_0x258001,_0x22dc7f,_0x58fa5d);},'aMZBw':function(_0x2d7c43,_0x34b0e3){return _0x2d7c43+_0x34b0e3;},'VOrZu':function(_0x54cf14,_0x202a67){return _0x54cf14+_0x202a67;},'akknZ':function(_0x441355,_0x3713bd,_0x425c58,_0x12d594,_0x466694,_0x4ba47e,_0x27ad2f,_0x487e6f){return _0x441355(_0x3713bd,_0x425c58,_0x12d594,_0x466694,_0x4ba47e,_0x27ad2f,_0x487e6f);},'sVITX':function(_0x514177,_0x5e0639){return _0x514177+_0x5e0639;},'usPyh':function(_0x25a199,_0x568cb2,_0x5148a9,_0x305ea3,_0x3d977b,_0x4df74a,_0x5249fe,_0x2dd42a){return _0x25a199(_0x568cb2,_0x5148a9,_0x305ea3,_0x3d977b,_0x4df74a,_0x5249fe,_0x2dd42a);},'HRCkA':function(_0xf9f75e,_0x1fdf16){return _0xf9f75e+_0x1fdf16;},'QPOzP':function(_0x1f1883,_0x11f23a,_0x61ae98,_0x3297c2,_0x2f6e14,_0x396b41,_0x1980c4,_0x50038d){return _0x1f1883(_0x11f23a,_0x61ae98,_0x3297c2,_0x2f6e14,_0x396b41,_0x1980c4,_0x50038d);},'YwriA':function(_0x4d2fc7,_0x341051){return _0x4d2fc7+_0x341051;},'NBHOE':function(_0x3f71b8,_0x53f97e){return _0x3f71b8+_0x53f97e;},'AZicS':function(_0x132101,_0x26ff95){return _0x132101+_0x26ff95;},'sDnEm':function(_0x14d99d,_0x41ec07,_0x2659a5,_0x26f383,_0x355f31,_0x153cd8,_0x28fcfc,_0x1e7ba2){return _0x14d99d(_0x41ec07,_0x2659a5,_0x26f383,_0x355f31,_0x153cd8,_0x28fcfc,_0x1e7ba2);},'kebnA':function(_0x54653e,_0x5b5c40,_0x4b1ff3,_0x1890b7,_0x5b77c3,_0x3fc819,_0x2d0533,_0x46246c){return _0x54653e(_0x5b5c40,_0x4b1ff3,_0x1890b7,_0x5b77c3,_0x3fc819,_0x2d0533,_0x46246c);},'RSQRF':function(_0x85720a,_0x15ef54,_0x507884,_0x6bcdf7,_0x9ef481,_0x110d6e,_0x321d13,_0x2e0dda){return _0x85720a(_0x15ef54,_0x507884,_0x6bcdf7,_0x9ef481,_0x110d6e,_0x321d13,_0x2e0dda);},'mkFnE':function(_0x2d042c,_0x210d51){return _0x2d042c+_0x210d51;},'nBvxb':function(_0x40828f,_0x517944,_0x1a8725,_0x1348a4,_0x2cbb78,_0x578f8d,_0x5b0870,_0xac3b74){return _0x40828f(_0x517944,_0x1a8725,_0x1348a4,_0x2cbb78,_0x578f8d,_0x5b0870,_0xac3b74);},'SaxNX':function(_0x12e05b,_0x547888){return _0x12e05b+_0x547888;},'yNpdq':function(_0x5197e5,_0x345e57,_0x248ea0,_0x4de8a8,_0x61d750,_0x3efda4,_0x5624f2,_0x168a32){return _0x5197e5(_0x345e57,_0x248ea0,_0x4de8a8,_0x61d750,_0x3efda4,_0x5624f2,_0x168a32);},'ESyQM':function(_0x3a1484,_0x395a43){return _0x3a1484+_0x395a43;},'KZZgQ':function(_0x57d307,_0x2d4537){return _0x57d307+_0x2d4537;},'lgLQM':function(_0x55c957,_0x4963e3,_0x7a48d5,_0x506d02,_0xc08c95,_0x39be96,_0x1e6bf1,_0x43b4d7){return _0x55c957(_0x4963e3,_0x7a48d5,_0x506d02,_0xc08c95,_0x39be96,_0x1e6bf1,_0x43b4d7);},'BAbnP':function(_0x5c32ab,_0xc4be25,_0x5e2bcd){return _0x5c32ab(_0xc4be25,_0x5e2bcd);},'sBSFd':function(_0x58bf04,_0x5ef4d0,_0x354f0b){return _0x58bf04(_0x5ef4d0,_0x354f0b);},'tkpNY':function(_0x49052f,_0x3bf6e3,_0x479f73){return _0x49052f(_0x3bf6e3,_0x479f73);},'AITnX':function(_0x212f49,_0x30ceec){return _0x212f49(_0x30ceec);},'erbOM':function(_0x413384,_0x543f52){return _0x413384(_0x543f52);}};function _0x34c170(_0x13b5d3,_0x34c170){if(_0x3dd664[_0x2b3b('‫6a','BGR6')](_0x3dd664[_0x2b3b('‮6b','Rr[y')],_0x3dd664[_0x2b3b('‮6c','xdjH')])){return _0x3dd664[_0x2b3b('‫6d','BvxD')](_0x3dd664[_0x2b3b('‮6e','DP1[')](_0x13b5d3,_0x34c170),_0x3dd664[_0x2b3b('‮6f','jC[a')](_0x13b5d3,0x20-_0x34c170));}else{return _0x3dd664[_0x2b3b('‫70','B$ii')](_0x3dd664[_0x2b3b('‫71','%axu')](_0x13b5d3,_0x34c170),_0x2ae3d3);}}function _0x2ae3d3(_0x13b5d3,_0x34c170){if(_0x3dd664[_0x2b3b('‫72','R^lw')](_0x3dd664['osSSs'],_0x3dd664[_0x2b3b('‮73','oFj]')])){var _0x3c58b6,_0x4464ba,_0x33f293,_0x274b2a,_0x487e38;return _0x33f293=_0x3dd664[_0x2b3b('‫74','v8Jk')](0x80000000,_0x13b5d3),_0x274b2a=_0x3dd664[_0x2b3b('‮75','BvxD')](0x80000000,_0x34c170),_0x3c58b6=_0x3dd664[_0x2b3b('‮76','7JJ^')](0x40000000,_0x13b5d3),_0x4464ba=_0x3dd664[_0x2b3b('‫77','lKv3')](0x40000000,_0x34c170),_0x487e38=_0x3dd664[_0x2b3b('‮78','B$ii')](0x3fffffff,_0x13b5d3)+(0x3fffffff&_0x34c170),_0x3dd664['DiPiF'](_0x3c58b6,_0x4464ba)?_0x3dd664[_0x2b3b('‫79','X8$r')](_0x3dd664[_0x2b3b('‫7a','m8E5')](0x80000000,_0x487e38)^_0x33f293,_0x274b2a):_0x3dd664[_0x2b3b('‮7b','fXY7')](_0x3c58b6,_0x4464ba)?_0x3dd664['KffzC'](0x40000000,_0x487e38)?_0x3dd664[_0x2b3b('‮7c','BGR6')](_0x3dd664[_0x2b3b('‮7d','X8$r')](_0x3dd664[_0x2b3b('‮7e','X[j]')](0xc0000000,_0x487e38),_0x33f293),_0x274b2a):_0x3dd664[_0x2b3b('‫7f','8bkY')](_0x3dd664[_0x2b3b('‮80','GEM8')](_0x3dd664[_0x2b3b('‫81','jC[a')](0x40000000,_0x487e38),_0x33f293),_0x274b2a):_0x3dd664[_0x2b3b('‮82','Gt$G')](_0x487e38,_0x33f293)^_0x274b2a;}else{var _0x2ae3d3,_0x418618,_0x4e9408,_0x2cdd67,_0x5b4d6f;return _0x4e9408=_0x3dd664[_0x2b3b('‮83','xdjH')](0x80000000,_0x13b5d3),_0x2cdd67=_0x3dd664[_0x2b3b('‮84','YgKj')](0x80000000,_0x34c170),_0x2ae3d3=0x40000000&_0x13b5d3,_0x418618=_0x3dd664[_0x2b3b('‮85','7JJ^')](0x40000000,_0x34c170),_0x5b4d6f=_0x3dd664['mYiYn'](_0x3dd664['AQZle'](0x3fffffff,_0x13b5d3),_0x3dd664['AQZle'](0x3fffffff,_0x34c170)),_0x3dd664['dVGPd'](_0x2ae3d3,_0x418618)?_0x3dd664['pYcXt'](_0x3dd664[_0x2b3b('‫86','$Q]g')](_0x3dd664['CJzzx'](0x80000000,_0x5b4d6f),_0x4e9408),_0x2cdd67):_0x3dd664[_0x2b3b('‫87','X[j]')](_0x2ae3d3,_0x418618)?_0x3dd664[_0x2b3b('‫88','1W2z')](0x40000000,_0x5b4d6f)?_0x3dd664[_0x2b3b('‫89','FjVF')](_0x3dd664[_0x2b3b('‮8a','ivs[')](0xc0000000,_0x5b4d6f)^_0x4e9408,_0x2cdd67):_0x3dd664[_0x2b3b('‮8b','RDP$')](0x40000000^_0x5b4d6f,_0x4e9408)^_0x2cdd67:_0x3dd664[_0x2b3b('‮8c','E8#P')](_0x3dd664['AaCTf'](_0x5b4d6f,_0x4e9408),_0x2cdd67);}}function _0x2391c0(_0x13b5d3,_0x34c170,_0x2ae3d3){var _0x293fa0={'khFGc':function(_0x2dc213,_0x4e1401){return _0x3dd664['kAhBg'](_0x2dc213,_0x4e1401);},'BKDVh':function(_0x5420be,_0x19c90e){return _0x3dd664['LRNIB'](_0x5420be,_0x19c90e);},'lDdFf':function(_0x2718fd,_0x2c6746){return _0x3dd664[_0x2b3b('‮8d','BGR6')](_0x2718fd,_0x2c6746);}};if(_0x3dd664[_0x2b3b('‫8e','TvQV')](_0x3dd664['lJfBF'],_0x3dd664[_0x2b3b('‫8f','E8#P')])){return _0x3dd664[_0x2b3b('‫90','1W2z')](_0x13b5d3&_0x34c170,_0x3dd664[_0x2b3b('‮91','vNGc')](~_0x13b5d3,_0x2ae3d3));}else{return _0x293fa0[_0x2b3b('‮92','QXKC')](_0x293fa0[_0x2b3b('‫93','e>')](_0x13b5d3,_0x34c170),_0x293fa0[_0x2b3b('‫94','v8Jk')](~_0x13b5d3,_0x2ae3d3));}}function _0x5159ff(_0x13b5d3,_0x34c170,_0x2ae3d3){if(_0x3dd664[_0x2b3b('‫95','xdjH')](_0x3dd664['FFkSM'],_0x2b3b('‮96','vNGc'))){return _0x13b5d3&_0x2ae3d3|_0x3dd664['wObfa'](_0x34c170,~_0x2ae3d3);}else{return _0x3dd664[_0x2b3b('‮97','D%Pd')](_0x13b5d3,_0x2ae3d3)|_0x3dd664[_0x2b3b('‫98','v8Jk')](_0x34c170,~_0x2ae3d3);}}function _0x2c2387(_0x13b5d3,_0x34c170,_0x2ae3d3){return _0x3dd664['AaCTf'](_0x13b5d3^_0x34c170,_0x2ae3d3);}function _0x4d1448(_0x13b5d3,_0x34c170,_0x2ae3d3){return _0x3dd664['ELHty'](_0x34c170,_0x3dd664[_0x2b3b('‫99','B$ii')](_0x13b5d3,~_0x2ae3d3));}function _0x1038f4(_0x13b5d3,_0x5159ff,_0x2c2387,_0x4d1448,_0x1038f4,_0x33d63e,_0x226f86){return _0x13b5d3=_0x2ae3d3(_0x13b5d3,_0x3dd664[_0x2b3b('‮9a','8bkY')](_0x2ae3d3,_0x2ae3d3(_0x2391c0(_0x5159ff,_0x2c2387,_0x4d1448),_0x1038f4),_0x226f86)),_0x2ae3d3(_0x34c170(_0x13b5d3,_0x33d63e),_0x5159ff);}function _0x24d961(_0x13b5d3,_0x2391c0,_0x2c2387,_0x4d1448,_0x1038f4,_0x24d961,_0x52ad3e){return _0x13b5d3=_0x3dd664['eRMHG'](_0x2ae3d3,_0x13b5d3,_0x3dd664[_0x2b3b('‮9b','BGR6')](_0x2ae3d3,_0x3dd664[_0x2b3b('‫9c','IICs')](_0x2ae3d3,_0x5159ff(_0x2391c0,_0x2c2387,_0x4d1448),_0x1038f4),_0x52ad3e)),_0x3dd664['qIyEq'](_0x2ae3d3,_0x3dd664['qIyEq'](_0x34c170,_0x13b5d3,_0x24d961),_0x2391c0);}function _0x1db9b5(_0x13b5d3,_0x2391c0,_0x5159ff,_0x4d1448,_0x1038f4,_0x24d961,_0x1db9b5){if(_0x3dd664[_0x2b3b('‮9d','&KL@')](_0x3dd664[_0x2b3b('‮9e','3[$J')],_0x3dd664['dcaVg'])){return _0x3dd664[_0x2b3b('‫9f','yo]$')](_0x34c170,_0x3dd664['xEHkJ'](_0x13b5d3,~_0x2ae3d3));}else{return _0x13b5d3=_0x2ae3d3(_0x13b5d3,_0x3dd664[_0x2b3b('‮a0','k#sU')](_0x2ae3d3,_0x3dd664[_0x2b3b('‮a1','D%Pd')](_0x2ae3d3,_0x3dd664[_0x2b3b('‫a2','Bwb1')](_0x2c2387,_0x2391c0,_0x5159ff,_0x4d1448),_0x1038f4),_0x1db9b5)),_0x3dd664[_0x2b3b('‫a3','B$ii')](_0x2ae3d3,_0x3dd664['zVqmk'](_0x34c170,_0x13b5d3,_0x24d961),_0x2391c0);}}function _0x306e0b(_0x13b5d3,_0x2391c0,_0x5159ff,_0x2c2387,_0x1038f4,_0x24d961,_0x1db9b5){return _0x13b5d3=_0x3dd664[_0x2b3b('‫a4','vNGc')](_0x2ae3d3,_0x13b5d3,_0x3dd664['KCOzh'](_0x2ae3d3,_0x3dd664[_0x2b3b('‮a5','TvQV')](_0x2ae3d3,_0x3dd664['ugRLN'](_0x4d1448,_0x2391c0,_0x5159ff,_0x2c2387),_0x1038f4),_0x1db9b5)),_0x3dd664[_0x2b3b('‫a6','&KL@')](_0x2ae3d3,_0x3dd664[_0x2b3b('‫a7','X8$r')](_0x34c170,_0x13b5d3,_0x24d961),_0x2391c0);}function _0x48224e(_0x13b5d3){for(var _0x34c170,_0x2ae3d3=_0x13b5d3['length'],_0x2391c0=_0x2ae3d3+0x8,_0x5159ff=_0x3dd664['uZWRu'](_0x3dd664[_0x2b3b('‮a8','E8#P')](_0x2391c0,_0x3dd664[_0x2b3b('‫a9','k#sU')](_0x2391c0,0x40)),0x40),_0x2c2387=0x10*_0x3dd664[_0x2b3b('‮aa','TvQV')](_0x5159ff,0x1),_0x4d1448=new Array(_0x3dd664['RaAOa'](_0x2c2387,0x1)),_0x1038f4=0x0,_0x24d961=0x0;_0x2ae3d3>_0x24d961;)_0x34c170=_0x3dd664[_0x2b3b('‮ab','E8#P')](_0x24d961-_0x3dd664[_0x2b3b('‫ac','BvxD')](_0x24d961,0x4),0x4),_0x1038f4=_0x3dd664[_0x2b3b('‫ad','w[9L')](_0x3dd664[_0x2b3b('‫ae','DP1[')](_0x24d961,0x4),0x8),_0x4d1448[_0x34c170]=_0x3dd664[_0x2b3b('‫af','DP1[')](_0x4d1448[_0x34c170],_0x3dd664[_0x2b3b('‫b0','w[9L')](_0x13b5d3['charCodeAt'](_0x24d961),_0x1038f4)),_0x24d961++;return _0x34c170=_0x3dd664['saGJu'](_0x24d961,_0x3dd664['gFiWf'](_0x24d961,0x4))/0x4,_0x1038f4=_0x3dd664[_0x2b3b('‫b1','U%kt')](_0x24d961%0x4,0x8),_0x4d1448[_0x34c170]=_0x3dd664[_0x2b3b('‫b2','Bwb1')](_0x4d1448[_0x34c170],_0x3dd664[_0x2b3b('‫b3','1W2z')](0x80,_0x1038f4)),_0x4d1448[_0x3dd664[_0x2b3b('‮b4','R^lw')](_0x2c2387,0x2)]=_0x3dd664[_0x2b3b('‮b5','Rr[y')](_0x2ae3d3,0x3),_0x4d1448[_0x2c2387-0x1]=_0x3dd664['lDXlO'](_0x2ae3d3,0x1d),_0x4d1448;}function _0x45f78e(_0x13b5d3){var _0x34c170,_0x2ae3d3,_0x2391c0='',_0x5159ff='';for(_0x2ae3d3=0x0;_0x3dd664[_0x2b3b('‫b6','lxqq')](0x3,_0x2ae3d3);_0x2ae3d3++)_0x34c170=_0x3dd664['wObfa'](_0x3dd664[_0x2b3b('‮b7','lxqq')](_0x13b5d3,_0x3dd664['Vwgym'](0x8,_0x2ae3d3)),0xff),_0x5159ff=_0x3dd664[_0x2b3b('‮b8','7JJ^')]('0',_0x34c170[_0x2b3b('‫b9','E8#P')](0x10)),_0x2391c0+=_0x5159ff[_0x2b3b('‮ba','k#sU')](_0x3dd664[_0x2b3b('‮bb','DP1[')](_0x5159ff[_0x2b3b('‫bc','U%kt')],0x2),0x2);return _0x2391c0;}function _0x3f1553(_0x13b5d3){var _0x303a97={'aXchw':function(_0x59d723,_0xdae525,_0x4d8ff5){return _0x59d723(_0xdae525,_0x4d8ff5);},'Znobw':function(_0x659204,_0xdc8c11,_0x23aa0a,_0x1e3693){return _0x3dd664[_0x2b3b('‫bd','&Z$f')](_0x659204,_0xdc8c11,_0x23aa0a,_0x1e3693);},'PwFxd':function(_0x363d58,_0x32ebd4,_0x5421cb){return _0x3dd664[_0x2b3b('‫be','DP1[')](_0x363d58,_0x32ebd4,_0x5421cb);}};if(_0x3dd664['RRZtV'](_0x3dd664[_0x2b3b('‮bf','v8Jk')],_0x3dd664[_0x2b3b('‫c0','oFj]')])){_0x13b5d3=_0x13b5d3[_0x2b3b('‫c1','X8$r')](/\r\n/g,'\x0a');for(var _0x34c170='',_0x2ae3d3=0x0;_0x3dd664['bZYII'](_0x2ae3d3,_0x13b5d3['length']);_0x2ae3d3++){if(_0x3dd664['hKglU']('QIweE',_0x3dd664[_0x2b3b('‫c2','%axu')])){var _0x2391c0=_0x13b5d3[_0x2b3b('‮c3','Rr[y')](_0x2ae3d3);_0x3dd664[_0x2b3b('‮c4','I)D2')](0x80,_0x2391c0)?_0x34c170+=String[_0x2b3b('‮c5','TvQV')](_0x2391c0):_0x3dd664['yybdf'](_0x2391c0,0x7f)&&0x800>_0x2391c0?(_0x34c170+=String['fromCharCode'](_0x2391c0>>0x6|0xc0),_0x34c170+=String['fromCharCode'](_0x3dd664[_0x2b3b('‮c6','BGR6')](0x3f,_0x2391c0)|0x80)):(_0x34c170+=String[_0x2b3b('‮c7','&KL@')](_0x3dd664['XmggU'](_0x3dd664['iwznt'](_0x2391c0,0xc),0xe0)),_0x34c170+=String[_0x2b3b('‮c8','7JJ^')](_0x3dd664['ppTmu'](_0x2391c0>>0x6&0x3f,0x80)),_0x34c170+=String['fromCharCode'](_0x3dd664['GiZbn'](_0x3dd664[_0x2b3b('‫c9','RDP$')](0x3f,_0x2391c0),0x80)));}else{var _0x29589b=_0x13b5d3[_0x2b3b('‮ca','oFj]')](_0x2ae3d3);0x80>_0x29589b?_0x34c170+=String['fromCharCode'](_0x29589b):_0x3dd664['yybdf'](_0x29589b,0x7f)&&_0x3dd664[_0x2b3b('‫cb','B$ii')](0x800,_0x29589b)?(_0x34c170+=String[_0x2b3b('‫cc','YgKj')](_0x3dd664[_0x2b3b('‮cd','w[9L')](_0x3dd664[_0x2b3b('‮ce','yo]$')](_0x29589b,0x6),0xc0)),_0x34c170+=String['fromCharCode'](0x3f&_0x29589b|0x80)):(_0x34c170+=String['fromCharCode'](_0x29589b>>0xc|0xe0),_0x34c170+=String[_0x2b3b('‫cf','8bkY')](_0x3dd664[_0x2b3b('‫d0','BvxD')](_0x3dd664[_0x2b3b('‮d1','e>')](_0x29589b,0x6)&0x3f,0x80)),_0x34c170+=String[_0x2b3b('‮d2','xdjH')](_0x3dd664[_0x2b3b('‮d3','%axu')](0x3f,_0x29589b)|0x80));}}return _0x34c170;}else{return _0x13b5d3=_0x2ae3d3(_0x13b5d3,_0x303a97[_0x2b3b('‫d4','jC[a')](_0x2ae3d3,_0x2ae3d3(_0x303a97[_0x2b3b('‫d5','TvQV')](_0x5159ff,_0x2391c0,_0x2c2387,_0x4d1448),_0x1038f4),_0x1db9b5)),_0x303a97[_0x2b3b('‮d6','GEM8')](_0x2ae3d3,_0x34c170(_0x13b5d3,_0x24d961),_0x2391c0);}}var _0x2ed4b5,_0x47f185,_0x34036f,_0x18fc4d,_0x42d30a,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9=[],_0x534bd9=0x7,_0x88305c=0xc,_0x7a056c=0x11,_0x527c59=0x16,_0x923d98=0x5,_0x37f1f2=0x9,_0x5d07c0=0xe,_0x434801=0x14,_0x5b25da=0x4,_0x38b1dc=0xb,_0x351fd2=0x10,_0xf8c010=0x17,_0x2e8808=0x6,_0x2f8708=0xa,_0x184ea7=0xf,_0x4a1690=0x15;for(_0x13b5d3=_0x3dd664[_0x2b3b('‫d7','Ovm0')](_0x3f1553,_0x13b5d3),_0x2464a9=_0x48224e(_0x13b5d3),_0x1e07e0=0x67452301,_0x1e1be1=0xefcdab89,_0x9b3aee=0x98badcfe,_0x31eb8f=0x10325476,_0x2ed4b5=0x0;_0x2ed4b5<_0x2464a9['length'];_0x2ed4b5+=0x10)_0x47f185=_0x1e07e0,_0x34036f=_0x1e1be1,_0x18fc4d=_0x9b3aee,_0x42d30a=_0x31eb8f,_0x1e07e0=_0x1038f4(_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0x0],_0x534bd9,0xd76aa478),_0x31eb8f=_0x1038f4(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮d8','&Z$f')](_0x2ed4b5,0x1)],_0x88305c,0xe8c7b756),_0x9b3aee=_0x3dd664[_0x2b3b('‮d9','TvQV')](_0x1038f4,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫da','G@J&')](_0x2ed4b5,0x2)],_0x7a056c,0x242070db),_0x1e1be1=_0x3dd664['TfYjM'](_0x1038f4,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫db','B$ii')](_0x2ed4b5,0x3)],_0x527c59,0xc1bdceee),_0x1e07e0=_0x3dd664[_0x2b3b('‮dc','$7Ag')](_0x1038f4,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‮dd','lKv3')](_0x2ed4b5,0x4)],_0x534bd9,0xf57c0faf),_0x31eb8f=_0x1038f4(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮de','1W2z')](_0x2ed4b5,0x5)],_0x88305c,0x4787c62a),_0x9b3aee=_0x1038f4(_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664['lRIlL'](_0x2ed4b5,0x6)],_0x7a056c,0xa8304613),_0x1e1be1=_0x3dd664[_0x2b3b('‫df','RDP$')](_0x1038f4,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x2ed4b5+0x7],_0x527c59,0xfd469501),_0x1e07e0=_0x1038f4(_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0x8],_0x534bd9,0x698098d8),_0x31eb8f=_0x3dd664[_0x2b3b('‮e0','X[j]')](_0x1038f4,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x2ed4b5+0x9],_0x88305c,0x8b44f7af),_0x9b3aee=_0x3dd664['bCcQl'](_0x1038f4,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫e1','FjVF')](_0x2ed4b5,0xa)],_0x7a056c,0xffff5bb1),_0x1e1be1=_0x3dd664[_0x2b3b('‫e2','Bwb1')](_0x1038f4,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x2ed4b5+0xb],_0x527c59,0x895cd7be),_0x1e07e0=_0x3dd664[_0x2b3b('‮e3','BvxD')](_0x1038f4,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‫e4','U%kt')](_0x2ed4b5,0xc)],_0x534bd9,0x6b901122),_0x31eb8f=_0x1038f4(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮e5','YgKj')](_0x2ed4b5,0xd)],_0x88305c,0xfd987193),_0x9b3aee=_0x3dd664['vRHHE'](_0x1038f4,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x2ed4b5+0xe],_0x7a056c,0xa679438e),_0x1e1be1=_0x3dd664['vRHHE'](_0x1038f4,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x2ed4b5+0xf],_0x527c59,0x49b40821),_0x1e07e0=_0x3dd664[_0x2b3b('‮e6','BGR6')](_0x24d961,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‫e7','BGR6')](_0x2ed4b5,0x1)],_0x923d98,0xf61e2562),_0x31eb8f=_0x3dd664['tYJrT'](_0x24d961,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x2ed4b5+0x6],_0x37f1f2,0xc040b340),_0x9b3aee=_0x24d961(_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x2ed4b5+0xb],_0x5d07c0,0x265e5a51),_0x1e1be1=_0x3dd664['tYJrT'](_0x24d961,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫e8','TvQV')](_0x2ed4b5,0x0)],_0x434801,0xe9b6c7aa),_0x1e07e0=_0x3dd664[_0x2b3b('‮e9','D%Pd')](_0x24d961,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0x5],_0x923d98,0xd62f105d),_0x31eb8f=_0x3dd664[_0x2b3b('‫ea','lxqq')](_0x24d961,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x2ed4b5+0xa],_0x37f1f2,0x2441453),_0x9b3aee=_0x24d961(_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664['VcpNd'](_0x2ed4b5,0xf)],_0x5d07c0,0xd8a1e681),_0x1e1be1=_0x3dd664['EAGql'](_0x24d961,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664['tlJPe'](_0x2ed4b5,0x4)],_0x434801,0xe7d3fbc8),_0x1e07e0=_0x3dd664['EAGql'](_0x24d961,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0x9],_0x923d98,0x21e1cde6),_0x31eb8f=_0x3dd664[_0x2b3b('‮eb','B$ii')](_0x24d961,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‫ec','&KL@')](_0x2ed4b5,0xe)],_0x37f1f2,0xc33707d6),_0x9b3aee=_0x3dd664[_0x2b3b('‫ed','D%Pd')](_0x24d961,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫ee','Bwb1')](_0x2ed4b5,0x3)],_0x5d07c0,0xf4d50d87),_0x1e1be1=_0x3dd664['bEKvr'](_0x24d961,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x2ed4b5+0x8],_0x434801,0x455a14ed),_0x1e07e0=_0x3dd664[_0x2b3b('‫ef','Rr[y')](_0x24d961,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664['mOKEa'](_0x2ed4b5,0xd)],_0x923d98,0xa9e3e905),_0x31eb8f=_0x3dd664[_0x2b3b('‮f0','fXY7')](_0x24d961,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664['mOKEa'](_0x2ed4b5,0x2)],_0x37f1f2,0xfcefa3f8),_0x9b3aee=_0x3dd664['rqQFM'](_0x24d961,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫f1','D%Pd')](_0x2ed4b5,0x7)],_0x5d07c0,0x676f02d9),_0x1e1be1=_0x24d961(_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x2ed4b5+0xc],_0x434801,0x8d2a4c8a),_0x1e07e0=_0x3dd664['rqQFM'](_0x1db9b5,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‫f2','v8Jk')](_0x2ed4b5,0x5)],_0x5b25da,0xfffa3942),_0x31eb8f=_0x1db9b5(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮f3','Ovm0')](_0x2ed4b5,0x8)],_0x38b1dc,0x8771f681),_0x9b3aee=_0x1db9b5(_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x2ed4b5+0xb],_0x351fd2,0x6d9d6122),_0x1e1be1=_0x1db9b5(_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫f4','Rr[y')](_0x2ed4b5,0xe)],_0xf8c010,0xfde5380c),_0x1e07e0=_0x3dd664['rqQFM'](_0x1db9b5,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‫f5','DP1[')](_0x2ed4b5,0x1)],_0x5b25da,0xa4beea44),_0x31eb8f=_0x3dd664['rqQFM'](_0x1db9b5,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664['DOSUF'](_0x2ed4b5,0x4)],_0x38b1dc,0x4bdecfa9),_0x9b3aee=_0x3dd664[_0x2b3b('‫f6','vNGc')](_0x1db9b5,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫f7','mxqE')](_0x2ed4b5,0x7)],_0x351fd2,0xf6bb4b60),_0x1e1be1=_0x3dd664[_0x2b3b('‫f8','I)D2')](_0x1db9b5,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫f9','mxqE')](_0x2ed4b5,0xa)],_0xf8c010,0xbebfbc70),_0x1e07e0=_0x3dd664['gsWXc'](_0x1db9b5,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0xd],_0x5b25da,0x289b7ec6),_0x31eb8f=_0x1db9b5(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‫fa','Bwb1')](_0x2ed4b5,0x0)],_0x38b1dc,0xeaa127fa),_0x9b3aee=_0x1db9b5(_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫fb','lxqq')](_0x2ed4b5,0x3)],_0x351fd2,0xd4ef3085),_0x1e1be1=_0x3dd664[_0x2b3b('‫fc','m8E5')](_0x1db9b5,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664['aMZBw'](_0x2ed4b5,0x6)],_0xf8c010,0x4881d05),_0x1e07e0=_0x3dd664[_0x2b3b('‮fd','oFj]')](_0x1db9b5,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‮fe','Bwb1')](_0x2ed4b5,0x9)],_0x5b25da,0xd9d4d039),_0x31eb8f=_0x3dd664[_0x2b3b('‮ff','lKv3')](_0x1db9b5,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‫100','Ovm0')](_0x2ed4b5,0xc)],_0x38b1dc,0xe6db99e5),_0x9b3aee=_0x3dd664[_0x2b3b('‮101','BGR6')](_0x1db9b5,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‮102','D%Pd')](_0x2ed4b5,0xf)],_0x351fd2,0x1fa27cf8),_0x1e1be1=_0x1db9b5(_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫103','AmFz')](_0x2ed4b5,0x2)],_0xf8c010,0xc4ac5665),_0x1e07e0=_0x3dd664['QPOzP'](_0x306e0b,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‫104','B$ii')](_0x2ed4b5,0x0)],_0x2e8808,0xf4292244),_0x31eb8f=_0x306e0b(_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮105','vNGc')](_0x2ed4b5,0x7)],_0x2f8708,0x432aff97),_0x9b3aee=_0x3dd664['QPOzP'](_0x306e0b,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664['NBHOE'](_0x2ed4b5,0xe)],_0x184ea7,0xab9423a7),_0x1e1be1=_0x306e0b(_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫106','E8#P')](_0x2ed4b5,0x5)],_0x4a1690,0xfc93a039),_0x1e07e0=_0x3dd664[_0x2b3b('‮107','3[$J')](_0x306e0b,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x2ed4b5+0xc],_0x2e8808,0x655b59c3),_0x31eb8f=_0x3dd664[_0x2b3b('‮108','Gt$G')](_0x306e0b,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‮109','vNGc')](_0x2ed4b5,0x3)],_0x2f8708,0x8f0ccc92),_0x9b3aee=_0x3dd664[_0x2b3b('‫10a','IICs')](_0x306e0b,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‮10b','D%Pd')](_0x2ed4b5,0xa)],_0x184ea7,0xffeff47d),_0x1e1be1=_0x3dd664[_0x2b3b('‫10c','X8$r')](_0x306e0b,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‫10d','jC[a')](_0x2ed4b5,0x1)],_0x4a1690,0x85845dd1),_0x1e07e0=_0x3dd664[_0x2b3b('‫10e','fXY7')](_0x306e0b,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664[_0x2b3b('‮10f','X8$r')](_0x2ed4b5,0x8)],_0x2e8808,0x6fa87e4f),_0x31eb8f=_0x3dd664[_0x2b3b('‮110','1W2z')](_0x306e0b,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664['SaxNX'](_0x2ed4b5,0xf)],_0x2f8708,0xfe2ce6e0),_0x9b3aee=_0x3dd664[_0x2b3b('‫111','X8$r')](_0x306e0b,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x2ed4b5+0x6],_0x184ea7,0xa3014314),_0x1e1be1=_0x3dd664[_0x2b3b('‫112','Rr[y')](_0x306e0b,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664['ESyQM'](_0x2ed4b5,0xd)],_0x4a1690,0x4e0811a1),_0x1e07e0=_0x306e0b(_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x2464a9[_0x3dd664['ESyQM'](_0x2ed4b5,0x4)],_0x2e8808,0xf7537e82),_0x31eb8f=_0x3dd664['yNpdq'](_0x306e0b,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x9b3aee,_0x2464a9[_0x3dd664[_0x2b3b('‫113','w[9L')](_0x2ed4b5,0xb)],_0x2f8708,0xbd3af235),_0x9b3aee=_0x3dd664['yNpdq'](_0x306e0b,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x1e1be1,_0x2464a9[_0x3dd664[_0x2b3b('‫114','$Q]g')](_0x2ed4b5,0x2)],_0x184ea7,0x2ad7d2bb),_0x1e1be1=_0x3dd664['lgLQM'](_0x306e0b,_0x1e1be1,_0x9b3aee,_0x31eb8f,_0x1e07e0,_0x2464a9[_0x3dd664[_0x2b3b('‮115','RDP$')](_0x2ed4b5,0x9)],_0x4a1690,0xeb86d391),_0x1e07e0=_0x3dd664[_0x2b3b('‮116','ivs[')](_0x2ae3d3,_0x1e07e0,_0x47f185),_0x1e1be1=_0x3dd664[_0x2b3b('‫117','ivs[')](_0x2ae3d3,_0x1e1be1,_0x34036f),_0x9b3aee=_0x3dd664[_0x2b3b('‮118','mxqE')](_0x2ae3d3,_0x9b3aee,_0x18fc4d),_0x31eb8f=_0x3dd664[_0x2b3b('‫119','q8%O')](_0x2ae3d3,_0x31eb8f,_0x42d30a);var _0x34907a=_0x3dd664[_0x2b3b('‫11a','yo]$')](_0x3dd664[_0x2b3b('‮11b','w[9L')](_0x45f78e,_0x1e07e0)+_0x45f78e(_0x1e1be1)+_0x3dd664[_0x2b3b('‫11c','7JJ^')](_0x45f78e,_0x9b3aee),_0x3dd664[_0x2b3b('‮11d','$Q]g')](_0x45f78e,_0x31eb8f));return _0x34907a[_0x2b3b('‮11e','R^lw')]();};_0xodh='jsjiami.com.v6'; 11 | function Env(t, e) { 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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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(); 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) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).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 } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } 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("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } -------------------------------------------------------------------------------- /ksjsbdb.js: -------------------------------------------------------------------------------- 1 | const $ = new Env("快手极速版低保"); 2 | let res, 3 | ksjsbCookie = process.env.ksjsbCookie || "", 4 | Users = [], 5 | ksjsbCash = process.env.ksjsbCash || "", 6 | ksjsbWithdrawTime = process.env.ksjsbWithdrawTime || 15, 7 | ksjsbAggressive = process.env.ksjsbAggressive || 0, 8 | ksjsbNotify = process.env.ksjsbNotify || 1, 9 | index = 0, 10 | count = 0; 11 | 12 | //let curHours = new Date().getHours(); 13 | class ksUser { 14 | constructor(cookie) { 15 | let api_st = cookie.match(/(kuaishou.api_st=[\w\-]+)/)[1] + ";"; 16 | 17 | this.index = ++index; 18 | this.cookie = 19 | "kpn=NEBULA; kpf=ANDROID_PHONE; did=ANDROID_" + 20 | randomString(16) + 21 | "; ver=9.10; appver=9.10.40.2474; language=zh-cn; countryCode=CN; sys=ANDROID_5.1; client_key=2ac2a76d; " + 22 | api_st; 23 | this.name = this.index; 24 | this.valid = false; 25 | this.bindAlipay = false; 26 | this.alipay = ""; 27 | this.bindWechat = false; 28 | this.wechat = ""; 29 | this.needSms = false; 30 | } 31 | //获取用户信息 32 | async getUserInfo() { 33 | let url = 34 | "https://nebula.kuaishou.com/rest/n/nebula/activity/earn/overview/basicInfo"; 35 | let body = ""; 36 | let options = getOptions(url, this.cookie, body); 37 | await doRequest("get", options); 38 | if (!res) { 39 | return; 40 | } 41 | if (res.result == 1) { 42 | this.valid = true; 43 | this.name = res.data.userData.nickname; 44 | this.cashBalance = res.data.totalCash; 45 | this.coinBalance = res.data.totalCoin; 46 | this.allCash = res.data.allCash; 47 | /* console.log( 48 | `🎉${this.name}=>|账户余额${this.cashBalance}元,${ 49 | this.coinBalance 50 | }金币,未审核余额${Math.floor( 51 | parseFloat(this.allCash) - parseFloat(this.cashBalance) 52 | )}元` 53 | ); */ 54 | } else { 55 | console.log(`🎉${this.name}=>|查询账户信息失败:${res.error_msg}`); 56 | } 57 | } 58 | //分享获得3000金币 59 | async setShare() { 60 | let url = 61 | "https://nebula.kuaishou.com/rest/n/nebula/account/withdraw/setShare"; 62 | let body = ""; 63 | let options = getOptions(url, this.cookie, body); 64 | await doRequest("post", options); 65 | if (!res) { 66 | return; 67 | } 68 | if (res.result == 1) { 69 | console.log(`🎉${this.name}=>|准备分享得金币`); 70 | await $.wait(200); 71 | await this.taskReward(122); 72 | } else { 73 | console.log(`🎉${this.name}=>|分享失败:${res.error_msg}`); 74 | } 75 | } 76 | //做任务 77 | async taskReward(taskId) { 78 | let url = `https://nebula.kuaishou.com/rest/n/nebula/daily/report?taskId=${taskId}`; 79 | let body = ""; 80 | let options = getOptions(url, this.cookie, body); 81 | await doRequest("get", options); 82 | if (!res) { 83 | return; 84 | } 85 | if (res.result == 1) { 86 | console.log( 87 | `🎉${this.name}=>|完成任务[${taskId}]成功,获得${res.data.amount}金币` 88 | ); 89 | } else { 90 | console.log(`🎉${this.name}=>|完成任务[${taskId}]失败:${res.error_msg}`); 91 | } 92 | } 93 | //签到详情 94 | async getSignInfo() { 95 | let url = "https://nebula.kuaishou.com/rest/n/nebula/sign/queryPopup"; 96 | let body = ""; 97 | let options = getOptions(url, this.cookie, body); 98 | await doRequest("get", options); 99 | if (!res) { 100 | return; 101 | } 102 | if (res.result == 1) { 103 | let todaySigned = res.data.nebulaSignInPopup.todaySigned; 104 | console.log(`🎉${this.name}=>|今天${todaySigned ? "已" : "未"}签到`); 105 | if (!todaySigned) { 106 | await $.wait(200); 107 | await this.doSign(); 108 | await $.wait(200); 109 | await this.setShare(); 110 | } 111 | } else { 112 | console.log(`🎉${this.name}=>|查询签到信息失败:${res.error_msg}`); 113 | } 114 | } 115 | 116 | //签到 117 | async doSign() { 118 | let url = 119 | "https://nebula.kuaishou.com/rest/n/nebula/sign/sign?source=activity"; 120 | let body = ""; 121 | let options = getOptions(url, this.cookie, body); 122 | await doRequest("get", options); 123 | if (!res) { 124 | return; 125 | } 126 | if (res.result == 1) { 127 | console.log(`🎉${this.name}=>|签到成功:${res.data.toast}`); 128 | await $.wait(200); 129 | } else { 130 | console.log(`🎉${this.name}=>|签到失败:${res.error_msg}`); 131 | } 132 | } 133 | 134 | async accountOverview() { 135 | let _0x512fe7 = 136 | "https://nebula.kuaishou.com/rest/n/nebula/account/overview", 137 | _0x251847 = "", 138 | _0x39f16d = getOptions(_0x512fe7, this.cookie, _0x251847); 139 | 140 | await doRequest("get", _0x39f16d); 141 | let _0xa69994 = res; 142 | 143 | if (!_0xa69994) { 144 | return; 145 | } 146 | 147 | if (_0xa69994.result == 1) { 148 | this.coinBalance = _0xa69994.data.coinBalance; 149 | this.cashBalance = _0xa69994.data.cashBalance; 150 | let _0x54aac5 = _0xa69994.data.exchangeCoinState; 151 | 152 | console.log( 153 | "🎉" + 154 | this.name + 155 | "=>|账户余额" + 156 | this.cashBalance + 157 | "元," + 158 | this.coinBalance + 159 | "金币" 160 | ); 161 | 162 | _0x54aac5 == 2 && (await $.wait(200), await this.changeExchangeType(0)); 163 | } else { 164 | console.log( 165 | "🎉" + this.name + "=>|查询账户信息失败:" + _0xa69994.error_msg 166 | ); 167 | } 168 | } 169 | 170 | //开箱子,1金币懒得搞 171 | async openBox(_0x412555) { 172 | let _0x513362 = 173 | "https://nebula.kuaishou.com/rest/n/nebula/box/explore?isOpen=" + 174 | _0x412555 + 175 | "&isReadyOfAdPlay=true", 176 | _0x3ef8d9 = "", 177 | _0x48334f = getOptions(_0x513362, this.cookie, _0x3ef8d9); 178 | 179 | await doRequest("get", _0x48334f); 180 | let _0x15220b = res; 181 | 182 | if (!_0x15220b) { 183 | return; 184 | } 185 | 186 | _0x15220b.result == 1 187 | ? _0x412555 == true 188 | ? _0x15220b.data.commonAwardPopup && 189 | _0x15220b.data.commonAwardPopup.awardAmount 190 | ? (console.log( 191 | "🎉" + 192 | this.name + 193 | "=>|开宝箱获得" + 194 | _0x15220b.data.commonAwardPopup.awardAmount + 195 | "金币" 196 | ), 197 | await $.wait(200), 198 | await this.ksAdParam(AdName.box)) 199 | : console.log("🎉" + this.name + "=>|开宝箱没有获得金币") 200 | : _0x15220b.data.openTime > -1 201 | ? (console.log( 202 | "🎉" + 203 | this.name + 204 | "=>|开宝箱冷却时间还有" + 205 | Math.floor(_0x15220b.data.openTime / 1000) + 206 | "秒" 207 | ), 208 | _0x15220b.data.openTime == 0 && 209 | (await $.wait(200), await this.openBox(true))) 210 | : console.log("🎉" + this.name + "=>|开宝箱次数已用完") 211 | : _0x412555 == true 212 | ? console.log("🎉" + this.name + "=>|开宝箱失败:" + _0x15220b.error_msg) 213 | : console.log( 214 | "🎉" + this.name + "=>|查询宝箱状态失败:" + _0x15220b.error_msg 215 | ); 216 | } 217 | 218 | //兑换 219 | async changeExchangeType(_0x1bd22f) { 220 | let _0x4e7ea7 = 221 | "https://nebula.kuaishou.com/rest/n/nebula/exchange/changeExchangeType", 222 | _0x6250c8 = '{"type":' + _0x1bd22f + "}", 223 | _0x2c1c9f = getOptions(_0x4e7ea7, this.cookie, _0x6250c8); 224 | 225 | _0x2c1c9f.headers["Content-Type"] = "application/json"; 226 | await doRequest("post", _0x2c1c9f); 227 | let _0x4df55c = res; 228 | 229 | if (!_0x4df55c) { 230 | return; 231 | } 232 | 233 | let _0x1fdd87 = _0x1bd22f == 0 ? "自动兑换" : "手动兑换"; 234 | 235 | _0x4df55c.result == 1 236 | ? console.log( 237 | "🎉" + this.name + "=>|兑换方式更改成功,目前兑换方式为:" + _0x1fdd87 238 | ) 239 | : console.log( 240 | "🎉" + this.name + "=>|兑换方式更改失败:" + _0x4df55c.error_msg 241 | ); 242 | } 243 | 244 | //金币兑换奖券 245 | async exchangeCoin() { 246 | if (this.coinBalance < 100) { 247 | console.log("🎉" + this.name + "=>|金币余额不足100,不执行兑换"); 248 | return; 249 | } 250 | 251 | let _0x54ee74 = 252 | "https://nebula.kuaishou.com/rest/n/nebula/exchange/coinToCash/submit", 253 | _0x365938 = 254 | '{"coinAmount":' + 255 | this.coinBalance + 256 | ',"token":"rE2zK-Cmc82uOzxMJW7LI2-wTGcKMqqAHE0PhfN0U4bJY4cAM5Inxw"}', 257 | _0x4650af = getOptions(_0x54ee74, this.cookie, _0x365938); 258 | 259 | _0x4650af.headers["Content-Type"] = "application/json"; 260 | await doRequest("post", _0x4650af); 261 | let _0x2ae7ad = res; 262 | 263 | if (!_0x2ae7ad) { 264 | return; 265 | } 266 | 267 | if (_0x2ae7ad.result == 1) { 268 | let _0x1e5bfa = Math.floor(this.coinBalance / 100) * 100, 269 | _0xd2629a = Math.floor(this.coinBalance / 100) / 100; 270 | 271 | console.log( 272 | "🎉" + 273 | this.name + 274 | "=>|兑换金币成功,将" + 275 | _0x1e5bfa + 276 | "金币兑换成" + 277 | _0xd2629a + 278 | "元" 279 | ); 280 | } else { 281 | console.log("🎉" + this.name + "=>|兑换金币失败:" + _0x2ae7ad.error_msg); 282 | } 283 | } 284 | 285 | //获取用户ID 286 | async getUserid() { 287 | let _0x579d90 = 288 | "https://nebula.kuaishou.com/rest/n/nebula/activity/invitation/relationLink?version=1.2.0", 289 | _0xb20aec = "", 290 | _0x5a5910 = getOptions(_0x579d90, this.cookie, _0xb20aec); 291 | 292 | await doRequest("get", _0x5a5910); 293 | let _0x450eae = res; 294 | 295 | if (!_0x450eae) { 296 | return; 297 | } 298 | 299 | _0x450eae.result == 1 300 | ? (this.userId = _0x450eae.data.userId) 301 | : console.log( 302 | "🎉" + this.name + "=>|获取userId失败:" + _0x450eae.error_msg 303 | ); 304 | } 305 | 306 | //账号详情 307 | async accountInfo() { 308 | let _0x308f69 = 309 | "https://www.kuaishoupay.com/pay/account/h5/withdraw/account_info", 310 | _0xfe05d = "account_group_key=NEBULA_CASH_ACCOUNT&providers=", 311 | _0x52286e = getOptions(_0x308f69, this.cookie, _0xfe05d); 312 | 313 | await doRequest("post", _0x52286e); 314 | let _0x25e462 = res; 315 | 316 | if (!_0x25e462) { 317 | return; 318 | } 319 | 320 | _0x25e462.result == "SUCCESS" 321 | ? (this.needSms = _0x25e462.need_mobile_code) 322 | : console.log( 323 | "🎉" + this.name + "=>|查询账号提现情况失败:" + _0x25e462.error_msg 324 | ); 325 | } 326 | } 327 | 328 | //执行任务,前面的async是异步,现在处理 329 | !(async () => { 330 | if (!(await formatCookie())) { 331 | return; 332 | } 333 | //console.log('\n============== 🎉登录🎉 =============='); 334 | for (let user of Users) { 335 | await user.getUserInfo(); 336 | await $.wait(100); 337 | } 338 | 339 | let CurrentUser = Users.filter((u) => u.valid == true); 340 | if (CurrentUser.length == 0) { 341 | return; 342 | } 343 | 344 | for (let u of CurrentUser) { 345 | console.log("\n=========== 🎉" + u.name + " 🎉==========="); 346 | await u.getSignInfo(); 347 | await $.wait(200); 348 | //await u.openBox(false); 349 | } 350 | console.log("\n============== 🎉账户情况🎉 =============="); 351 | for (let u of CurrentUser) { 352 | await u.accountOverview(); 353 | await $.wait(200); 354 | await u.accountInfo(); 355 | await $.wait(200); 356 | } 357 | })() 358 | .catch((error) => $.logErr(error)) 359 | .finally(() => $.done()); 360 | async function formatCookie() { 361 | if (ksjsbCookie) { 362 | for (let ck of ksjsbCookie.split("@")) { 363 | if (ck) { 364 | Users.push(new ksUser(ck)); 365 | } 366 | } 367 | count = Users.length; 368 | } else { 369 | console.log("未找到CK"); 370 | return; 371 | } 372 | console.log("共找到" + count + "个账号"); 373 | return true; 374 | } 375 | function getOptions(url, cookie, body = "") { 376 | const options = { 377 | url: url, 378 | headers: { 379 | Cookie: cookie, 380 | }, 381 | }; 382 | if (body) { 383 | options.body = body; 384 | options.headers["Content-Type"] = "application/x-www-form-urlencoded"; 385 | } 386 | return options; 387 | } 388 | 389 | //http请求 390 | 391 | async function doRequest(method, options) { 392 | res = null; 393 | return new Promise((resolve) => { 394 | $[method](options, async (err, resp, data) => { 395 | try { 396 | if (err) { 397 | console.log(method + "请求失败"); 398 | console.log(JSON.stringify(err)); 399 | $.logErr(err); 400 | } else { 401 | if (safeGet(data)) { 402 | res = JSON.parse(data); 403 | } 404 | } 405 | } catch (error) { 406 | $.logErr(error, resp); 407 | } finally { 408 | resolve(); 409 | } 410 | }); 411 | }); 412 | } 413 | 414 | //安全获取数据 415 | function safeGet(data) { 416 | try { 417 | if (typeof JSON.parse(data) == "object") { 418 | return true; 419 | } 420 | } catch (e) { 421 | console.log(e); 422 | console.log(`服务器访问数据为空,请检查自身设备网络情况`); 423 | return false; 424 | } 425 | } 426 | function randomString(e = 12) { 427 | let t = "abcdef0123456789", 428 | a = t.length, 429 | n = ""; 430 | for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 431 | return n; 432 | } 433 | var Base64 = { 434 | encode: function encode(input) { 435 | var _keyStr = 436 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 437 | var output = ""; 438 | var chr1, chr2, chr3, enc1, enc2, enc3, enc4; 439 | var i = 0; 440 | input = $.util.Charset.utf8_encode(input); 441 | while (i < input.length) { 442 | chr1 = input.charCodeAt(i++); 443 | chr2 = input.charCodeAt(i++); 444 | chr3 = input.charCodeAt(i++); 445 | enc1 = chr1 >> 2; 446 | enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); 447 | enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); 448 | enc4 = chr3 & 63; 449 | if (isNaN(chr2)) { 450 | enc3 = enc4 = 64; 451 | } else if (isNaN(chr3)) { 452 | enc4 = 64; 453 | } 454 | output = 455 | output + 456 | _keyStr.charAt(enc1) + 457 | _keyStr.charAt(enc2) + 458 | _keyStr.charAt(enc3) + 459 | _keyStr.charAt(enc4); 460 | } 461 | return output; 462 | }, 463 | decode: function (input) { 464 | var _keyStr = 465 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 466 | var output = ""; 467 | var chr1, chr2, chr3; 468 | var enc1, enc2, enc3, enc4; 469 | var i = 0; 470 | input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); 471 | while (i < input.length) { 472 | enc1 = _keyStr.indexOf(input.charAt(i++)); 473 | enc2 = _keyStr.indexOf(input.charAt(i++)); 474 | enc3 = _keyStr.indexOf(input.charAt(i++)); 475 | enc4 = _keyStr.indexOf(input.charAt(i++)); 476 | chr1 = (enc1 << 2) | (enc2 >> 4); 477 | chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); 478 | chr3 = ((enc3 & 3) << 6) | enc4; 479 | output = output + String.fromCharCode(chr1); 480 | if (enc3 != 64) { 481 | output = output + String.fromCharCode(chr2); 482 | } 483 | if (enc4 != 64) { 484 | output = output + String.fromCharCode(chr3); 485 | } 486 | } 487 | output = $.util.Charset.utf8_decode(output); 488 | return output; 489 | }, 490 | }; 491 | 492 | //青龙等模块 493 | function Env(t, e) { 494 | class s { 495 | constructor(t) { 496 | this.env = t; 497 | } 498 | send(t, e = "GET") { 499 | t = "string" == typeof t ? { url: t } : t; 500 | let s = this.get; 501 | return ( 502 | "POST" === e && (s = this.post), 503 | new Promise((e, i) => { 504 | s.call(this, t, (t, s, r) => { 505 | t ? i(t) : e(s); 506 | }); 507 | }) 508 | ); 509 | } 510 | get(t) { 511 | return this.send.call(this.env, t); 512 | } 513 | post(t) { 514 | return this.send.call(this.env, t, "POST"); 515 | } 516 | } 517 | return new (class { 518 | constructor(t, e) { 519 | (this.name = t), 520 | (this.http = new s(this)), 521 | (this.data = null), 522 | (this.dataFile = "box.dat"), 523 | (this.logs = []), 524 | (this.isMute = !1), 525 | (this.isNeedRewrite = !1), 526 | (this.logSeparator = "\n"), 527 | (this.startTime = new Date().getTime()), 528 | Object.assign(this, e), 529 | this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); 530 | } 531 | isNode() { 532 | return "undefined" != typeof module && !!module.exports; 533 | } 534 | isQuanX() { 535 | return "undefined" != typeof $task; 536 | } 537 | isSurge() { 538 | return "undefined" != typeof $httpClient && "undefined" == typeof $loon; 539 | } 540 | isLoon() { 541 | return "undefined" != typeof $loon; 542 | } 543 | toObj(t, e = null) { 544 | try { 545 | return JSON.parse(t); 546 | } catch { 547 | return e; 548 | } 549 | } 550 | toStr(t, e = null) { 551 | try { 552 | return JSON.stringify(t); 553 | } catch { 554 | return e; 555 | } 556 | } 557 | getjson(t, e) { 558 | let s = e; 559 | const i = this.getdata(t); 560 | if (i) 561 | try { 562 | s = JSON.parse(this.getdata(t)); 563 | } catch {} 564 | return s; 565 | } 566 | setjson(t, e) { 567 | try { 568 | return this.setdata(JSON.stringify(t), e); 569 | } catch { 570 | return !1; 571 | } 572 | } 573 | getScript(t) { 574 | return new Promise((e) => { 575 | this.get({ url: t }, (t, s, i) => e(i)); 576 | }); 577 | } 578 | runScript(t, e) { 579 | return new Promise((s) => { 580 | let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); 581 | i = i ? i.replace(/\n/g, "").trim() : i; 582 | let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); 583 | (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); 584 | const [o, h] = i.split("@"), 585 | a = { 586 | url: `http://${h}/v1/scripting/evaluate`, 587 | body: { script_text: t, mock_type: "cron", timeout: r }, 588 | headers: { "X-Key": o, Accept: "*/*" }, 589 | }; 590 | this.post(a, (t, e, i) => s(i)); 591 | }).catch((t) => this.logErr(t)); 592 | } 593 | loaddata() { 594 | if (!this.isNode()) return {}; 595 | { 596 | (this.fs = this.fs ? this.fs : require("fs")), 597 | (this.path = this.path ? this.path : require("path")); 598 | const t = this.path.resolve(this.dataFile), 599 | e = this.path.resolve(process.cwd(), this.dataFile), 600 | s = this.fs.existsSync(t), 601 | i = !s && this.fs.existsSync(e); 602 | if (!s && !i) return {}; 603 | { 604 | const i = s ? t : e; 605 | try { 606 | return JSON.parse(this.fs.readFileSync(i)); 607 | } catch (t) { 608 | return {}; 609 | } 610 | } 611 | } 612 | } 613 | writedata() { 614 | if (this.isNode()) { 615 | (this.fs = this.fs ? this.fs : require("fs")), 616 | (this.path = this.path ? this.path : require("path")); 617 | const t = this.path.resolve(this.dataFile), 618 | e = this.path.resolve(process.cwd(), this.dataFile), 619 | s = this.fs.existsSync(t), 620 | i = !s && this.fs.existsSync(e), 621 | r = JSON.stringify(this.data); 622 | s 623 | ? this.fs.writeFileSync(t, r) 624 | : i 625 | ? this.fs.writeFileSync(e, r) 626 | : this.fs.writeFileSync(t, r); 627 | } 628 | } 629 | lodash_get(t, e, s) { 630 | const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); 631 | let r = t; 632 | for (const t of i) if (((r = Object(r)[t]), void 0 === r)) return s; 633 | return r; 634 | } 635 | lodash_set(t, e, s) { 636 | return Object(t) !== t 637 | ? t 638 | : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), 639 | (e 640 | .slice(0, -1) 641 | .reduce( 642 | (t, s, i) => 643 | Object(t[s]) === t[s] 644 | ? t[s] 645 | : (t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}), 646 | t 647 | )[e[e.length - 1]] = s), 648 | t); 649 | } 650 | getdata(t) { 651 | let e = this.getval(t); 652 | if (/^@/.test(t)) { 653 | const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), 654 | r = s ? this.getval(s) : ""; 655 | if (r) 656 | try { 657 | const t = JSON.parse(r); 658 | e = t ? this.lodash_get(t, i, "") : e; 659 | } catch (t) { 660 | e = ""; 661 | } 662 | } 663 | return e; 664 | } 665 | setdata(t, e) { 666 | let s = !1; 667 | if (/^@/.test(e)) { 668 | const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), 669 | o = this.getval(i), 670 | h = i ? ("null" === o ? null : o || "{}") : "{}"; 671 | try { 672 | const e = JSON.parse(h); 673 | this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), i)); 674 | } catch (e) { 675 | const o = {}; 676 | this.lodash_set(o, r, t), (s = this.setval(JSON.stringify(o), i)); 677 | } 678 | } else s = this.setval(t, e); 679 | return s; 680 | } 681 | getval(t) { 682 | return this.isSurge() || this.isLoon() 683 | ? $persistentStore.read(t) 684 | : this.isQuanX() 685 | ? $prefs.valueForKey(t) 686 | : this.isNode() 687 | ? ((this.data = this.loaddata()), this.data[t]) 688 | : (this.data && this.data[t]) || null; 689 | } 690 | setval(t, e) { 691 | return this.isSurge() || this.isLoon() 692 | ? $persistentStore.write(t, e) 693 | : this.isQuanX() 694 | ? $prefs.setValueForKey(t, e) 695 | : this.isNode() 696 | ? ((this.data = this.loaddata()), 697 | (this.data[e] = t), 698 | this.writedata(), 699 | !0) 700 | : (this.data && this.data[e]) || null; 701 | } 702 | initGotEnv(t) { 703 | (this.got = this.got ? this.got : require("got")), 704 | (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), 705 | (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), 706 | t && 707 | ((t.headers = t.headers ? t.headers : {}), 708 | void 0 === t.headers.Cookie && 709 | void 0 === t.cookieJar && 710 | (t.cookieJar = this.ckjar)); 711 | } 712 | get(t, e = () => {}) { 713 | t.headers && 714 | (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), 715 | this.isSurge() || this.isLoon() 716 | ? (this.isSurge() && 717 | this.isNeedRewrite && 718 | ((t.headers = t.headers || {}), 719 | Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), 720 | $httpClient.get(t, (t, s, i) => { 721 | !t && s && ((s.body = i), (s.statusCode = s.status)), e(t, s, i); 722 | })) 723 | : this.isQuanX() 724 | ? (this.isNeedRewrite && 725 | ((t.opts = t.opts || {}), Object.assign(t.opts, { hints: !1 })), 726 | $task.fetch(t).then( 727 | (t) => { 728 | const { statusCode: s, statusCode: i, headers: r, body: o } = t; 729 | e(null, { status: s, statusCode: i, headers: r, body: o }, o); 730 | }, 731 | (t) => e(t) 732 | )) 733 | : this.isNode() && 734 | (this.initGotEnv(t), 735 | this.got(t) 736 | .on("redirect", (t, e) => { 737 | try { 738 | if (t.headers["set-cookie"]) { 739 | const s = t.headers["set-cookie"] 740 | .map(this.cktough.Cookie.parse) 741 | .toString(); 742 | this.ckjar.setCookieSync(s, null), 743 | (e.cookieJar = this.ckjar); 744 | } 745 | } catch (t) { 746 | this.logErr(t); 747 | } 748 | }) 749 | .then( 750 | (t) => { 751 | const { 752 | statusCode: s, 753 | statusCode: i, 754 | headers: r, 755 | body: o, 756 | } = t; 757 | e(null, { status: s, statusCode: i, headers: r, body: o }, o); 758 | }, 759 | (t) => { 760 | const { message: s, response: i } = t; 761 | e(s, i, i && i.body); 762 | } 763 | )); 764 | } 765 | post(t, e = () => {}) { 766 | if ( 767 | (t.body && 768 | t.headers && 769 | !t.headers["Content-Type"] && 770 | (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), 771 | t.headers && delete t.headers["Content-Length"], 772 | this.isSurge() || this.isLoon()) 773 | ) 774 | this.isSurge() && 775 | this.isNeedRewrite && 776 | ((t.headers = t.headers || {}), 777 | Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), 778 | $httpClient.post(t, (t, s, i) => { 779 | !t && s && ((s.body = i), (s.statusCode = s.status)), e(t, s, i); 780 | }); 781 | else if (this.isQuanX()) 782 | (t.method = "POST"), 783 | this.isNeedRewrite && 784 | ((t.opts = t.opts || {}), Object.assign(t.opts, { hints: !1 })), 785 | $task.fetch(t).then( 786 | (t) => { 787 | const { statusCode: s, statusCode: i, headers: r, body: o } = t; 788 | e(null, { status: s, statusCode: i, headers: r, body: o }, o); 789 | }, 790 | (t) => e(t) 791 | ); 792 | else if (this.isNode()) { 793 | this.initGotEnv(t); 794 | const { url: s, ...i } = t; 795 | this.got.post(s, i).then( 796 | (t) => { 797 | const { statusCode: s, statusCode: i, headers: r, body: o } = t; 798 | e(null, { status: s, statusCode: i, headers: r, body: o }, o); 799 | }, 800 | (t) => { 801 | const { message: s, response: i } = t; 802 | e(s, i, i && i.body); 803 | } 804 | ); 805 | } 806 | } 807 | time(t) { 808 | let e = { 809 | "M+": new Date().getMonth() + 1, 810 | "d+": new Date().getDate(), 811 | "H+": new Date().getHours(), 812 | "m+": new Date().getMinutes(), 813 | "s+": new Date().getSeconds(), 814 | "q+": Math.floor((new Date().getMonth() + 3) / 3), 815 | S: new Date().getMilliseconds(), 816 | }; 817 | /(y+)/.test(t) && 818 | (t = t.replace( 819 | RegExp.$1, 820 | (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) 821 | )); 822 | for (let s in e) 823 | new RegExp("(" + s + ")").test(t) && 824 | (t = t.replace( 825 | RegExp.$1, 826 | 1 == RegExp.$1.length 827 | ? e[s] 828 | : ("00" + e[s]).substr(("" + e[s]).length) 829 | )); 830 | return t; 831 | } 832 | msg(e = t, s = "", i = "", r) { 833 | const o = (t) => { 834 | if (!t) return t; 835 | if ("string" == typeof t) 836 | return this.isLoon() 837 | ? t 838 | : this.isQuanX() 839 | ? { "open-url": t } 840 | : this.isSurge() 841 | ? { url: t } 842 | : void 0; 843 | if ("object" == typeof t) { 844 | if (this.isLoon()) { 845 | let e = t.openUrl || t.url || t["open-url"], 846 | s = t.mediaUrl || t["media-url"]; 847 | return { openUrl: e, mediaUrl: s }; 848 | } 849 | if (this.isQuanX()) { 850 | let e = t["open-url"] || t.url || t.openUrl, 851 | s = t["media-url"] || t.mediaUrl; 852 | return { "open-url": e, "media-url": s }; 853 | } 854 | if (this.isSurge()) { 855 | let e = t.url || t.openUrl || t["open-url"]; 856 | return { url: e }; 857 | } 858 | } 859 | }; 860 | this.isMute || 861 | (this.isSurge() || this.isLoon() 862 | ? $notification.post(e, s, i, o(r)) 863 | : this.isQuanX() && $notify(e, s, i, o(r))); 864 | let h = [ 865 | "", 866 | "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3==============", 867 | ]; 868 | h.push(e), 869 | s && h.push(s), 870 | i && h.push(i), 871 | console.log(h.join("\n")), 872 | (this.logs = this.logs.concat(h)); 873 | } 874 | log(...t) { 875 | t.length > 0 && (this.logs = [...this.logs, ...t]), 876 | console.log(t.join(this.logSeparator)); 877 | } 878 | logErr(t, e) { 879 | const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); 880 | s 881 | ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) 882 | : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); 883 | } 884 | wait(t) { 885 | return new Promise((e) => setTimeout(e, t)); 886 | } 887 | done(t = {}) { 888 | const e = new Date().getTime(), 889 | s = (e - this.startTime) / 1e3; 890 | this.log( 891 | "", 892 | `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2` 893 | ), 894 | this.log(), 895 | (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t); 896 | } 897 | })(t, e); 898 | } 899 | --------------------------------------------------------------------------------