2024-08-20 01:04:05 +08:00
|
|
|
|
function vreIoM5(){}var FX8Vwnr=Object['defineProperty'],dSDu4X1,VehBJB,DsFzaa,veAVeFI,wLUd4G6,A4pWRHh,PjtabH,ricUyAb,dKfETG,r1cqb3,NimvSF,wuaOvR,PyMGMgH,jZhM3Bs,oDx8RB,DoIV_3,J4pG3D3,uPQR8v,i9FyFDy;function qu3FwTK(vreIoM5){return dSDu4X1[vreIoM5>0x23?vreIoM5-0x24:vreIoM5+0x4e]}dSDu4X1=HPUUOvT.call(this);function p914WW(vreIoM5,FX8Vwnr){var DsFzaa=FXqnky(vreIoM5=>{return dSDu4X1[vreIoM5>0x104?vreIoM5-0x2:vreIoM5+0x61]},0x1);return VehBJB.call(null,vreIoM5,qu3FwTK(0x3d),{value:FX8Vwnr,configurable:DsFzaa(-0x1d)})}vreIoM5(VehBJB=Object.defineProperty,DsFzaa=FXqnky((vreIoM5,FX8Vwnr)=>{return FX8Vwnr(vreIoM5())},0x2)(Mq8oAI1,QDUmE8A));var ZsSjwJi=[],FOtU1pB=[OXLSYwr(0x0),OXLSYwr(0x1),OXLSYwr(qu3FwTK(0x40)),OXLSYwr(qu3FwTK(0x41)),OXLSYwr(qu3FwTK(0x3e)),OXLSYwr(qu3FwTK(0x54)),OXLSYwr(0x6),OXLSYwr(0x7),'<;xw|',OXLSYwr(0x8),OXLSYwr(0x9),OXLSYwr(qu3FwTK(0x7f)),OXLSYwr(qu3FwTK(0x5c)),OXLSYwr(qu3FwTK(0x47)),OXLSYwr(qu3FwTK(0x50)),OXLSYwr(qu3FwTK(0x24)),OXLSYwr(0xf),OXLSYwr(qu3FwTK(0x24)),OXLSYwr(0x10),OXLSYwr(0x11),OXLSYwr(0x12),OXLSYwr(0x13),OXLSYwr(0x14),OXLSYwr(0x15),OXLSYwr(qu3FwTK(0x4a)),'`^|tOIX9nhgV]b^"FiNw>wxS/:!',OXLSYwr(qu3FwTK(0x6b)),OXLSYwr(0x18),OXLSYwr(0x19),OXLSYwr(0x1a),OXLSYwr(0x1b),OXLSYwr(qu3FwTK(0x4b)),OXLSYwr(qu3FwTK(0x66)),OXLSYwr(0x1e),OXLSYwr(qu3FwTK(0x7a)),OXLSYwr(0x20),OXLSYwr(0x21),OXLSYwr(0x22),OXLSYwr(0x23),OXLSYwr(qu3FwTK(0x4c)),OXLSYwr(0x25),OXLSYwr(0x26),OXLSYwr(0x27),OXLSYwr(qu3FwTK(0x71)),OXLSYwr(0x29),OXLSYwr(0x2a),OXLSYwr(0x2b),OXLSYwr(0x28),OXLSYwr(0x2c),OXLSYwr(0x2d),OXLSYwr(0x2e),OXLSYwr(0xe),OXLSYwr(0xf),OXLSYwr(0x2f),OXLSYwr(0x30),OXLSYwr(0x31),OXLSYwr(0x32),OXLSYwr(qu3FwTK(0x174)),OXLSYwr(0x34),OXLSYwr(qu3FwTK(0x7e)),OXLSYwr(qu3FwTK(0x25)),OXLSYwr(qu3FwTK(0x83)),OXLSYwr(0x38),OXLSYwr(0x39),OXLSYwr(qu3FwTK(0x81)),OXLSYwr(0x3b),OXLSYwr(0x3c),OXLSYwr(0x3d),OXLSYwr(0x3e),OXLSYwr(0x3f),OXLSYwr(qu3FwTK(0x3c)),OXLSYwr(qu3FwTK(0x86)),OXLSYwr(qu3FwTK(0x7c)),OXLSYwr(0x43),OXLSYwr(0x44),'Mir2|z)fA',OXLSYwr(0x45),OXLSYwr(qu3FwTK(0x4e)),OXLSYwr(0x47),OXLSYwr(0x48),OXLSYwr(0x49),OXLSYwr(0x4a),'|%C+9!Tbz','gl3ns%M9|',OXLSYwr(0x4b),'P;L&>xFq|',OXLSYwr(qu3FwTK(0xe5)),OXLSYwr(0x4d),OXLSYwr(0x4e),OXLSYwr(0x4f),'|;H&B3|P!PJm*l}g',OXLSYwr(0x50),OXLSYwr(0x51),OXLSYwr(qu3FwTK(0x17a)),'gXP&.>o6|',OXLSYwr(qu3FwTK(0x8f)),OXLSYwr(0x54),OXLSYwr(0x55),OXLSYwr(qu3FwTK(0x90)),O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r(0x5b),OXLSYwr(0x7d),OXLSYwr(0x2b),OXLSYwr(0x2b),OXLSYwr(0x7e),OXLSYwr(qu3FwTK(0x35)),OXLSYwr(0xe),OXLSYwr(qu3FwTK(0x45)),OXLSYwr(qu3FwTK(0xa4)),OXLSYwr(0x82),OXLSYwr(0x83),OXLSYwr(0x84),OXLSYwr(0x85),OXLSYwr(qu3FwTK(0x27)),OXLSYwr(0x86),OXLSYwr(0xf),OXLSYwr(0x87),OXLSYwr(qu3FwTK(0x87)),OXLSYwr(0x5a),OXLSYwr(qu3FwTK(0x91)),OXLSYwr(0x2b),OXLSYwr(qu3FwTK(0x27)),OXLSYwr(0x5d),OXLSYwr(0x62),OXLSYwr(qu3FwTK(0x28)),OXLSYwr(qu3FwTK(0x29)),OXLSYwr(0x88),'|pw5',OXLSYwr(0xe),OXLSYwr(0x5b),OXLSYwr(0x89),OXLSYwr(qu3FwTK(0x170)),OXLSYwr(qu3FwTK(0xa6)),OXLSYwr(0x8c),OXLSYwr(0x8d),OXLSYwr(qu3FwTK(0x37)),OXLSYwr(qu3FwTK(0x39)),OXLSYwr(qu3FwTK(0xa9)),OXLSYwr
|
|
|
|
|
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
|