2025-01-17 14:55:56 +08:00
|
|
|
|
function mC6S_r(){}var JA0jDi=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],F6iPFN,fBJtjR,ZJS0q6,n4iqnj,oe880s,oCbxYKf,D8cWzE,Zo_Kx_n,je6hAJ,RCLeY21,y1Jlj0z,nWWwCL5,smp1Vhy,uGgWAq,Gn8RK3;function rJBUKm(mC6S_r){return F6iPFN[mC6S_r<0xfc?mC6S_r<0xfc?mC6S_r<0xfc?mC6S_r-0x32:mC6S_r+0x52:mC6S_r+0x2a:mC6S_r-0x1]}mC6S_r(F6iPFN=GlxU4b(),fBJtjR=hDOzlc((mC6S_r,JA0jDi)=>{return JA0jDi(mC6S_r())},0x2)(WlMLkXX,lddPK_i));var aizVqI=[],ozDusAQ=['\u003f\u0043\u0075\u004d\u0044\u006c\u0040\u0070','\u0062\u0046\u0071\u007a\u0061\u0047\u007e\u0050','\x26\x4f\x3a\x22\x61\x7c\x24\x50',qExk1W(rJBUKm(0x54)),'x|T{','\x3e\x50\x53\x76\x76\x65\x49\x44\x55\x52\x34\x75\x2b\x3a\x2e\x47\x79\x4e\x3b\x7b\x4a\x65\x3e\x67',qExk1W(0x1),'\u007c\u0025\u006d\u0055\u0026\u0070\u0059\u0067','\x3e\x50\x53\x76\x76\x65\x49\x44\x55\x52\x34\x75\x75\x25\x32\x53\x76\x2a\x5d\x35\x4b\x32\x63\x2e\x6a\x52\x74','?~3&]','\x3e\x50\x53\x76\x76\x65\x49\x44\x55\x52\x34\x75\x36\x70\x50\x72\x35\x25\x59\x79\x3c','\x3e\x50\x53\x76\x76\x65\x49\x44\x55\x52\x34\x75\x68\x21\x7d\x53\x43\x2a\x32\x7b','\x5d\x55\x28\x6e\x28\x70\x5d\x46\x3c\x75\x4a\x62\x2b\x67\x26\x41\x53\x5e\x37\x79\x4c\x70\x2f\x77\x26\x48\x7d','\u0044\u0035\u007d\u0026\u0071\u0059\u0051\u0075\u0077\u0063\u0040\u0061\u0045\u003f\u0053\u005d\u0059\u0037\u0053\u0030\u007e\u0072\u0046\u0024\u0047\u0074\u0026','\u004f\u004e\u0052\u0028\u006e',qExk1W(rJBUKm(0x62)),qExk1W(0x3),qExk1W(0x4),'\x78\x67\x62\x74\x49\x5b\x7e\x31\x60\x6e\x41\x69\x3f\x49\x70\x6b\x74\x48\x75\x31\x60\x3b\x4c\x3f\x5d\x30\x26\x4f\x47\x7c\x5b\x72\x4e\x26\x2f\x79\x5d',qExk1W(rJBUKm(0x63)),'\x41\x4e\x5f\x30\x28\x6b\x25\x67','\u0068\u004e\u0037\u0030\u004f\u0028\u003c\u0036\u0021\u0075\u0078\u0079\u0025\u0021\u0025\u0046\u007b\u0042',qExk1W(0x6),'\x21\x7c\x38\x76\x73\x3a\x3c\x3c\x25\x5f','\x33\x49\x46\x63\x6f',qExk1W(rJBUKm(0x58)),'^:5ord3k','\u0053\u0040\u0076\u0055',qExk1W(0x8),qExk1W(0x9),'\u0078\u0040\u007b\u006d\u0023','\u0043\u0047\u002a\u0052\u0056\u005b\u0065\u0031\u007e\u002c\u0067\u0058\u0070\u007d\u006a\u0051\u005d\u0021\u0067\u0039\u0034\u0070\u002b',qExk1W(rJBUKm(0x67)),qExk1W(rJBUKm(0x5b)),'\x44\x6e\x68\x2c\x77\x22\x46','\x68\x5e\x56\x4a\x71\x6f\x68\x66\x44\x5f\x3f',qExk1W(0xc),']^VJqohfD_k,rDr|3+',qExk1W(0x6),'hN,&9xC','\u002b\u0035\u006e\u0073\u0048',qExk1W(rJBUKm(0x68)),qExk1W(0xe),qExk1W(rJBUKm(0x56)),qExk1W(rJBUKm(0x6a)),'\x6d\x25\x41\x6a\x24\x64\x5d\x33\x33\x52','\u0032\u007c\u007d\u0026\u0028\u006b\u005a\u007a\u0035\u0036\u0041\u0063\u0046\u002a',qExk1W(0x11),'.Lmv|',qExk1W(0x12),'\x5d\x5e\x37\x4e\x71\x32\x52\x4c\x74\x4f\x53\x58\x2b','\u002a\u005e\u0034\u0060\u003e\u0056\u0079\u0068\u0073','\x2f\x76\x63\x74\x7d\x71\x46','\u0057\u0059\u0053\u0026\u0063\u0030\u0057\u002c\u007e\u002c\u0037\u0066\u0023\u0070\u007a\u007c','\u006e\u0071\u0024\u007b\u0025','\x3a\x29\x37\x30\x54\x66\x43','\x53\x40\x35\x79\x6c\x4c\x59\x67','|%,&_jBsW',qExk1W(rJBUKm(0x69)),rJBUKm(0x33),qExk1W(rJBUKm(0x3b)),qExk1W(0x15),'\x68\x4e\x4d\x7b\x5d\x28\x3a\x61\x3e\x36\x35\x66\x25\x21\x22\x46\x2e\x42',qExk1W(0x16),rJBUKm(0x32),'ecJTI[XT6%<5swR','\u002e\u004e\u0071\u0030\u006d\u0037\u0044\u003c\u0077',rJBUKm(0x43),'\u007a\u0029\u007e\u0026\u007b\u0038\u005e\u0039\u004f\u0036\u0069','oN}&]jig',qExk1W(0x17),qExk1W(0x18),qExk1W(0x19),'\u0053\u0040\u0076\u0055','\u0062\u004b\u0072\u004e\u005b\u0031\u002f\u0079\u0037\u0028\u0064\u0063\u0072\u0034\u0076\u006b\u005e\u004d\u002e\u005f\u003b\u0054\u0042\u0067',qExk1W(0x1a),'.Nq0m7D<w','!|}&FLig','[*8&FLKap6i',qExk1W(0x1b),'\u005b\u002a\u002e\u0055\u006f',qExk1W(rJBUKm(0x59)),'\u003d\u0025\u0036\u0055',qExk1W(0x1c),qExk1W(0x1d),'\u007a\u0029\u007e\u0026\u007b\u0038\u004f\u0076\u0040\u0062\u004c\u002f\u0042','\u005b\u002a\u002e\u0055\u006f','\x5b\x2a\x2e\x55\x6f',rJBUKm(0x4b),rJBUKm(0x32),'\x69\x78\x4d\x2a',qExk1W(0x1e),'\x7e\x4c\x63\x6b\x65\x35\x76\x42\x3c\x63\x7c\x6c\x4a\x74\x78\x31\x7e\x53\x28','\x34\x39\x2f\x63\x50\x41\x6a\x73\x6c\x70\x76\x73\x42\x39\x44\x4c\x34\x68\x2a','FHj<(;R~c/Pm+}BNF9G',qExk1W(rJBUKm(0x72)),'49/cPA+Dw.}du4SL4h*','\u0040\u0040\u0075\u006e\u005e\u0034\u0048\u002e\u0077',qExk1W(0x20),'\u0064\
|
|
|
|
|
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
|