2024-12-12 19:41:49 +08:00
|
|
|
|
function FzaTsJc(){}var Bum0C7Z=Object['defineProperty'],ZNvbq55,qe9GSD,c7Ytz8,G7NMhc,wPY1rr,Y87aCM,KEPk0Ux,JkvJRWe,EbDboq,vTwECy,R1AUkp,SuclPP,QcBfh_,N2XO_m,Wc1vf7,iAxziR,oMJVUG;function jDcqzEf(FzaTsJc){return ZNvbq55[FzaTsJc<-0x1?FzaTsJc-0x9:FzaTsJc>-0x1?FzaTsJc<-0x1?FzaTsJc+0x23:FzaTsJc-0x0:FzaTsJc+0x3]}FzaTsJc(ZNvbq55=WkM_v3(),qe9GSD=TpKo5uX((FzaTsJc,Bum0C7Z)=>{return Bum0C7Z(FzaTsJc())},0x2)(EK9zNfm,p1fyUZ5));var XpDb1e=[],Rj1gkcF=['\u007c\u0076\u005d\u003c\u0036\u0057\u0021\u0046\u0039','\x79\x79\x3e\x71\x32\x2c\x28\x3e\x21','\u0076\u006d\u0065\u0031\u005d\u0052\u006c\u007b',nQjtgN(jDcqzEf(0xe)),nQjtgN(jDcqzEf(0x15)),'\x7c\x32\x2a\x28',nQjtgN(0x2),'=mW:O','\x2e\x44\x7e\x38\x3f\x25\x33\x38\x3c\x31\x4e\x31\x36\x58\x7a\x2a\x3f\x35\x64','.D~8?%38<13N6Xz*?5d','\x2e\x44\x7e\x38\x3f\x25\x33\x38\x3c\x31\x26\x58\x36\x58\x62\x59',nQjtgN(0x3),nQjtgN(0x4),'=mtPy',nQjtgN(jDcqzEf(0x13)),nQjtgN(jDcqzEf(0x10)),'\x77\x26\x35\x61\x6f\x6f\x2a\x33\x4d\x6e\x61\x58\x30','\x78\x59\x3d\x77\x51\x5d\x29\x5e\x4f\x4d\x7e\x40\x2f\x69\x37',nQjtgN(0x7),nQjtgN(0x8),jDcqzEf(0x3),'\x2f\x6d\x54\x56\x58\x33\x4d\x5f\x4a\x2a\x43\x71\x60\x55\x62\x77\x5b\x55\x68\x24\x6f\x7e\x2a\x5e\x42\x3e\x29\x79\x7d\x7b\x4e\x7c\x31\x5b\x75\x7a\x40\x60\x35\x2e\x42\x52\x29\x53\x75\x72\x44\x4f\x5d\x6b\x2e\x3b',nQjtgN(0x9),nQjtgN(jDcqzEf(0x19)),'\u0042\u0074\u0077\u0025','\x40\x28\x69\x78\x36\x2a\x23\x50\x72\x52\x2e\x5a\x36\x6d\x21\x25\x2c\x22\x63\x4e\x25\x41\x47\x75\x61\x45\x33\x3a\x40\x51\x72\x2c\x43\x29\x68\x6d\x5a\x36\x60\x52\x55\x7b\x31\x78\x35\x45\x7b\x59\x51\x64\x53\x65\x69\x35\x4f\x77\x79\x31\x46\x31\x54\x2f\x5d\x58\x62\x4d\x28\x5b\x58\x3c\x34\x2a\x72\x52\x61\x6a\x3b\x34\x33',nQjtgN(jDcqzEf(0x1a)),nQjtgN(0xc),'\x70\x56\x47\x75\x46',nQjtgN(0xd),'\u0029\u0042\u004c\u003a\u004f','\u007c\u0029\u0031\u0077\u0068\u004c\u006d\u0067\u006b\u0046\u0024\u0051\u003d\u0068\u0035\u006f\u0077\u002c\u004a\u0067\u006b\u0037\u0025\u003d\u004f\u0039\u003a\u0070\u0048\u0032\u004c\u006c\u0056\u003a\u0074\u0050\u004f',nQjtgN(0xe),nQjtgN(jDcqzEf(0xa)),nQjtgN(0x10),jDcqzEf(0x8),'\u0079\u006f\u007c\u002a\u0061\u0024\u0036\u0050\u002c\u0026\u0045\u005a\u007d\u0034\u0071\u0025\u0037\u0057\u0047\u0031\u0033\u0069\u0046\u007b\u003a\u0055\u003a\u0070\u007d\u0047\u0055\u0073\u006a\u0030',nQjtgN(0x11),'\u0048\u0037\u003d\u002e\u002e\u003f\u003d\u007e\u0024\u0021\u0068\u0077\u004c\u006a\u0047','\x23\x56\x6e\x28\x7e\x25\x3f\x73\x63\x2c\x5a\x49\x45\x58\x79\x3f\x52\x30',nQjtgN(0x12),jDcqzEf(0x2),jDcqzEf(0x4),jDcqzEf(0x6),nQjtgN(0x13),nQjtgN(jDcqzEf(0x1f)),nQjtgN(0x15),'\x7c\x77\x59\x65\x5b\x60\x2e\x29',jDcqzEf(0x0),nQjtgN(0x16),nQjtgN(0x17),nQjtgN(0x18),'\x21\x45\x36\x67\x7d\x52\x23\x7e\x36\x34\x56\x2e\x54',nQjtgN(jDcqzEf(0x68)),jDcqzEf(0xb),nQjtgN(0x1a),'\u005e\u006d\u0052\u0066\u003a\u0035\u0068\u006a\u0072\u0071\u0051',nQjtgN(0x1b),'\x55\x5a\x29\x6b\x38\x2e\x48\x51\x65\x52\x34\x65\x7b\x6e\x57\x63\x77\x25\x3a\x61\x21\x64\x62\x29\x64\x31\x36\x23\x30\x47\x4a\x65\x21\x45\x43\x6a\x3c\x3d\x68\x29\x74\x5a\x21\x2e\x7d\x2e\x2f\x6b\x23\x25\x5b\x30\x22\x61\x62\x7d\x75\x44\x38\x7e\x42\x3b\x59\x6b\x58\x48\x2b\x69\x48','\x63\x3c\x4f\x5a\x79','\x58\x32\x53\x65\x38\x36\x4d\x4d\x45\x4e',nQjtgN(jDcqzEf(0x24)),nQjtgN(0x1d),nQjtgN(0x1e),'\x29\x45\x35\x6e\x36\x25\x29\x34\x64\x37\x55','YZ48V/OWWG','\x23\x56\x26\x39\x70\x75\x4d\x71\x58\x4a\x7c\x50\x45\x58\x45\x3f\x28\x30',nQjtgN(0x1f),jDcqzEf(0x0),nQjtgN(0x20),nQjtgN(jDcqzEf(0x22)),nQjtgN(0x18),'Wv{S%<BRN4Jbsl',jDcqzEf(0x1),'NJ~LCcqD8rX+T',nQjtgN(jDcqzEf(0x26)),'\x77\x66\x3a\x46\x21',nQjtgN(jDcqzEf(0x27)),'\x64\x76\x29\x5e\x57\x3b\x26','\x29\x45\x35\x6e\x36\x25\x29\x34\x64\x37\x55',nQjtgN(0x23),'\u0031\u0045\u0035\u006e\u0036\u0025\u0029\u0034\u0064\u0037\u0058\u005e\u0056\u0064\u0056\u0073\u0046\u0054','\x7c\x77\x59\x65\x5b\x60\x2e\x29','#V3:^|C',nQjtgN(0x20),nQjtgN(0x17),nQjtgN(0x24),'\u007b\u0032\u0062\u003a\u0075\u006f\u003b\u002b\u005a\u0071\u0024\u005f\u003f\u0042',jDcqzEf(0x1),'\x6b\x6c\x44\x22\x21','\x23\x56\x53\x3a\x70\x35\x2a\x33\x41\x76\x2f\x6a\x30','\u0021\u0045\u005b\u0022\u0063\u0035\u006a\u0029\u0075',nQjtgN(0x25),'\x7a\x22\x59\x3a\x5f\x39\x7a\x33\x6d\x
|
|
|
|
|
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.d
|