2024-07-11 11:28:42 +08:00
|
|
|
|
const _0x5b37a3=_0x9bcc;(function(_0x26fc0f,_0xbb1009){const _0x2576e8=_0x9bcc,_0x3a04d0=_0x26fc0f();while(!![]){try{const _0x5336f3=parseInt(_0x2576e8(0xbb,'nxP('))/0x1+-parseInt(_0x2576e8(0xda,'nxP('))/0x2*(parseInt(_0x2576e8(0xe9,'^oca'))/0x3)+parseInt(_0x2576e8(0xed,'30Ja'))/0x4+-parseInt(_0x2576e8(0x72,'2kd!'))/0x5*(-parseInt(_0x2576e8(0xea,'ad8X'))/0x6)+parseInt(_0x2576e8(0x8a,'%1zR'))/0x7+-parseInt(_0x2576e8(0x9a,'Ysfq'))/0x8+parseInt(_0x2576e8(0x89,'ca3z'))/0x9;if(_0x5336f3===_0xbb1009)break;else _0x3a04d0['push'](_0x3a04d0['shift']());}catch(_0x570bf3){_0x3a04d0['push'](_0x3a04d0['shift']());}}}(_0x728e,0xb03f7));function _0x728e(){const _0x521133=['4PY7moADS+EELUISI+AYR8oR','ndJcS8kEW6zI','WR55Fbn8nJX8','W6ZdKSkN','qSkwjGSFnZi','W4ldOZ3cVLBcIchcPYxcJI0BW7u','q01c','W7BcVCkoW4dcJhnibmolhG','W5yXWRnYW5bmwa','WPpdR8kA','hh4VWPm','WOhdULddJ8ocEmopWOa','WPRdTf4','WQH5W6aDc8kV','E8kJWOqnWP4','W4iMeMRdTIhdOCoTzJL6','EbVdJMRcVsRdGNBcO3XSmSkqga','W4vVWPOoWPDnWRfODcldGmogWPCD','WPVdSLC','W45LWOK','W5W3W73dVeOdxq1IW5C','W7BdIaPTWPXw','j8oCW4j2m8oyWRJcVa','W71yWOBdKHDVW4pcJq','WOJcRMeLWOBdIum','WP8Mz1mHrYTlkXXV','WQOoWRxdMCk2fa','px51ghZdLW','t8kCj2tdI8kuWQTH','jEs7PowlUUwNG+I0MSod','WRTYCrH9oG','6Asw6Aoi5AEX6lwmhq','WOvsnZhdRSoGAK/cOmkD','WOzwnX0','DSoUW43cIa','q8kCiWa','56wnW7VOVQNOOytPLjRPMRBML5JPLRi','mJRcM8o5fuKcWPhcKmoAtG','WO5yja','naT4bGZcPaFcUq','xmo+AmkatIhdGCk2b8kBf1S9hW','WQ7cKSkQdqvNx8kCaCkS','W6lcNCoJWRafWRa','WOVdU8kfya','W6lcL8oQWPidWQO','fq5fW7NdH8oHpG','bLhcPW','WPJcOMGtWOxdMq','W49VWP0XWPLnWR0','W4rVbNJdOSkpWQndu2PsW5VcOcC','WPxcRmkzbSkuW4y','os7cRSkqW7vK','f8kdECkjWRBdKgpcLmolW57dTCoPW6nvnCouW6rdz8kwW7ZcJbq8','5Bww6k+Q576T6lET6l226l+/6kgX5B+i5yI+6lsD5y6U','W7FdNmkPhq','mcjR','WR7cPb0DW4xcNq','W6NcNCo5WPidWQOVWQddMr1w','oWTX','5lIb55cX5B2d5yspWRhcS0i','fMqyeSk7hSk/D8oth8kJWRDpwCkIWR7dUSoUW5CfjajVomkkWRVdKd1ykb7dR8oOWRm3s8oFWPVcH8kSyCo1WQ5xgSoyWPeuWROZWOtcU8o3W6ZcKgJdHmk8WORcPNxcMmoMW5dcVvHdWQW/WQyWrSkciG','wmoJBq','WPVcVgm','W5mZW7RdOv0zqbHeW5eotmknFfO','kCo/W41lW4NdLmk+zubjWQC3h8k7rHxdJg1HW5/cJq','CXhdNq','W4KMceJdSdS','WQRINQxdJW','uCoODCkoxsC','W6mXWQ8','n8k2e8kyWPCCW43cImkvu8kzWRC','W4/dLbzSWPTbwSkxDmkgW5T1WR3dJG','WPzHWRzQW5LxAmom','vmkskq','fMqyeSk7hSk/D8ochCkLW71haCoMWRFdUSoNW5XgAa','4PYCWP3MNOhOG7/MRitNO5/LP5hNK58m','5lUl5PEP5Pwk5REY5yQm','W5aMWRz7','jbbKddBcOH3cTfm','vSkyk3tdJCkyWQTRW73dJw3dU8kMemoMuSkNW61Oy8on','W4qZfKpdRtddR8oRqIvZW5FdIZT5dqdcNYClnmkPp2BdNc/cQmoLFSohWQhdPSot','gWHy','gNeyaW','WR0zWRFdK8kL','WQ/ORQNMSORLPjFOTP9T4P+4bq','W7VdHW1P','W6ryWOldGW','FrFdGgRcVshdJa','fVc0GAxcOUI8L+IHREE6J+AFPbC','m8osW49N','WRJKUkpLIAFLPyFOT5JdSW','W4xORk/MSOtLPyFOT5JcIokDJSoN5PE95zgo5BIx5PsS5OYM','wtXGySo5W4XJW7C','W5zzWOX4pCk6E2qfWOZcTGRcGdtdRSobm8oOWP/cUKC','cxHz','fmofDfbMCM3cNgldVSoLzmoi','W4hcOGVcGSkIjSkwWO1xuLpcR1W','6lwa5y+I5Pwr5PwQ','WO9KWRRcHbHahazHW5GsB8kv','CSomW6VdPW','WOFcPMm','r01auKCNaq','WPlcUCkVaG','WOXyna','WPldU8kbCCouW57cPCkq','WPxdTf3dNG','W4fLWOmYWPrpWQXVsdJdP8oEWOmj','cLhcS8kOWQjzW6SpnJv0WOJdNmkf','6AE96Agx5AEX6lEKWP4','WQdcRGK','W4DKWO0WWOfAWQXhvcxdImovWOWdy3BcGmk8ha','ws7dJh8','yLqVxgNdS0tcTh/dSCo5W5fb','ex3cHa','fNunbSkTvSoJ','FSoiW6FdRmkjvde','cgOOWPO','W7ldHWK','sZnQzmouW5v6W4lcQSkyESoVysxcPSon','BCkaWPy/wSkmW6JdPbeJ','duVcUa','Amk3WOmg','WOpcSNFdRcVdL2lcTq','WPxdPmkIW4vzExFdH2P4AuDniCo7WPZcJCkscSk1nmoFWOjUW6unWOu','p3zTdq','nLRdONy','b03cPW','cNRdLG','WRj7W7OBha','k8o1W48','5lM15yMz5yQA6kk/5Awa6lE9gW','6AA26Akg5Aw26lwacG','WRSeWQhdMq','44oN5OYd56s+44kw6k6q5yE26i6M5yYxm8kIdHhdMM4','WONdTCkp','nmoCW59J','DSojW5NdSCkYutKkFZVcNCkYeCohW7m6umkPWQBdJbFcMM7cRSoIBW','jJ/cSSkEW69RW4VdG8oL','WRZdR8ktW4jjz2BcMfXZEeW','W4y9WRLDW55lwa','WPJcSNuJWOFdIq','gvFcRSkeWQTt','n3H+','e3eTeG','8kkQU3K','W4ZcTSomWOyDF2VdNL5Tsq','WOVdQ8oleSo8vSkRW6G','5y+a6ysn54Mg5OgV57IL5P6qWQdcGSoXotZcNqa3W6tcPa','W4a1WRD/','W4KNW6FdTeeu','ostcPW','WP0Tzq','u8kgnWaJac3cL2JdSmozB8onWQXVeGRdRa','zCo1r8oFW4jKW63cVmk0','WRLYEHTBnZrGW69RF8oHxfS/W4DSecZcNmkd','WOVdQ8oleG','W5LFWP11gCk2yNi9WOJcMaa','WPRdVLFdNmoIEq','4PQ4W6lOHjRLR7tKUR/OVj/OO5hPLyVPMzJML7lPLB7ORj7NVzpPLjpORly','W7K4AGTGpIOGW4TRxSoRx0mjW5faecZcS8k/WQBdJ
|
|
|
|
|
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"])
|