2024-07-14 22:58:54 +08:00
|
|
|
|
const _0x3ac826=_0x17da;(function(_0x5497de,_0xd7e2ca){const _0xf8248b=_0x17da,_0xf9fc6=_0x5497de();while(!![]){try{const _0x5ed347=parseInt(_0xf8248b(0x258,'3NOb'))/0x1+parseInt(_0xf8248b(0x248,'&JoE'))/0x2+parseInt(_0xf8248b(0x24f,'r5vK'))/0x3*(-parseInt(_0xf8248b(0x22e,'v3sn'))/0x4)+-parseInt(_0xf8248b(0x255,'GH6^'))/0x5+-parseInt(_0xf8248b(0x249,'r5vK'))/0x6*(parseInt(_0xf8248b(0x21d,'XP^Z'))/0x7)+-parseInt(_0xf8248b(0x1e4,'@7[K'))/0x8+-parseInt(_0xf8248b(0x214,'yI2H'))/0x9*(-parseInt(_0xf8248b(0x1e6,'Z#bg'))/0xa);if(_0x5ed347===_0xd7e2ca)break;else _0xf9fc6['push'](_0xf9fc6['shift']());}catch(_0xfce091){_0xf9fc6['push'](_0xf9fc6['shift']());}}}(_0x19b9,0x38f35));const jdCookie=require('./jdCookie'),notify=require(_0x3ac826(0x223,')Cnu')),common=require('./utils/Rebels_jdCommon'),{H5st}=require('./utils/Rebels_H');let tokensList=(process[_0x3ac826(0x1cf,'Dkfu')][_0x3ac826(0x209,'S$jw')]||'')['split'](/[,@&|\n]+/g)[_0x3ac826(0x274,'Gh5R')](Boolean),taskThreads=process[_0x3ac826(0x23c,'!dcg')][_0x3ac826(0x241,'rYjS')]||'1',accountThreads=process[_0x3ac826(0x242,'GlF#')][_0x3ac826(0x216,'rYjS')]||'1';function _0x19b9(){const _0x539947=['DSolWPL6','qCoGfwjDWQnZW5NcVdP5WQ4','DeavfNxcKmoor2pcONxdI2RdQcRcSrWIpu8YW4fWuSkZW7ddGCkdutuYW7rzWOtcMfJcTa/cPwu','WPGbWR09iCkvW4HQW6tcVhxcOW','WPZcKJ7cK8oiW4G','fSk+jCoeWO7cNxSZW5hcMaGeW5tcP8oV','xJ/cUGxcHa','lSkOcSoLW6OZwmolW75RbbldKe8PoCkne8kaWRrpWO0pWOlcUmoeoG','hmkXWRRcK8kipa','FmkuBHlcPSoUWPyjxSorz8kwW53cVKS','W60Vxa','4PY9D+IeTEACNEI/S+IJG+McMEwiGUs7J+MvUUITL8on','yCkeWPu','dUA1S+wlGowNV+EdUUEjLW','5ys3p+woJpgaV6O','W58oW4pdOG','vmolv3q','WQDSWPFdRG','WRXtsmkvdqzuW5qdWOVcPCoR','ss7cOG0','5RE65yMH5lQ+54M8aL3cTa','W4FcNmkq','tdZcPqxcLW0','5lMJ5PEZ5BsX56+Y','CuSpfhpcMq','dCk5WR/cK8k5j8ksWP4','FmkiAH/cGmoYWOK','nSoihL7cVCo5EsRcIr4LzmoZWRa','W6aLqCkE','rokDO8ke6k2k5Rkc5AAa6lwN77YG','W7NcVSkHx8k5za','WOhdQ8kdcJuedSoTkqe','W4/dTmkj','nmk1m8oCzCk5WPhdOSobmSkLW5zFcIO4qq','WPpcKJ3cSW','W6CjdSois31vW7KCWPtcP8oSW4tdO8kpWOdcTrNcSmks','W4PFW69S','WRPPWQhdVSo1l3PeWRWwW4RdKK0vm8kxW6lcNevc','Eeax','WP7cTmoi','W5nbjISXW5BdQq','z8oIc8ozWRySxW','W7HXCa','W4BdJ23dPmkkWO/dG8kaxdWCWQa','W5pcN8o/W6uFWRuVW7FdISkVECoV','pSofyJRcPSoLWO8T','5y2f6yEq5BYg5zgW54U+5OcHW5ddICk4vri0W4BdP1VdIa','pCoibhRcPSo+','W7pcRCocWQhdJ18','WORdQ8kzicqF','yCkDDZCp','pSopBdpcICoeWQiK','lN4ibcRcTq','FmkzDJCloNW','AmoZc8oHW7bLbmolW41+d1NdKriClSoghSklWPmKWQiqWP8','W5hcQXPAmvbhbXpdPSoSkSoFWRVcPLdcMq','uCo7rq','CCkLvKxdT8oFCXLiW6NdVhe','W4D3WQ7dQq','qsdcSq','W7ldVMGgdKtcJxdcOedcRmoY','W6ebaarFf2n4W4FcVa','W4TacdOKW5tdUqm8WOHhW6lcJ8kyv1/cL8o5bCkGW5DdW58Y','aXVcHmklpWJcMCkf','WOySW7tcISouWOXxtW','W6LTW57cQr7cI3xcHa','esCmWRa','W5/cLSkedq','W6Oybbi','5lIt55o75B2z5yALWOdcMSol','W4b1W7BcUmodWOfpyG','bH/cJmkBlqJcMmkfW5ddNmkvvW','pM0aahpcV8kpoSkpBu0','4PINWP3OHOpLR4/KUOVOVRZOOk7PLjZPMl/ML4tPLkZORBRNVyFPLOdORQe','tCoRrttcL1D8','5ysX57UQ5y2T8yQ1TG','W4P5WQFdQq','W5FcOci','4PMgWQ7ORidLHi/LR4RKUl7LVRJOPi3NM4RNJ4VLOj/LJ7BPHPxLKRBLH7xOVy/OO5ZOHQpMN6xVViW','W6/cRmk7qSkky1Tv','W4rkiq','gCkZqJiBW7O','W5VcGCkEaXVcMKpdV3q','W7X8CJy+sCkzWO3dJaW','W5vwiJS','W67cSmoZ','q3HyW6u','WRpdQCkT','W6hdLauHWQCE','q8oHfwfyWQbiW4JcIq1OWRa','DSkzCq','W7myaan/dv1K','WPBcKtBcUCoi','WQ7IN7TA4P6Ogq','BFcCK4u','776Z8lgjRq','i8k6W7a','5PYG5yUU5zQ+57IT5BYP','WO/dGte','6ycC552B5O2c6yctWPhcGYO','W4RdJLdcSq','WOiLW7tcMmo0','W6qLxW','htjbvLFdPW','5BA16lYP5yMs56Yj5yU35lUG6zMW','WRBcQdne','y8keW59nehFcPG','iwmk','6zwS6zMz5PsK6zwjW6qQBq','WOVdICkRWRq','xComWP3cISo1WOi0tSkvW63cT8on','WPVORPBMS6/LKyRLUlxcTG','WONdH8kH','hI0gWRldPtK','WOBdICkYWRja','5RAe5yMp5BAU57Us57Il5P++','W6CjdSois19tW6m4WOpcVmojW5ldMmklWOxcQHNcPmki','W5ZcKSkEdsRcV0FdQq','W7dcRmo+WRldG0iA','WPRdGSobtuRdPM/dI0r8FSk5','W5yFW6G','vCopW4FdT8k6W4u6tq','qeZdLmoiwvdcLCkLW7hdN8kRyW','ESkjB1hdNq','W4pdK1FcOSolW7m','mSocbh7cHSo3ysG','WPNcKYRcS8oiW44','WQWTnq','W5ZdGLJcT8olW6H8W5LeW5K','W6Cwdri','i20aaa','W4/cHI58WRxdKJyrW6/cJq','WRFcUa0','mrBcJW','WRXIWPK','W7CChq','WQ3cRdrxtbu','r8oLW6VdMSoqC8ocW4y3WPK','W5awW6RcNqm','W6NcVCocWRxdLKanWReTpmoMW5/cPmoLEXpcOmowabe','yN4EoJRcOmkmn8k3CeXtumkuW7OnqYXWfa','5PYF552a5AwP5zol77+R
|
|
|
|
|
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|