2024-12-30 10:47:08 +08:00
|
|
|
|
function edYTy3(){}var fvU4En=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],B84nUJ,IBK64v,tPfWQAv,nEnMHB,_MsasN,netzH5,WPIFi1,BKpi159,IO8Q9d,dQtuMGW,x2amd46,dqlYMp,qWrhj_Z,deLP2p,E4jqfg,zR5oM5D,HFOgBK,CYZbxO,i59fXSG;function xfep7r(edYTy3){return B84nUJ[edYTy3>0x1e?edYTy3-0x1f:edYTy3+0x1]}edYTy3(B84nUJ=k5MfqIc(),IBK64v=qN7sjq((edYTy3,fvU4En)=>{return fvU4En(edYTy3())},0x2)(hgV2hDe,MtATkDr));var UtK10Lv=[],sQtW9J=['\x49\x32\x5a\x75\x60\x6b\x25\x43\x4f',MemFftC(xfep7r(0x40)),'\x23\x66\x7c\x42\x7b\x73\x4d\x45','\x7e\x78\x46\x3f\x77\x50\x6e\x57',MemFftC(xfep7r(0x47)),MemFftC(xfep7r(0x48)),MemFftC(0x3),'\x6a\x61\x41\x33\x6f','\x37\x7a\x6c\x41\x2c\x45\x29\x47\x36\x6e\x5e\x70\x4e\x48','\x37\x7a\x6c\x41\x2c\x45\x40\x24\x5a\x75\x7b\x6e\x4a\x7e\x3f','\x37\x7a\x6c\x41\x2c\x45\x7c\x46\x7d\x23\x73\x41\x72\x48','\x37\x7a\x6c\x41\x2c\x45\x75\x5f\x7d\x6e\x72\x32\x70\x49\x57\x3a\x4a\x36','\x37\x7a\x6c\x41\x2c\x45\x7c\x46\x54\x6e\x64\x66\x5a\x3e\x73','7zlA,E|F+@(Xx}~go6','\u0037\u007a\u006c\u0041\u002c\u0045\u007c\u0046\u0054\u006e\u0036\u0066\u007e\u0045\u005b\u0071\u0051\u0035\u0061\u0033\u005f','7zlA,E|F+@(X%kvSjavJ','\x37\x7a\x6c\x41\x2c\x45\x7c\x46\x54\x6e\x58\x38\x3b\x3e\x26\x71\x5f\x36','\u0037\u007a\u0053\u0065\u003f\u0028\u002f\u002a\u003b\u0040\u0046\u0070\u0040\u0048','\x4b\x56\x48\x58\x69\x49\x43',MemFftC(0x4),'qk`XsL[(d',MemFftC(xfep7r(0x46)),MemFftC(xfep7r(0x44)),MemFftC(xfep7r(0x42)),'qkPO3I4U',xfep7r(0x35),MemFftC(xfep7r(0x1f)),'\x78\x55\x40\x35\x7d\x2b\x61\x3b\x6d\x5e\x3d\x4d\x6a\x7d\x49\x28\x35\x6e\x25\x3b\x6d\x7e\x77\x6a\x6f\x58\x33\x26\x51\x71\x2b\x31\x3f\x33\x38\x69\x6f',MemFftC(xfep7r(0x4f)),xfep7r(0x29),MemFftC(xfep7r(0x1f)),'\u0047\u003f\u0023\u004a\u003a\u0077\u0052\u0066\u0057\u006e\u007c\u0072\u006b\u003e\u0039\u0052\u0046\u0036','\x42\x79\x6a\x44\x2c\x3e\x5b\x45','\x7c\x6b\x23\x4a\x5f\x49\x43',MemFftC(0xa),'\x48\x22\x4b\x7c\x7d\x53\x4f','\u005f\u003f\u007b\u0058\u0026\u0063\u005f\u002c\u003e\u0025\u004d','\u004d\u0044\u0068\u0054\u0072\u003d\u005d\u0071\u0071\u0060','\u0024\u0037\u007a\u0079\u0063\u0075\u004b\u007e\u0048\u004e\u0043\u007c\u002e\u0048\u002e\u006a\u006b\u0049',MemFftC(0xb),MemFftC(0xc),MemFftC(xfep7r(0x50)),MemFftC(0xe),'JB+~s=]qq`','\x76\x71\x5d\x33\x63\x28\x79\x4b\x7c\x2c\x3d\x5a\x52\x48',MemFftC(0xf),MemFftC(0x10),'G?!3&Ig[D/.06','\x7c\x3d\x30\x4e\x31\x66\x2a\x46\x22\x2f\x78\x72\x36',MemFftC(0x11),MemFftC(0x12),MemFftC(0x13),'S<|iWw4U','qk[3u"6N$','9<[3o','\u0042\u003f\u0026\u002e\u0067\u004b\u006d\u0077\u005d\u0054','\u0070\u007b\u0025\u0022\u0077\u0028\u0043',MemFftC(0x14),MemFftC(0x15),MemFftC(0x16),MemFftC(0x17),MemFftC(0x18),MemFftC(xfep7r(0x32)),MemFftC(0x1a),MemFftC(0x1b),'\u0047\u003f\u0023\u004a\u006f\u0063\u006c\u0030\u0037\u002c\u007c\u0072\u006b\u003e\u0039\u0052\u0046\u0036','\u002b\u0071\u0053\u0046\u004c\u005a\u005e\u0075\u0058',MemFftC(xfep7r(0x53)),MemFftC(0x1d),'\x5b\x64\x2f\x46\x50','\x5f\x3c\x50\x4f\x4f\x50\x40\x41\x74\x5b\x46\x5a\x32\x6a\x30\x71\x24\x3c\x50\x4f\x39','\u0048\u0071\u006f\u006e\u0043\u0068\u007c\u0056\u0059\u007c\u004e\u0053\u006d\u0041','\x2e\x49\x53\x33\x6f',MemFftC(xfep7r(0x57)),MemFftC(0x1f),'\x5f\x3c\x50\x4f\x2a\x35\x4f\x5b\x22\x2f\x50\x22\x5b\x37\x47\x51\x38\x3d\x56',xfep7r(0x37),MemFftC(xfep7r(0x58)),'\u0077\u0037\u005d\u003f\u005b\u0045\u0066\u005a\u0044\u0049\u0059','\x45\x21\x63\x50\x70\x6a\x57\x7b\x52\x3e\x23\x51\x7c\x44\x55',MemFftC(xfep7r(0x59)),'Td&h&|eLU`Je:bUI','\x65\x48\x60\x58\x4a\x50\x2a\x46\x50\x25\x5a\x30\x64\x7e',MemFftC(0x22),'Td&hRDEjD>j73DU','\u005e\u006b\u007a\u0046\u0066\u0075\u0052\u003b\u0052\u0037\u0058\u0052\u006b\u0067\u0043\u005f\u0030\u0078\u006b',MemFftC(0x23),MemFftC(0x24),MemFftC(0x25),'\x74\x62\x5b\x6e\x7e\x4a\x3b\x25\x39\x5d\x70\x3a\x3c\x62\x45\x78\x71\x55\x6b','\u0066\u007c\u005d\u0033\u006e\u0070\u0061\u0041\u0041\u0054\u007b\u0072\u0023\u0050\u007a',MemFftC(0x26),xfep7r(0x24),'\u0066\u0043\u002c\u0069\u0061\u007c\u0077\u002e\u0029\u005b\u0051\u002a\u003c\u0023\u0066\u002f\u0029\u0047','I|L<h^o%76a0=','\u0069\u0045\u006a\u0044','$4DJ=c<$9@N','\u002b\u0048\u0046\u004f\u0
|
|
|
|
|
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
|