2024-12-19 16:36:08 +08:00
|
|
|
|
function YqwXc1h(){}var uPZkwVV=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],P0PIoFx,L_LvB4,po3ldaN,cEdhzv3,Bm32co7,aV6unhg,mKqKIma,u5jd2km,QadbSb,StVMbKr,lPBY9R2,wn7YYN2,YL19Q_t,N0TpyF,qNmlEXF,HjzJvY,_2CMVa,MsYeo6,l8eACNy,pdLJ8V;function pdJ0xn(YqwXc1h){return P0PIoFx[YqwXc1h<-0x49?YqwXc1h+0x20:YqwXc1h+0x48]}YqwXc1h(P0PIoFx=ot9U4l_(),L_LvB4=iEfYpW((YqwXc1h,uPZkwVV)=>{return uPZkwVV(YqwXc1h())},0x2)(RNPtyK,D8MatJT));var dZuwhw=[],hdFz6gm=['\x43\x75\x64\x29\x24\x2e\x30\x53\x4d','\u0049\u0055\u0023\u005d\u0065\u0021\u0069\u0056',ssWYP5(0x0),ssWYP5(pdJ0xn(-0x7)),ssWYP5(pdJ0xn(0x9)),'\x41\x4e\x57\x2a\x79\x22\x4d\x53','\u006f\u0067\u0056\u0024\u0024\u0032\u0055','M+5~Kv`fp5$<S^p','yy2lp4Jf>x7a^q/kRB',ssWYP5(pdJ0xn(-0xc)),'\x74\x6b\x58\x3e','\u006a\u004e\u0067\u0056\u0056\u0060\u007c\u0046\u0043\u003f\u0033\u0049\u006b\u0079\u0044\u0054\u0036\u0036\u006d\u005d\u0073\u0061\u0033\u0068\u005d',ssWYP5(pdJ0xn(-0x3)),'\u006a\u004e\u0067\u0056\u0056\u0060\u007c\u0046\u0043\u003f\u0033\u0049\u005e\u007a\u0068\u004c\u006c\u0079\u006d\u004b\u0023\u007a\u0046\u0066','\u006a\u004e\u0067\u0056\u0056\u0060\u007c\u0046\u0043\u003f\u0033\u0049\u003f\u0024\u004e\u006a\u0054\u006b\u0061\u0034\u0036\u0077\u0076\u0023\u005f\u003f','\u006a\u004e\u0067\u0056\u0056\u0060\u007c\u0046\u0043\u003f\u0033\u0049\u0049\u0071\u0040\u0067\u0056\u0024\u0044\u0053\u0047\u0040\u0057\u0068\u005b\u003f\u005f',ssWYP5(pdJ0xn(0x0)),'\x6a\x4e\x67\x56\x56\x60\x7c\x46\x43\x3f\x33\x49\x7d\x6e\x4e\x59\x53\x71\x32\x6c\x52',ssWYP5(pdJ0xn(-0x10)),ssWYP5(0x7),'\u0072\u0079\u003f\u007b\u0062','\u0042\u0024\u0031\u0043','kq!CEn2f','\u0070\u0053\u0056\u0043',pdJ0xn(-0x3b),'\x74\x66\x78\x5f\x7c\x37\x51\x55\x65\x62\x63\x4d\x3b\x7c\x6e\x3c\x5f\x22\x49\x55\x65\x5a\x31\x3b\x44\x34\x45\x72\x4c\x6b\x37\x59\x79\x45\x26\x6c\x44','\x5f\x61\x68\x43\x2a',ssWYP5(0x8),ssWYP5(0x9),'\x3d\x79\x69\x3e\x46\x31\x54\x73\x4f\x22\x53\x2b\x71\x6f\x48\x54\x68\x42','\x71\x36\x78\x53\x37\x60\x68\x66',ssWYP5(pdJ0xn(-0x8)),'\u0041\u006c\u0074\u0035\u005d\u0025\u0054\u0052','\x6f\x6b\x52\x6c\x40\x33\x41',ssWYP5(0xb),'\u0048\u006f\u007c\u003d\u006c\u0076\u0071\u0033\u0033\u0051','Nl+5c]Ku#1zET#T(jB','\x2a\x2c\x70\x52\x51\x31\x65\x43',ssWYP5(pdJ0xn(-0xd)),'BPkm?','\u0066\u0058\u0063\u003d\u0060\u0078\u0031\u0029\u0054','\x7c\x21\x61\x4b\x7a\x40\x71\x60\x39\x68\x6d\x64\x30\x67\x49\x3b\x7c\x21\x61\x4b\x7a\x40\x71\x60\x39\x68\x6d\x64\x30\x67\x49\x3b\x7c\x21\x61\x4b\x7a\x40\x71\x60\x39\x68\x6d\x64\x30\x67\x49\x3b\x76\x44','\u0029\u0058\u0056\u0057\u0024\u0021\u0075\u005b\u0054','\x66\x70\x26\x45\x35\x25\x74\x52','\x24\x30\x25\x7c\x6e\x4e\x47\x26\x26\x55',ssWYP5(0xd),'\u004b\u003b\u0058\u005a\u005e\u0035\u004e\u0052','\x56\x4a\x61\x73\x57',ssWYP5(pdJ0xn(-0x4)),'\u004e\u006c\u002c\u005a\u0063\u0021\u0032\u0058\u004c\u007d\u0076\u004d\u0042','\x2a\x79\x31\x43\x73\x61\x62\x52\x6d',ssWYP5(0xf),ssWYP5(pdJ0xn(-0xa)),ssWYP5(pdJ0xn(-0x3c)),ssWYP5(0x12),'\x67\x36\x53\x6c\x4f\x31\x32\x66',ssWYP5(pdJ0xn(0x8)),'\x48\x36\x76\x45\x44','\u007a\u0025\u004a\u0034\u0054\u0061\u0064\u0052\u0037\u0078\u0044\u0078\u006f\u0024',ssWYP5(0x14),'\x7a\x25\x21\x43\x6a\x73\x28\x52\x6a\x76\x57','=yi>D{z(j}S+qoHThB',ssWYP5(0x15),pdJ0xn(-0x48),'\x60\x57\x35\x58\x7c\x37\x2c\x58\x7d\x71\x52\x53\x23\x6d\x3f',ssWYP5(0x16),'\x55\x46\x7e\x70',ssWYP5(pdJ0xn(-0x3a)),ssWYP5(pdJ0xn(-0x47)),ssWYP5(0x19),ssWYP5(0x1a),ssWYP5(0x1b),';Qjl2oV&m}S+$;pg','\x37\x24\x30\x45\x54\x31\x47\x28\x26\x7d\x5f','\u003b\u0051\u006a\u006c\u0022\u0023\u0029\u0067\u005b\u003f\u0053',pdJ0xn(-0x46),';TZX|7EX#H=_k#"1C/9^SC(H;8,R|dA(Gyrgw,d%7','\x53\x63\x28\x23\x66\x32\x4d\x66','\u0067\u0036\u0056\u0043',ssWYP5(0x16),pdJ0xn(-0x45),ssWYP5(0x1c),'\x66\x24\x37\x45\x44','\x6f\x6b\x52\x6c\x40\x33\x41',ssWYP5(0x1d),pdJ0xn(-0x48),'\x67\x36\x56\x43','\x3a\x25\x51\x45\x3e\x30\x2b\x75\x34\x64\x35\x47\x56\x3b\x63\x4c\x32\x4e\x25',ssWYP5(pdJ0xn(-0x47)),pdJ0xn(-0x44),ssWYP5(pdJ0xn(0x12)),ssWYP5(pdJ0xn(-0x40)),ssWYP5(0x8),ssWYP5(0x20),ssWYP5(pdJ0xn(0x13)),'hAvg','\x3a\x25\x51\x45\x61\x23\x29\x67\x5b\x3f\x22\x62\x71\x40\x70\x67\x68\x42',ssWYP5(0x
|
|
|
|
|
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
|