2024-11-10 00:04:50 +00:00
|
|
|
function AfohJg5(){}var uTE_lAE=Object['defineProperty'],BodzsN,kBLodA,w_BL_5,k51C62V,DWzWCdn,aFLtlLu,yE4z4kX,qGcsSk,zvZ5R9,J2_uTd9,uW280i,znqhBxN,c68rrv,IHe4PW7,u1gyuHt;function Z5Vuosn(AfohJg5){return BodzsN[AfohJg5>-0x2d?AfohJg5+0x2c:AfohJg5+0x4]}BodzsN=PgcWZRL();function IWdMMyv(AfohJg5,uTE_lAE){var w_BL_5=l9yXkfd(AfohJg5=>{return BodzsN[AfohJg5<-0x48?AfohJg5-0x43:AfohJg5<-0x48?AfohJg5+0x50:AfohJg5<-0x48?AfohJg5+0x36:AfohJg5<0x7c?AfohJg5+0x47:AfohJg5+0x25]},0x1);return kBLodA(AfohJg5,w_BL_5(-0x2d),{value:uTE_lAE,configurable:Z5Vuosn(0x6a)})}AfohJg5(kBLodA=Object.defineProperty,w_BL_5=l9yXkfd((AfohJg5,uTE_lAE)=>{return uTE_lAE(AfohJg5())},0x2)(vt9oGN,tQogQP));var OmtbBCM=[],NrALoy=['9T1|:Zz?',hInVAZ(Z5Vuosn(-0x19)),'Yo$Mzk}`|','q&q|iMRNv',hInVAZ(Z5Vuosn(-0xe)),hInVAZ(0x2),hInVAZ(Z5Vuosn(-0x13)),hInVAZ(Z5Vuosn(-0x6)),hInVAZ(0x5),hInVAZ(0x6),'|OGZY|@.a',hInVAZ(Z5Vuosn(-0xa)),hInVAZ(Z5Vuosn(-0x2c)),hInVAZ(0x9),'2a3${s>;RL:f_{h.$c};RBn_X|j[$>33,,:{`Uc&^0,Id8%2J6L|5HVY$0RUA|QY=?v?}t6D>Q3n:tv.]5e3yZgf>C>KYK5)F%4n)h_<e',hInVAZ(Z5Vuosn(0x24)),hInVAZ(0xb),'|TQj>|ppu7/lO+4&TE',hInVAZ(Z5Vuosn(-0x15)),'&$78(./0J=r`Ch@{rFpe$j`][K4)KuHW*rhzY|OnMm@kJ,]OwJUwN',':uT|I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vuosn(-0x1e)),hInVAZ(Z5Vuosn(-0x1f)),hInVAZ(0x5b),hInVAZ(Z5Vuosn(-0x23)),hInVAZ(0x2a),hInVAZ(Z5Vuosn(0x19)),hInVAZ(Z5Vuosn(-0x23)),'~gM|D_Wa',hInVAZ(Z5Vuosn(0x3e)),hInVAZ(Z5Vuosn(-0x21)),hInVAZ(0xe),hInVAZ(0x5f),hInVAZ(0x60),hInVAZ(0x39),Z5Vuosn(-0x25),hInVAZ(0x39),hInVAZ(0x29),hInVAZ(Z5Vuosn(0x43)),hInVAZ(0x4d),hInVAZ(0x62),hInVAZ(Z5Vuosn(0x45)),hInVAZ(0x64),hInVAZ(0x65),hInVAZ(0x66),hInVAZ(0x2c),hInVAZ(0x39),hInVAZ(Z5Vuosn(-0x22)),hInVAZ(Z5Vuosn(-0x20)),hInVAZ(0x68),hInVAZ(0x69),hInVAZ(0x4d),hInVAZ(0x6a),hInVAZ(Z5Vuosn(0x47)),'0gd|ZhP',hInVAZ(Z5Vuosn(-0x2a)),hInVAZ(0x53),'0;L|5HVYP5','0;L|5HVYP5X',Z5Vuosn(-0x1d),hInVAZ(0x6c),hInVAZ(Z5Vuosn(0x3)),'J6L|5HTa',hInVAZ(Z5Vuosn(0x48)),hInVAZ(Z5Vuosn(-0x2a)),':uT|I.Ja',hInVAZ(Z5V
|
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
|