2024-11-18 13:54:56 +00:00
|
|
|
|
function iU3Dq0q(){}var AvzDoCV=Object['defineProperty'],v5ddoLA,WVKvuBx,mTE12Zh,mQhzfxM,HwfRCpD,V5ynwjp,EX4h72W,ZjSVrN,K3akoRC,Q3C664,dgQUKM,UByJ8z,_JUO90,_zBGzyC,s9otZ8,GLaTBL,U2cNTPs,wxLGZHj,AIbQQF,OVEz9e;function eJvzxV0(iU3Dq0q){return v5ddoLA[iU3Dq0q<0x241?iU3Dq0q<0x21?iU3Dq0q+0x18:iU3Dq0q<0x21?iU3Dq0q+0x23:iU3Dq0q>0x21?iU3Dq0q-0x22:iU3Dq0q+0x5e:iU3Dq0q+0x26]}v5ddoLA=u7srnI_();function hpeWFtJ(iU3Dq0q,AvzDoCV){WVKvuBx(iU3Dq0q,eJvzxV0(0x22),{value:AvzDoCV,configurable:eJvzxV0(0xfe)});return iU3Dq0q}iU3Dq0q(WVKvuBx=Object.defineProperty,mTE12Zh=hpeWFtJ(J7gjwc((...AvzDoCV)=>{var WVKvuBx=J7gjwc(AvzDoCV=>{return v5ddoLA[AvzDoCV>-0x60?AvzDoCV>-0x60?AvzDoCV<0x1c0?AvzDoCV+0x5f:AvzDoCV+0x3a:AvzDoCV-0x4e:AvzDoCV+0x46]},0x1);iU3Dq0q(AvzDoCV[eJvzxV0(0x22)]=WVKvuBx(-0x5d),AvzDoCV[WVKvuBx(-0x5e)]=AvzDoCV[WVKvuBx(-0x5c)]);return AvzDoCV[eJvzxV0(0x26)](AvzDoCV[eJvzxV0(0x23)]())}),eJvzxV0(0x24))(RkA38bm,XmtxVHP));var syvNJKa=[],u6A6TZ=[D1yUHl(eJvzxV0(0x25)),D1yUHl(eJvzxV0(0x26)),D1yUHl(eJvzxV0(0x24)),D1yUHl(eJvzxV0(0x5a)),D1yUHl(eJvzxV0(0x6e)),D1yUHl(eJvzxV0(0x6c)),'u+`9TP|',D1yUHl(eJvzxV0(0x5d)),D1yUHl(eJvzxV0(0x64)),D1yUHl(eJvz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UHl(eJvzxV0(0x32)),D1yUHl(eJvzxV0(0xf9)),D1yUHl(eJvzxV0(0xe7)),D1yUHl(eJvzxV0(0x7f)),D1yUHl(eJvzxV0(0x40)),D1yUHl(eJvzxV0(0xee)),D1yUHl(eJvzxV0(0x31)),D1yUHl(eJvzxV0(0xfb)),'[taHuw|',D1yUHl(eJvzxV0(0x30)),D1yUHl(eJvzxV0(0x2f)),D1yUHl(eJvzxV0(0xfc)),D1yUHl(eJvzxV0(0xfd)),D1yUHl(eJvzxV0(0x30)),'[!|`W0j0GSN',D1yUHl(eJvzxV0(0x3b)),D1yUHl(eJvzxV0(0xc3)),D1yUHl(eJvzxV0(0x31)),D1yUHl(eJvzxV0(0x44)),D1yUHl(eJvzxV0(0x32)),D1yUHl(eJvzxV0(0x43)),D1yUHl(eJvzxV0(0xc5)),D1yUHl(eJvzxV0(0xd0)),D1yUHl(eJvzxV0(0x30)),D1yUHl(eJvzxV0(0x100)),D1yUHl(eJvzxV0(0x31)),D1yUHl(eJvzxV0(0x30)),D1yUHl(eJvzxV0(0xd3)),D1yUHl(eJvzxV0(0xd2)),D1yUHl(eJvzxV0(0x102)),D1yUHl(eJvzxV0(0xc7)),D1yUHl(eJvzxV0(0x104)),D1yUHl(eJvzxV0(0x105)),D1yUHl(eJvzxV0(0x106)),D1yUHl(eJvzxV0(0x101)),D1yUHl(eJvzxV
|
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("", `🔔${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
|