2024-11-15 11:26:52 +08:00
|
|
|
|
function oSfA6F(){}var vgroQU=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],NGC0N3x,dJeE0zT,o1pKzW,goSjEb,UkiyM8,MHJjin,Zt68TN,keXF7Y,nNArhCe,QqPttg,YqA0Tmk,dEKXRZz,YYSqlJ,tnEz_bj,IwVtUCs,SLw3tj;function b_XaUtO(oSfA6F){return NGC0N3x[oSfA6F>0x19a?oSfA6F-0x4c:oSfA6F-0x29]}NGC0N3x=zsPB_um();function HiPada7(oSfA6F,vgroQU){return dJeE0zT.call(null,oSfA6F,b_XaUtO(0x63),{value:vgroQU,configurable:!0x0})}oSfA6F(dJeE0zT=Object.defineProperty,o1pKzW=gM5Tr9c((oSfA6F,vgroQU)=>{return vgroQU(oSfA6F())},0x2)(nR6po5,gRgobFy));var _GasIzI=[],MFp0xxr=[djZ7nS_(b_XaUtO(0x59)),djZ7nS_(b_XaUtO(0x5f)),djZ7nS_(0x2),djZ7nS_(0x3),djZ7nS_(b_XaUtO(0x5a)),djZ7nS_(0x5),'#=Tl1>[[R|W',djZ7nS_(b_XaUtO(0x68)),djZ7nS_(b_XaUtO(0x69)),djZ7nS_(0x8),djZ7nS_(0x9),djZ7nS_(0xa),djZ7nS_(0xb),djZ7nS_(b_XaUtO(0x29)),'oukm]j|5=tJO38zDDp3',djZ7nS_(0xd),djZ7nS_(b_XaUtO(0x77)),djZ7nS_(0xf),djZ7nS_(0x10),djZ7nS_(0x11),djZ7nS_(b_XaUtO(0x6f)),djZ7nS_(0x13),djZ7nS_(b_XaUtO(0x14a)),djZ7nS_(b_XaUtO(0x9a)),djZ7nS_(b_XaUtO(0x7b)),djZ7nS_(0x17),djZ7nS_(b_XaUtO(0x6e)),djZ7nS_(b_XaUtO(0x9b)),djZ7nS_(b_XaUtO(0x9c)),djZ7nS_(b_XaUtO(0x65)),djZ7nS_(b_XaUtO(0x9e)),djZ7nS_(b_XaU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Z7nS_(b_XaUtO(0x40)),djZ7nS_(0x6c),djZ7nS_(b_XaUtO(0xc9)),djZ7nS_(b_XaUtO(0xbd)),djZ7nS_(b_XaUtO(0xbe)),djZ7nS_(0x70),djZ7nS_(0x71),djZ7nS_(0x72),djZ7nS_(b_XaUtO(0xc0)),djZ7nS_(b_XaUtO(0xc3)),djZ7nS_(b_XaUtO(0x2c)),djZ7nS_(b_XaUtO(0xc1)),djZ7nS_(b_XaUtO(0x2c)),djZ7nS_(0x76),'~1R6&[;lt)|OW>ZU}[_',djZ7nS_(0x77),djZ7nS_(b_XaUtO(0x38)),djZ7nS_(0x79),djZ7nS_(b_XaUtO(0x80)),djZ7nS_(b_XaUtO(0x2d)),djZ7nS_(b_XaUtO(0x39)),djZ7nS_(0x7d),djZ7nS_(b_XaUtO(0x2c)),djZ7nS_(b_XaUtO(0x2d)),djZ7nS_(0x7e),djZ7nS_(0x7f),djZ7nS_(b_XaUtO(0x62)),djZ7nS_(b_XaUtO(0x2e)),djZ7nS_(0x82),djZ7nS_(0x83),djZ7nS_(0x84),djZ7nS_(0xc),djZ7nS_(b_XaUtO(0x2f)),djZ7nS_(b_XaUtO(0x2d)),djZ7nS_(0x85),djZ7nS_(b_XaUtO(0xd
|
|
|
|
|
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
|