|
|
|
function nAS3ExK(){}var MQyfsLa=Object['defineProperty'],M62rj7m,LyKOPP,KpiX7Y,Vuwb30,qzjLDu5,Qc5PyhV,dXrPZl,asY4Si,PzS5ukt,Dybqof6,pPRTEjt,HVtBhP,gHRrRk,NoS9IgL,lYH22F,BQepdYP,YDOAy7,emli4E6,FIaYeY,h2EVzQ,BL5jCOh,cXDQOy;function wMfv0IX(nAS3ExK){return M62rj7m[nAS3ExK<0x2f?nAS3ExK+0x52:nAS3ExK-0x30]}M62rj7m=kSTJ_f();function fXPlAp1(nAS3ExK,MQyfsLa){return LyKOPP.call(null,nAS3ExK,wMfv0IX(0x5e),{value:MQyfsLa,configurable:wMfv0IX(0xd3)})}nAS3ExK(LyKOPP=Object.defineProperty,KpiX7Y=fXPlAp1(WFu_Po0((...MQyfsLa)=>{var LyKOPP=WFu_Po0(MQyfsLa=>{return M62rj7m[MQyfsLa>0x1ab?MQyfsLa+0x59:MQyfsLa>0x26?MQyfsLa<0x26?MQyfsLa+0x24:MQyfsLa-0x27:MQyfsLa-0x17]},0x1);nAS3ExK(MQyfsLa.length=LyKOPP(0x28),MQyfsLa.nYgDIbS=-0x53);if(MQyfsLa[wMfv0IX(0x30)]>0x1b){return MQyfsLa[MQyfsLa[wMfv0IX(0x30)]+wMfv0IX(0xfa)]}else{var KpiX7Y=WFu_Po0(MQyfsLa=>{return M62rj7m[MQyfsLa>-0xe?MQyfsLa+0xd:MQyfsLa-0x58]},0x1);return MQyfsLa[MQyfsLa[KpiX7Y(-0xd)]+KpiX7Y(-0x6)](MQyfsLa[MQyfsLa[wMfv0IX(0x30)]+wMfv0IX(0x36)]())}}),wMfv0IX(0x31))(PXXbQD,nCfpYZp));var uA23fx=[],N2c1YR=[sqPBhZ(0x0),sqPBhZ(wMfv0IX(0x63)),sqPBhZ(0x2),sqPBhZ(0x3),sqPBhZ(0x4),sqPBhZ(wMfv0IX(0x65)),sqPBhZ(0x6),sqPBhZ(0x7),sqPBhZ(wMfv0IX(0x77)),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(wMfv0IX(0x7c)),sqPBhZ(wMfv0IX(0xf9)),sqPBhZ(0x22),sqPBhZ(wMfv0IX(0x39)),sqPBhZ(0x66),sqPBhZ(0x67),sqPBhZ(wMfv0IX(0x51)),sqPBhZ(wMfv0IX(0x7b)),sqPBhZ(0x69),sqPBhZ(0x6a),sqPBhZ(wMfv0IX(0x7e)),sqPBhZ(wMfv0IX(0x3b)),sqPBhZ(wMfv0IX(0xb9)),sqPBhZ(wMfv0IX(0x6e)),sqPBhZ(wMfv0IX(0x3c)),sqPBhZ(0x61),sqPBhZ(wMfv0IX(0x3a)),sqPBhZ(0x6e),sqPBhZ(0x6f),sqPBhZ(wMfv0IX(0x91)),sqPBhZ(0x71),sqPBhZ(wMfv0IX(0xbd)),sqPBhZ(0x22),sqPBhZ(0x73),sqPBhZ(wMfv0IX(0x54)),sqPBhZ(wMfv0IX(0x3a)),sqPBhZ(wMfv0IX(0x3f)),sqPBhZ(wMfv0IX(0x39)),sqPBhZ(0x68),sqPBhZ(wMfv0IX(0xb8)),sqPBhZ(wMfv0IX(0xb7)),sqPBhZ(0x75),sqPBhZ(0x76),sqPBhZ(0x77),sqPBhZ(wMfv0IX(0x3b)),sqPBhZ(0x22),sqPBhZ(0x78),'|T6(!x!}',sqPBhZ(0x62),']T9xY|E}','|T6(!xHiiM',sqPBhZ(wMfv0IX(0x3c)),'\x7c\x54\x36\x28\x21\
|
|
|
|
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
|