2024-08-22 23:38:06 +08:00
|
|
|
function dGnFir2(){}var rJHfwc=Object['defineProperty'],DKqXGc,o9_F9Iw,q60TBS,pFgYa1,d0GnciR,WrxMfa,LuawZz,FHZsTGq,lwFWCnW,LXrls0I,sa_G_Ux,Gmprs4,IsX9k5,chG4gRw,u6i3tK7,KFBSZh,sle8mvN;function AGLBLU(dGnFir2){return DKqXGc[dGnFir2<0x14e?dGnFir2>0x14e?dGnFir2-0x31:dGnFir2<0x14e?dGnFir2-0x14:dGnFir2-0x2a:dGnFir2+0x4a]}DKqXGc=vNwKRt5.call(this);function QRRNlm9(dGnFir2,rJHfwc){o9_F9Iw(dGnFir2,AGLBLU(0x2e),{value:rJHfwc,configurable:AGLBLU(0x94)});return dGnFir2}dGnFir2(o9_F9Iw=Object.defineProperty,q60TBS=QRRNlm9(TKwr9Ke((...rJHfwc)=>{var o9_F9Iw=TKwr9Ke(rJHfwc=>{return DKqXGc[rJHfwc>0x144?rJHfwc-0x1e:rJHfwc>0x144?rJHfwc-0x39:rJHfwc-0xa]},0x1);dGnFir2(rJHfwc.length=0x2,rJHfwc[AGLBLU(0x14)]=rJHfwc[AGLBLU(0x16)]);return rJHfwc[o9_F9Iw(0xa)](rJHfwc[o9_F9Iw(0xb)]())}),0x2)(aShFlE,Y8jO72));var TfKtpjq=[],pwtIAie=[lgxl0PC(AGLBLU(0x15)),lgxl0PC(AGLBLU(0x16)),lgxl0PC(AGLBLU(0x30)),lgxl0PC(0x3),lgxl0PC(AGLBLU(0x33)),lgxl0PC(0x5),lgxl0PC(AGLBLU(0x3e)),'#$;D|.n/','r$|9',lgxl0PC(AGLBLU(0x41)),lgxl0PC(0x8),lgxl0PC(AGLBLU(0x3c)),lgxl0PC(0xa),lgxl0PC(AGLBLU(0x5a)),lgxl0PC(0xc),lgxl0PC(0xd),lgxl0PC(0xe),lgxl0PC(0xf),lgxl0PC(0x10),lgxl0PC(0x11),lgxl0PC(AGLBLU(0x2b)),lgxl0PC(0x13),lgxl0PC(0x14),lgxl0PC(0x15),'%Me|4`)YwEK*H!V>d%f|AtJY~El','c/>2|',lgxl0PC(0x16),lgxl0PC(0x17),lgxl0PC(0x18),lgxl0PC(0x19),'1,DMvFnS$|y7!vNdMO6S$Ch!<3@c&lF+/@We<',lgxl0PC(0x1a),lgxl0PC(0x1b),lgxl0PC(0x1c),lgxl0PC(AGLBLU(0x44)),lgxl0PC(0x1e),lgxl0PC(0xd),lgxl0PC(0x1f),lgxl0PC(AGLBLU(0x4e)),lgxl0PC(0x21),lgxl0PC(0x22),lgxl0PC(AGLBLU(0x68)),lgxl0PC(0x24),lgxl0PC(0x25),lgxl0PC(0x26),lgxl0PC(0x27),lgxl0PC(AGLBLU(0x54)),lgxl0PC(0x29),lgxl0PC(AGLBLU(0x45)),lgxl0PC(AGLBLU(0x56)),lgxl0PC(0x2c),lgxl0PC(AGLBLU(0x59)),lgxl0PC(0x2e),lgxl0PC(AGLBLU(0x57)),'|GP#9',lgxl0PC(AGLBLU(0x32)),lgxl0PC(AGLBLU(0x5f)),lgxl0PC(AGLBLU(0x13c)),lgxl0PC(0x33),lgxl0PC(0x34),lgxl0PC(AGLBLU(0x7a)),lgxl0PC(AGLBLU(0x79)),lgxl0PC(AGLBLU(0x19)),'>q+|,%(I9~;?D','>q+|,%|J',lgxl0PC(AGLBLU(0x6a)),lgxl0PC(AGLBLU(0xaf)),lgxl0PC(AGLBLU(0x2d)),lgxl0PC(0x3a),lgxl0PC(0x3b),lgxl0PC(0x3c),lgxl0PC(0x3d),lgxl0PC(AGLBLU(0x7d)),lgxl0PC(AGLBLU(0x78)),lgxl0PC(0x40),lgxl0PC(0x41),lgxl0PC(AGLBLU(0x7f)),lgxl0PC(0x43),lgxl0PC(AGLBLU(0x84)),lgxl0PC(0x45),lgxl0PC(AGLBLU(0x5d)),lgxl0PC(0x47),lgxl0PC(0x48),lgxl0PC(0x49),lgxl0PC(0x4a),'SL8|',lgxl0PC(AGLBLU(0x5c)),lgxl0PC(0x4c),lgxl0P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gxl0PC(0x75),lgxl0PC(AGLBLU(0xce)),lgxl0PC(AGLBLU(0xa7)),lgxl0PC(0x78),AGLBLU(0x26),lgxl0PC(0x79),lgxl0PC(0x26),lgxl0PC(0x7a),lgxl0PC(0x7b),lgxl0PC(AGLBLU(0xac)),lgxl0PC(AGLBLU(0xad)),lgxl0PC(AGLBLU(0x21)),lgxl0PC(0x7f),lgxl0PC(AGLBLU(0x28)),lgxl0PC(0x81),lgxl0PC(0x82),lgxl0PC(AGLBLU(0x75)),lgxl0PC(AGLBLU(0xb4)),lgxl0PC(AGLBLU(0xb5)),lgxl0PC(AGLBLU(0x31)),'12|[.@RLy*Zf(QNh<OC','Zc}+2eo|.T(ly/MqF[#Q:Mo`P(m/Jks9g2d.R}YEvK<++Fj,`ub[fefMp',lgxl0PC(AGLBLU(0x1a)),'Ax+|Pd9,',lgxl0PC(0x87),lgxl0PC(0x7b),lgxl0PC(0x7f),lgxl0PC(0x80),lgxl0PC(AGLBLU(0xb6)),lgxl0PC(0x67),lgxl0PC(AGLBLU(0x1b)),lgxl0PC(0x89),lgxl0PC(AGLBLU(0xbe)),lgxl0PC(AGLBLU(0x1f)),lgxl0PC(0x8c),lgx
|
|
|
|
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
|