|
|
|
|
const _0xb2d40a=_0x1bc5;(function(_0xe51ec5,_0x291d33){const _0x46f0e4=_0x1bc5,_0xb88295=_0xe51ec5();while(!![]){try{const _0x334d09=-parseInt(_0x46f0e4(0xc4,'Wjhz'))/0x1+-parseInt(_0x46f0e4(0x162,'Y#Hz'))/0x2+-parseInt(_0x46f0e4(0x123,'Y#Hz'))/0x3+parseInt(_0x46f0e4(0xc6,'#sGx'))/0x4*(parseInt(_0x46f0e4(0x146,'Nq%l'))/0x5)+-parseInt(_0x46f0e4(0x143,'!pI2'))/0x6+parseInt(_0x46f0e4(0xe0,')POe'))/0x7+parseInt(_0x46f0e4(0xee,'5TlR'))/0x8;if(_0x334d09===_0x291d33)break;else _0xb88295['push'](_0xb88295['shift']());}catch(_0x23bcac){_0xb88295['push'](_0xb88295['shift']());}}}(_0x24c9,0xb3cc2));const jdCookie=require('./jdCookie'),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0xb2d40a(0xda,'uX%k'));let taskThreads=process['env'][_0xb2d40a(0x10c,'1#3M')]||'1';function _0x24c9(){const _0x781a1e=['h8o/W7FcPZ7cQ27dMwzbWP5WW5/dQa','zNZdKW','W7lcP8krWPi','W5BdGeaO','zsT8W7e','WOddOvFdG8kkCxajW5RdN8kFjmkXi8o5lmkNCfNdQsHpka','W7/dQ37cKCknW6a2W7WPW54eoKDWcCoDfmkCW4e','WOLcW5NcGN7cVSoE','W4VdQZdcRCk0AG','cMe9aColWOGAW6KEWQrXteNcGSoCW70+W7aEWQRcOq','geiS','idvoCmkLDaHnWR/dH8owyY0','c08mfs0','WRGdbIRcOCkXja','WRSygItcVW','kZbU','4PYMh+IfPUADLEI+MoIHH+McGowiNUs7N+MvMEITPIi','hLhdLmknWQddIG','b+IVNoAYI+wNR+I1GupINiRdVW','W7dcUmkCW5NcUZNcISk8a8kRWR8p','iCoZztm','tKxdUa0Wxq','eCoYe8k6W6ddMI4AsaG4gHRdVx/cRW','WOr0adlcKCocW6FcThhdGrNcV8oxzW','Cc3cKq','bLhdTmkHW6vvFJ7cGGhdNmkBWRBcVW','W5ZdOci','4P++WQxMNPBOG7tMRRFNORpLPydNKkOc','w8kNWPxcTa','WOjdW5xcGM7cU8ovWRW','WPL4ofb2g37cSmo4wHKBW7C','W7/cRCkqWPpcHhlcJCk3w8kTWPmnWQbRkSkmW64wjXhdRa','AmknAxW','6zw16zUB5Ps66zESWRK4WQu','5lQX6kYg5y2d772G5yY16AcT5y2W','W48GEWy','eSo4cCkw','6AoW5y2b5Aww6lEwW5u','BrZdPspdV1G','W6K3W7PloKezW55sbCoJW5NdI8khivpcRCk1','W7POWPS','zXRdRHldQfG','W4ldJK05W4T/W4G3','qu/dUaKqvmoEWQe','W7ddUN7cRCkFWQ58WQa1WQPAjZ9/h8kahSkCW4i','jCo5DrRcVI7dRwSSW4W7WPPeW5G','ASkrFNaxWP4','pNuVWQ1mWO0nWQy','WPejW6tdVcxcNSkHW6ldHmktW4zFWOpdV8kbf8kIF8krW63dJq','W4BcULBdH8kqjYWjW6NdISkuB8kWFSomiSoTufNdQwPdkSkcW75JFmkhWPRdTSonwCkhW5y','5lQ56lga8kkXSG','WRhdSuiu','WP9UWRK+bSkfWQaPgSkOcmkYWQmiW7RcV8oj','eKmQvCkyhCkOW6u','4PYOjoADSUEEGoITRUAYR1C','amovWR0wA8kNa8otWOfOfchcHcqSDW','W4pcR0ZdGSkcCubjW6tdLSkyiSkPgCoiiSkMsW','WO8yW57dQb7cLq','W7/cP8kc','gCkpW4ZcJ2JdGmkowaFdLSoWWPK','44gL6lEg5yY/','6lsS54IA6l2w6lcG5yQA6kgc5Asl6lAaWQK','ngKPWQbnWOW','hLVdNq','r07dOa','FevWW4FcO8kYySoMACod','W5ZcU0ZdSSknEq','BbldSG','W5ldILaDW615W50RDgldOamPzG','bfal','t0xdPrKLuSoi','bmo2WQZcSLJcRq','f+kFTmoL','kCkeWRZdKtdcMmoMW5v5tSo9bSkH','qSoFWPVdNt7cHCk7','W7lcTqbnwePkW494','bmo8WQu','W5RdNuaOW61CW5u3rMxdJWiX','CmkLnMhdON7cTuWUW5ylWQDu','6lA854QH6lYH6lkX5yUb6kg/5AEr6lE9DG','wW3cQ8oZWQak','W5tdRZRcRCk2y8k2WQP2W7LHxZzqAZddRmkL','b14m','CSo/lG','5Bsn6k+s57+V6lwR6l6W6lYR6kka5B+E5yU/6lEq5y2Y','f3aQdmo3WOOEW6ar','fmkqWRJcPCkW','W7BcRCkbWRlcPgxcJ8kQymk7WRC','WOv/WPuX','W5FdQZhcVmkfASkyWQPSW7bhuY15zZtdI8k4WP1Fra','o34IWQznWOe','eSkfWRZcJmkNnCoiW5NcRv5p','FCoDW6W','mmo5CtpcSd0','W77dIMa','W4BcHcy','pCoFxf7cJe8Sna','AxZdMmo5WPZcPflcKCkAscLCW6W','W5JdOCoJBSkJWRSGC0ZcRComW4zCoG','W6JdIh8pWR8','WQWFbG7cO8k5','W6VdRSoMW7LOWPXCW4S','nhqOWQq','h13dLa','W7bSWP/dN8kSqmkcifVdJa','W7VdOw7cUa','AxldGmo2WPe','W7OzvW','6lAN5y646lYl5RM3WRK4WQu','W5KIvG','jSkMFSk3lSkBWR04wmkSlmkQW6S','mvVdLmkEWRhdJmoBlsldPMxdIa','aX8/yG','WQzFDmksaSkCtmo3','gL05vCkegSkSW6ldGCkIy8kVfHBdS8ktyCkvkCoqWPZdI8oFWRerFhvzWRjMWOFdU34','WQy5W5ZcOmo5bSoddfVdISkaBCkl','deWGtq','W552WR7cGCo1BXtdKa','w+IVMUAWI+wKIoI3IfNINzhcTUAvIowqGow6MEAxSoAmGa','bKbRWQJdLCkg','8jUQNdq','5RoS5P+P5yYw6AoK5y2C55U+5lQk6lgu','WQtORQhMS5BLK7pLU48n','cXeS','lJf6EY7cVa','eK5SWRO','h0W9wa','j8keWQyfW70CqK0AW5ddQMnGWPlcON8','8jI4U2K','5lU155o25B6x5yAcW7pdLv8','rKhdOGS','6AoZ5yY25OUy5yMwW69N','W5S0Fa8','W4XVWR7cGq','W7mlrmkw','fNe2imo3WOK','qaNcRmoGWOaliwS','DqhdTWm','W4CUAa','su7cRmk6nGBdU8kWW5ZdQSkfWOLSWRBcPCoWoSkRsCkWWO8','gmouWPiDFCkIaG','ESkRm2ddP3/dRhmQW5qPWPG','6yoV55+V5O2o6ygys8odWP8','lYT9BI/dSNNdRKJcGmk3cSkjdCotwfKQW75RoI1UzSkDWOBcQ8kPW4tdKCo6WRhcUCoB','bbeNB3iVqJLPWPZcNSkcW40','6lwt5yYx5PsO5PAb','5lUu6loC8l+JKG','D1zGW4m','44ku5O6g56AU44cV6k6S5ywL6i+T5y2NFqBdQCorW5BcOa','WQi6W
|
2024-07-16 00:24:38 +08:00
|
|
|
|
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"])
|