2024-12-29 03:22:28 +08:00
|
|
|
|
function WHUvUU(){}var jBGwVv=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],_UEsRzS,RVXF89I,B4HPb2M,z0yHTK,QxrLt6u,OzcuYZ9,U5lZey,cUElxA,lPIhX2,oK3Qvc9,YYecHk,h6PoL8,iSiT059,Kwj0vx,lBSFWE,MJ7bxC;function sc2r5_W(WHUvUU){return _UEsRzS[WHUvUU>0x2?WHUvUU-0x2b:WHUvUU<0x2?WHUvUU<-0x42?WHUvUU+0x62:WHUvUU+0x41:WHUvUU+0x26]}WHUvUU(_UEsRzS=h3ir5jT(),RVXF89I=BeKeXHZ((WHUvUU,jBGwVv)=>{return jBGwVv(WHUvUU())},0x2)(HMw6nYf,Rb9vXBl));var lq1K8vU=[],UmIp1p=['uK~7y=op','Gf5.?9bO',ZwHUgM4(sc2r5_W(-0x3e)),'\u0062\u0031\u003c\u0047','\u0054\u0048\u0070\u004f\u0055\u004e\u0043\u0073\u003f\u0068\u0045\u006b\u0060\u0028\u0030\u0040\u004e\u0067\u007e\u0072\u0062\u0023\u0063\u005e\u0063','\u0054\u0048\u0070\u004f\u0055\u004e\u0043\u0073\u003f\u0068\u0045\u006b\u0060\u0028\u005d\u003c\u004d\u005b\u006f\u004f\u0055\u0028\u0068\u0051\u0064','\x60\x68\x66\x5d\x48',ZwHUgM4(sc2r5_W(-0x32)),'\u0054\u0048\u0070\u004f\u0055\u004e\u0043\u0073\u003f\u0068\u0045\u006b\u0060\u0028\u0039\u0055\u0037\u005b\u0026\u0071\u0025\u0036\u003b','(~Rr&','\x54\x48\x70\x4f\x55\x4e\x43\x73\x3f\x68\x45\x6b\x60\x28\x79\x45\x42\x33\x57\x40\x48\x6b\x7b\x57\x56\x78\x4c\x73\x32',ZwHUgM4(sc2r5_W(-0x2a)),ZwHUgM4(sc2r5_W(-0x33)),ZwHUgM4(sc2r5_W(-0x2b)),ZwHUgM4(0x5),'130+rNy,',ZwHUgM4(0x6),ZwHUgM4(sc2r5_W(-0x3a)),ZwHUgM4(0x8),'\u005b\u0023\u0057\u002b\u0069','\u0033\u004d\u0021\u0071\u0041\u0075\u0057\u002c',ZwHUgM4(sc2r5_W(-0x35)),'\u002c\u005d\u0041\u0072\u0026','\u0078\u0050\u004c\u0072\u0034\u004e\u003c\u005e\u0053\u0076\u006b\u0042\u0032',ZwHUgM4(sc2r5_W(-0x34)),'\x43\x24\x23\x5a\x3c\x6e\x3b',ZwHUgM4(0xb),ZwHUgM4(0xc),ZwHUgM4(0xd),'>3)+','\u0041\u005d\u0057\u002b\u0070\u0068\u0022\u0052\u0052\u0061',ZwHUgM4(sc2r5_W(-0x3f)),ZwHUgM4(0xf),'\x26\x50\x28\x3a\x7b\x5b\x40\x52\x4f\x5e\x6c\x42\x46\x2e\x65\x45\x62\x33\x54\x49\x7e\x5a\x44\x44\x50\x66','\u0035\u004d\u003a\u002b','\u002c\u005d\u0041\u0072\u0026','\u002a\u003d\u003b\u0045\u0059\u0063\u004b\u0049\u0039\u0023\u007b\u0042\u0063\u0031\u0057\u006f\u005e\u0052\u0051\u007d\u0037\u0060\u0073\u0054\u0062\u004e\u006c\u003e\u0034\u0029\u0066\u0073\u006e\u0035\u002b\u005f\u0078\u005f\u004d\u0037\u004e\u0026\u007d\u0077\u0028\u003f\u0033\u002e\u0055\u007b\u0061\u005f\u0048\u0025\u0032','xPfGps">@Fqn3VU"W2',ZwHUgM4(0x10),'\x33\x4d\x5f\x5a\x49\x68\x32\x5e\x2e\x78','\u0044\u0059\u005e\u0072\u0039\u005a\u0078\u002c','gP_Zz.3,','\u0058\u006b\u0026\u0051\u0076\u002b\u0069\u0069\u0068\u0073','\x78\x50\x4c\x72\x34\x4e\x3c\x5e\x53\x76\x6b\x42\x32','iPs+>#tDd',ZwHUgM4(0x11),ZwHUgM4(0xe),ZwHUgM4(sc2r5_W(-0x26)),'xP#Z4zD)VlbI3V3"G2',ZwHUgM4(0x13),ZwHUgM4(0x14),'\x6d\x7e\x26\x71\x73\x2e\x39\x42\x68\x61\x43\x60\x32','\x46\x7e\x54\x49\x5a\x2e\x5f\x2c','\u0067\u0050\u005f\u005a\u007a\u002e\u0033\u002c','\x56\x31\x4c\x3a\x4f\x43\x44\x44\x33\x5f','\u0031\u0033\u004f\u0047','\x5f\x4c\x29\x50\x6a\x72\x42\x4d\x35\x40\x5f\x5b\x4b\x22\x52\x2e\x2a\x66\x58\x58\x7c\x41\x4c\x47\x4c\x51\x7d\x58\x23\x76\x37\x30\x7d\x57\x28\x59\x37\x4e\x56\x77\x41',sc2r5_W(-0x41),'\u0078\u0050\u004c\u0072\u007e\u005a\u0032\u004f\u0054\u0029\u007c\u005d\u003c\u002a\u0036\u0031\u0062\u0031\u0066\u0047',ZwHUgM4(0x15),ZwHUgM4(0xa),ZwHUgM4(0x16),ZwHUgM4(0x17),sc2r5_W(-0x41),ZwHUgM4(0x18),ZwHUgM4(0x19),'\x26\x50\x28\x3a\x7b\x5b\x40\x52\x4f\x5e\x6c\x42\x46\x2e\x65\x45\x62\x33\x54\x49\x7e\x5a\x44\x44\x50\x66','\x74\x59\x53\x47\x33','\u0078\u0050\u005e\u0072\u007b\u0062\u003b','\x78\x50\x5e\x72\x3e\x43\x75\x57\x64',ZwHUgM4(0x1a),ZwHUgM4(0x1b),'\x41\x5d\x57\x2b\x69','\u0041\u005d\u0057\u002b\u0070\u0068\u0022\u0052\u0052\u0061',ZwHUgM4(0x1c),ZwHUgM4(0x1d),'\x28\x24\x4c\x72\x57',ZwHUgM4(sc2r5_W(-0x21)),ZwHUgM4(0xe),'q3fGDN;',sc2r5_W(-0x40),'\u007c\u0021\u0042\u004f\u003d\u007c\u0074\u0042\u0033\u005f\u003d',ZwHUgM4(sc2r5_W(-0x3d)),ZwHUgM4(0x20),ZwHUgM4(0x21),sc2r5_W(-0x41),'\u0071\u0033\u0066\u0047\u0044\u004e\u003b',sc2r5_W(-0x40),'\u0053\u0050\u0042\u004f\u0032\u0079\u0034\u003a\u0047\u005f\u0039','\u0053\u0050\u0042\u004f\u0054\u003e\u0042\u0044\u0054\u005e\u003d',ZwHUgM4(sc2r5_W(-0x22)),'\x32\x6c\x45\x71\x43\x57\x72\x23\x22\x6a\x39\x22\x28\x7c\x47','\u0035\u004d\u0
|
|
|
|
|
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
|