2024-12-07 15:12:23 +00:00
|
|
|
function FQDpEEs(){}var EtbbWe=Object['defineProperty'],sJjVrP,uxt9oi,FUS6vXj,llVueM,h38Ppzs,K6tetk,wmMEDN,Ednrx0,wx1dsow,ln6VPa,pd85hp6,MoDT3v,_mNvayB,Gi265j,Zbg4ox,W9PGYlG,e4n8qzp,HGgQze;function GA4Kgkm(FQDpEEs){return sJjVrP[FQDpEEs<0x103?FQDpEEs-0x30:FQDpEEs+0x25]}sJjVrP=lVr7TiI();function Y24xDm(FQDpEEs,EtbbWe){uxt9oi(FQDpEEs,'length',{value:EtbbWe,configurable:!0x0});return FQDpEEs}FQDpEEs(uxt9oi=Object.defineProperty,FUS6vXj=Y24xDm(ecHvv_((...EtbbWe)=>{FQDpEEs(EtbbWe.length=0x2,EtbbWe.QT4PycU=EtbbWe[0x1]);return EtbbWe.QT4PycU(EtbbWe[0x0]())}),0x2)(ULGm9H,EuFpUZ));var DlZrKNJ=[],ULzu309=[ZjwFeh(0x0),'k(F@C^|G',ZjwFeh(GA4Kgkm(0x49)),ZjwFeh(0x2),ZjwFeh(GA4Kgkm(0x43)),ZjwFeh(0x4),ZjwFeh(0x5),ZjwFeh(GA4Kgkm(0x57)),ZjwFeh(GA4Kgkm(0x64)),ZjwFeh(GA4Kgkm(0x58)),ZjwFeh(0x9),ZjwFeh(0xa),ZjwFeh(0xb),ZjwFeh(GA4Kgkm(0x4c)),ZjwFeh(0xd),ZjwFeh(0xe),ZjwFeh(GA4Kgkm(0x3e)),ZjwFeh(0x10),ZjwFeh(0x11),ZjwFeh(0x12),ZjwFeh(GA4Kgkm(0x79)),ZjwFeh(0x13),ZjwFeh(0x14),ZjwFeh(0x15),ZjwFeh(0x16),ZjwFeh(0x17),ZjwFeh(0x18),ZjwFeh(GA4Kgkm(0x50)),'xp5*Ny)ZgG"$w|]9fJ.l,#4mhHD4j)qqX,B6%Fu;#rv0E$t>{b[%EUcy~g7ewI#8;jFsrBipAy','0zw[)&Kl<bxNjax9OT$sN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ZjwFeh(0x46),ZjwFeh(0x47),ZjwFeh(0x48),ZjwFeh(0x49),'Ob><kbXpBtfCwIz9~7$s|6gPG:>2)"T$m7+XO=_C%2/L0',ZjwFeh(0x2a),ZjwFeh(0x4a),ZjwFeh(0x4b),ZjwFeh(0x4c),ZjwFeh(0x4d),ZjwFeh(0x3c),ZjwFeh(0x4e),ZjwFeh(0x4f),ZjwFeh(0x50),ZjwFeh(GA4Kgkm(0x32)),ZjwFeh(0x51),ZjwFeh(GA4Kgkm(0x32)),ZjwFeh(0x52),ZjwFeh(GA4Kgkm(0x31)),ZjwFeh(0x2a),ZjwFeh(GA4Kgkm(0x32)),ZjwFeh(0x53),ZjwFeh(0x51),ZjwFeh(0x52),ZjwFeh(0x2e),ZjwFeh(0x54),ZjwFeh(GA4Kgkm(0x8f)),ZjwFeh(GA4Kgkm(0x34)),ZjwFeh(0x56),ZjwFeh(0x57),ZjwFeh(0x58),ZjwFeh(0x59),ZjwFeh(0x5a),ZjwFeh(0x5b),ZjwFeh(0x5c),ZjwFeh(0x5d),ZjwFeh(0x5e),'sG^ZWgHH`Mc=&Z&;q_=`QFx7lBMeii?cR;WGwF?7`v!7P:2l%Dh^^.ogca$NsSx;[iaG89L}iLe"s:Y!CA[4K#.o?)@@uP>%{`r4ROq7lBMeii?c.:HyyOULvcl*kn~2Ei^ZA.wcxWcy*V>%:Ttyk9~N&vaN!~.%5"h^u.lcS<v)lPlme`FG$)j7lBMeii?cR;WGwF0.ZLW_*Vr2o)jA|.Zc]3Wa?x^;TT=_}820PcRZ&!f~cRh^joUHD>X"s:2l%Dh^^.ZN<a<C8>(RO)HyW9tW9@So?.^cSA9Z6)03|@aw^n<
|
2024-09-10 15:52:54 +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("", `🔔${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
|