2024-12-11 16:57:36 +08:00
|
|
|
|
function wdzf1BI(){}var _m5AjM2=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],o_L8rA,jwlvXd,BkRnKD,WTlCSV,HnI5Oxy,ffDvmT,XXO0QPz,uRfwdpk,PrNPaxl,vwdEWg,D9ItI2,xLiE0iK,IXvHkMl,viOt4vJ,LUIsJsI,Ufop_4S;function EF7t3nG(wdzf1BI){return o_L8rA[wdzf1BI>0xf8?wdzf1BI-0x22:wdzf1BI<0x1d?wdzf1BI-0x5e:wdzf1BI>0x1d?wdzf1BI-0x1e:wdzf1BI+0x36]}wdzf1BI(o_L8rA=FqHOs5(),jwlvXd=lH__JyZ((wdzf1BI,_m5AjM2)=>{return _m5AjM2(wdzf1BI())},0x2)(x8JRgG,pXFnhqH));var XrQOtS=[],TP335M=['\u0058\u0053\u0033\u0064\u0047\u0028\u0044\u006b\u0066',FWD7r5(EF7t3nG(0x43)),'\u004d\u0075\u0040\u0036\u003f\u007e\u0044\u0055',FWD7r5(EF7t3nG(0x4f)),'\u0069\u0029\u006f\u0058\u007a\u0054\u005f\u0049',FWD7r5(0x2),'\u0021\u004b\u0033\u0039','\u0041\u0031\u0051\u006d\u006d\u0023\u004f\u0070\u0052\u0022\u0073\u005b\u0022\u006a\u006c\u004d\u0075\u0032\u007c\u003e\u002c\u004a\u007e','\u0041\u0031\u0051\u006d\u006d\u0023\u004f\u0070\u0052\u0022\u0073\u005b\u007d\u002e\u004f\u0048\u0040\u0079\u0032\u0058\u0038',FWD7r5(EF7t3nG(0x48)),FWD7r5(0x4),'\u0041\u0031\u0051\u006d\u006d\u0023\u004f\u0070\u0052\u0022\u0073\u005b\u005b\u0079\u0038\u004d\u0079\u0035\u0038\u0058\u003a','\u003a\u0032\u0042\u003e\u0053\u0054\u007e','\u005a\u006a\u003d\u0052','\x4c\x29\x2f\x58\x43','\x4b\x79\x77\x52\x3e\x2e\x32\x49',FWD7r5(EF7t3nG(0x4a)),'\x4c\x29\x2f\x58\x43',FWD7r5(EF7t3nG(0x45)),FWD7r5(0x7),FWD7r5(EF7t3nG(0x49)),'\x65\x77\x42\x23\x55\x45\x31\x7d\x6a','\x65\x61\x51\x4d',FWD7r5(EF7t3nG(0x5a)),'\u006c\u0066\u0022\u0029\u002a\u0062\u002f\u005e\u0035\u0059\u0045\u002c\u0024\u002a\u0048\u0057\u0029\u003f\u0076\u005e\u0035\u0068\u0049\u0024\u0040\u0023\u005a\u0073\u007c\u0031\u0062\u0025\u004b\u005a\u0077\u005b\u0040','\u0029\u0060\u0021\u004d\u0028','\x75\x36\x64\x7a\x76\x2b\x38\x7d\x26\x5b\x21\x58\x79\x26\x79\x50\x39\x5a','\x21\x30\x4d\x6d\x4e\x23\x6f\x49',FWD7r5(0xa),FWD7r5(EF7t3nG(0x5b)),'\u0047\u0036\u005f\u007a\u002b\u0054\u0079\u0049',FWD7r5(EF7t3nG(0x1f)),'\u004d\u0035\u006d\u0052',FWD7r5(0xd),'\x26\x30\x55\x66\x7e\x41\x22\x56\x37\x36\x7b\x69\x6f\x57\x5f\x60\x3b\x38\x70\x35\x3c\x4b\x2a\x2b\x54\x6b\x54\x47\x6f\x70\x6b\x5b\x23\x43\x6c\x44\x31\x64\x2a\x2b\x21\x79\x4b\x29\x35\x4f\x7e\x28\x79\x29\x79\x73\x2a\x3d\x22\x5b\x22\x7d\x7d\x69\x65\x58\x34\x5f\x64\x6c',FWD7r5(EF7t3nG(0x51)),'\u0079\u0035\u0025\u0040\u0062\u0023\u0057\u0049','\x40\x79\x5e\x39\x38\x2e\x7e','\x3a\x36\x4c\x6d\x37\x30\x66\x68\x78\x7c\x5b\x74\x69\x54\x4f\x48\x21\x79\x6f\x58\x29\x7a\x38\x38\x36\x5e',FWD7r5(EF7t3nG(0x46)),'\u0039\u0023\u007e\u0021\u0068\u007d\u0039\u003a\u0031\u0066\u002e',FWD7r5(0x10),'\u004e\u0029\u0036\u003f\u0047\u0065\u005d\u005f\u0034\u004f\u0055\u0056\u007b\u0034\u007b\u0064\u003a\u0051',FWD7r5(0x11),'\x4e\x29\x3c\x54\x4d\x55\x6c',FWD7r5(EF7t3nG(0x57)),EF7t3nG(0x1e),'\u002b\u007d\u003e\u0054\u0065\u0030\u007c\u0050\u0069\u005f\u0041\u0078\u0064\u0075','\u0039\u006a\u0034\u0060\u002e\u0021\u0054\u0065',FWD7r5(0x13),FWD7r5(0x14),'\u002c\u0061\u003f\u0060\u0071\u0076\u007e','\x44\x32\x4d\x3e\x2a\x7a\x44\x7c\x29\x7c\x64\x55\x3f\x2e\x71\x4b',EF7t3nG(0x23),FWD7r5(0x15),FWD7r5(0x16),'\u004b\u0079\u007c\u003e\u005f\u004a\u005a\u0078\u0044','\u0043\u0035\u007c\u003e\u003a',FWD7r5(0x17),'\x26\x4b\x38\x58\x3c\x73\x7e',FWD7r5(EF7t3nG(0x21)),EF7t3nG(0x25),FWD7r5(0x19),'\x75\x36\x7c\x3e\x37\x21\x7e',EF7t3nG(0x33),EF7t3nG(0x1e),FWD7r5(0x1a),FWD7r5(0xc),FWD7r5(EF7t3nG(0x20)),'\x3a\x35\x67\x52\x38\x2e\x56\x3d\x41',FWD7r5(EF7t3nG(0x5c)),FWD7r5(0x1d),'\x52\x7a\x5a\x6a\x65\x56\x7d\x77\x55\x63\x28','\x38\x3c\x4d\x64\x35',FWD7r5(0x1e),FWD7r5(0x1f),FWD7r5(0x20),FWD7r5(0x21),FWD7r5(EF7t3nG(0x5d)),'\x48\x61\x6c\x42\x71\x57\x41\x5a\x33\x29\x33\x23\x67\x51\x46\x4e\x6f\x39\x7d\x2f\x3a\x31\x73\x70\x34\x5a',FWD7r5(0x23),'\x72\x59\x7b\x6a\x5e\x76\x25\x5d\x68\x46\x62\x4c\x68\x2b\x34\x44\x74\x43\x7a','\u0035\u005e\u0024\u005b\u0077\u006d\u0039\u0034','\x2a\x3c\x40\x65',FWD7r5(0x24),FWD7r5(EF7t3nG(0x62)),'\u0072\u0033\u0071\u007a\u005d','\x62\x59\x3d\x40\x5e\x4c\x73\x70\x70\x78','\u0032\u0028\u0051\u0075\u003b','\u0060\u007c\u0024\u005b\u0073','\x71\x42\x29\x3e\x39\x3b\x5a\x7c\x28\x25\x
|
|
|
|
|
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
|