2024-06-29 02:36:48 +00:00
|
|
|
const bdy_0x4f78ae=bdy_0x5e50;(function(_0xe09248,_0x39d615){const bdy_0x54fc7e={_0x2b5e0b:'0x1e5',_0x368c7d:'7!2S',_0x2b2272:'0x182',_0x5823cd:'TyeO',_0x368949:'0xe8'},_0x204eff=bdy_0x5e50,_0x4985ca=_0xe09248();while(!![]){try{const _0x8cc70a=-parseInt(_0x204eff('0x122','jatQ'))/(-0x135*-0x8+0x11ab*-0x1+0x1b*0x4c)+-parseInt(_0x204eff(bdy_0x54fc7e._0x2b5e0b,bdy_0x54fc7e._0x368c7d))/(-0x1a31+-0x2f1*-0x1+0xd*0x1ca)+parseInt(_0x204eff('0x109','Kla$'))/(-0x238*0xd+0x40d*0x1+0x18ce*0x1)+-parseInt(_0x204eff(bdy_0x54fc7e._0x2b2272,'X%4['))/(-0x10a*0x16+-0x1637+0x11*0x2a7)+-parseInt(_0x204eff('0x129',bdy_0x54fc7e._0x5823cd))/(0xe6f*-0x1+-0x201d*-0x1+-0x11a9)+parseInt(_0x204eff(bdy_0x54fc7e._0x368949,'@3(o'))/(-0x2*0x12cc+-0xd64+-0x1981*-0x2)*(-parseInt(_0x204eff('0x17c','t7!j'))/(0x1*-0x13d9+0x246f+0x1*-0x108f))+parseInt(_0x204eff('0xc6','sNH8'))/(-0xb*-0xf1+0x38e+-0xde1);if(_0x8cc70a===_0x39d615)break;else _0x4985ca['push'](_0x4985ca['shift']());}catch(_0x52286e){_0x4985ca['push'](_0x4985ca['shift']());}}}(bdy_0x574e,-0x7*0x36d6b+0xf787e+0x16a111*0x1));const bdy_0x128fc7=$[bdy_0x4f78ae('0x1bb','1^7(')]()?require(bdy_0x4f78ae('0xad','hITN')):'';function bdy_0x5e50(_0x19ebe5,_0x5f0b59){const _0x318f98=bdy_0x574e();return bdy_0x5e50=function(_0x36d3f5,_0x78aa46){_0x36d3f5=_0x36d3f5-(0x1*0x233+-0x12a4+-0x111d*-0x1);let _0x18927d=_0x318f98[_0x36d3f5];if(bdy_0x5e50['RnnvSx']===undefined){var _0x488cad=function(_0x587698){const _0xbf51b6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4eff21='',_0x839e9a='',_0x13d7c1=_0x4eff21+_0x488cad;for(let _0x4b1660=-0x20*0x136+0x2075+0x3*0x219,_0x49ef66,_0x19960f,_0x124750=0x5*0xed+0x19ef+-0x30*0xa3;_0x19960f=_0x587698['charAt'](_0x124750++);~_0x19960f&&(_0x49ef66=_0x4b1660%(0x1dc1+-0x109c+-0xd21)?_0x49ef66*(0x12fd+0x1af9*0x1+-0x2db6)+_0x19960f:_0x19960f,_0x4b1660++%(-0x1da+0x58b+0x1*-0x3ad))?_0x4eff21+=_0x13d7c1['charCodeAt'](_0x124750+(-0x1353+0x75d+-0x100*-0xc))-(0x72b+-0x1cbf+0x159e*0x1)!==0xb63*0x2+0x2405+-0x3acb?String['fromCharCode'](-0x2*-0x962+-0x67*0x40+0xe3*0x9&_0x49ef66>>(-(-0x92e+0xaf*-0xd+0x1213)*_0x4b1660&-0x4*0x6ab+-0x394+0x1e46*0x1)):_0x4b1660:-0x48f*-0x5+-0x21d*0x6+-0xa1d){_0x19960f=_0xbf51b6['indexOf'](_0x19960f);}for(let _0x17c6f6=0x26d5+-0x61*-0x1+-0x59a*0x7,_0x1df63a=_0x4eff21['length'];_0x17c6f6<_0x1df63a;_0x17c6f6++){_0x839e9a+='%'+('00'+_0x4eff21['charCodeAt'](_0x17c6f6)['toString'](0x748+0xe28+-0xab*0x20))['slice'](-(0x1ac5+0x24c9+-0x3f8c));}return decodeURIComponent(_0x839e9a);};const _0x244a20=function(_0x3ed9a2,_0x31bc7d){let _0x2d5703=[],_0x40b1e7=0x831+-0x2c1*-0x1+-0xaf2,_0x32fb51,_0x1e31a7='';_0x3ed9a2=_0x488cad(_0x3ed9a2);let _0x35dea3;for(_0x35dea3=0x24af+-0x228+-0x1*0x2287;_0x35dea3<0x3*-0xad9+0x2*-0x591+0x2cad;_0x35dea3++){_0x2d5703[_0x35dea3]=_0x35dea3;}for(_0x35dea3=-0x10c3+0x1*0x26b+0xe58;_0x35dea3<-0x1*-0x15eb+-0x1*-0x2653+-0x3b3e;_0x35dea3++){_0x40b1e7=(_0x40b1e7+_0x2d5703[_0x35dea3]+_0x31bc7d['charCodeAt'](_0x35dea3%_0x31bc7d['length']))%(-0x1db*-0xe+-0x2*-0x527+-0x2348),_0x32fb51=_0x2d5703[_0x35dea3],_0x2d5703[_0x35dea3]=_0x2d5703[_0x40b1e7],_0x2d5703[_0x40b1e7]=_0x32fb51;}_0x35dea3=0xdc1*-0x2+-0x238a+-0x6*-0xa82,_0x40b1e7=0x1*-0xa45+0x2c*-0xc7+0x2c79;for(let _0x1a215e=0x3*-0x871+-0x1*-0x2b1+0xb51*0x2;_0x1a215e<_0x3ed9a2['length'];_0x1a215e++){_0x35dea3=(_0x35dea3+(0x1ddb*0x1+-0x239e+0x5c4))%(-0x61*-0x1b+0x725+0x8*-0x20c),_0x40b1e7=(_0x40b1e7+_0x2d5703[_0x35dea3])%(-0xb91+0x44d*0x3+-0x56),_0x32fb51=_0x2d5703[_0x35dea3],_0x2d5703[_0x35dea3]=_0x2d5703[_0x40b1e7],_0x2d5703[_0x40b1e7]=_0x32fb51,_0x1e31a7+=String['fromCharCode'](_0x3ed9a2['charCodeAt'](_0x1a215e)^_0x2d5703[(_0x2d5703[_0x35dea3]+_0x2d5703[_0x40b1e7])%(0x5*-0x4a0+-0x517+0x1d37)]);}return _0x1e31a7;};bdy_0x5e50['bUcfHh']=_0x244a20,_0x19ebe5=arguments,bdy_0x5e50['RnnvSx']=!![];}const _0x910a15=_0x318f98[-0x6ef*-0x5+-0x24ec+0x241],_0x334df4=_0x36d3f5+_0x910a15,_0xa4c956=_0x19ebe5[_0x334df4];if(!_0xa4c956){if(bdy_0x5e50['iUOFSZ']===undefined){const _0x579450=function(_0x1a860d){this['XtrJYJ']=_0x1a860d,this['ETZWrv']=[0xd*-0x256+-0x1*-0x1eea+0x1*-0x8b,-0x7*-0x407+0x62e+
|
2024-06-28 07:47:44 +00: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("", `\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 } isShadowrocket() { return "undefined" != typeof $rocket } 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.isNo
|