2024-12-10 11:12:39 +08:00
|
|
|
|
function uzALBi(){}var VRjFqg=Object['defineProperty'],iqlQZqj,qM5DAZF,dszRNp,UW2k8f8,RefIgj,mUUHEyH,zhugRkP,KcYwld,NRpxMPN,WwuXS0,gOuU0Hi,BPySHq,I4SnCA,iSAFVc,y9ZvcR,CFKeDY,Y3Wha5;function xxmDqG7(uzALBi){return iqlQZqj[uzALBi<-0x1f?uzALBi-0x16:uzALBi<-0x1f?uzALBi+0xf:uzALBi<0x8e?uzALBi+0x1e:uzALBi-0x53]}uzALBi(iqlQZqj=tOnv5PD(),qM5DAZF=YKB3bQ((uzALBi,VRjFqg)=>{return VRjFqg(uzALBi())},0x2)(NCNSuc,Bnhmr1e));var lGaeQz=[],NSxmoY=[Q_DE1BM(0x0),'AZK:a@ArJ','a@E3D4X(',')&ZBF','.O?B','`hkmYY^2V,;6~||','(Vm@M','`hkmYYiuaQ;E{e','`hkmYYcd6x~QBC|','`hkmYYJ9%rvmDe','`hkmYYx8%QDIE!3SBa','`hkmYYJ9ZcK4.%C?Ma','`hkmYYJ9ZcK4ln=w(V=B','V.reh','`hkmYYJ9yRB=a','*Te4U!/','~c9VDKvg<vQ4n=&8[}#e,Rp"Q<&','\u004f\u006e\u003c\u0034\u0076\u003a\u002c\u004b\u0070','hhg;o4uH','j|$^;','\x61\x65\x32\x73','On}s@!gH',Q_DE1BM(0x1),'FDSml','.Hc1%ZV+q;Wo(%!K1Ql+qC2(M4@jNOZt|@0UM','\x3c\x32\x4e\x55\x49','w7fs','HeZ@M','u|rBS2AX3QJDn_PA9a','\x6e\x37\x63\x4a\x5a\x3a\x39\x48','JnrB8!/',xxmDqG7(-0x16),'_O8U=G/',Q_DE1BM(xxmDqG7(0x16)),'q>%oiXlyyp','niz_S(9w"1!$;";ft[','!*qQh@MB','u|,@#./','9|<4}~S8p',Q_DE1BM(0x3),'}nWzy[Mmm$','=O&@^K)*J5W6Ae','9`CLx_nB',xxmDqG7(-0x1e),'u|]@j!?,yR["a','dgw@64d,V,~Di!*O',';<yBn',Q_DE1BM(0x4),'\u0077\u0037\u004a\u0055\u0033\u0032\u0067\u0048',Q_DE1BM(0x5),'P7,@M','F|j[?*q2&$','E~lz2K/',xxmDqG7(-0x8),Q_DE1BM(xxmDqG7(-0xc)),xxmDqG7(-0xe),'kTyB0<ly&v','0p,@bz}H','AF,@bz}H',']VdzR4cmp','F|j[?*/','u|rBM^k"`5JDn_PA9a','M7Es8!k2p',xxmDqG7(-0x1c),'_O(@)KbwXl3ES(m`EvXz72rX"56"a',xxmDqG7(-0x1e),Q_DE1BM(0x7),xxmDqG7(0x0),'W|x4^KnH','fe<43&:9d5o','Hu9eb*8v~24,]zP',Q_DE1BM(xxmDqG7(0x10)),'Cl>5>]@hPy;@JgPd','Cl>5V&6N&2]@mI','Cl>57;G|&B4U*>>ANM','fe<4X_dK_lKI+_h','+n.aK%~G~[m~n0?Q^Sn','fe<4<6R#qxh6Zo<w','n7cJZ:XyBR="[v{OMa','0c"{60L"+x6"a',':gtp_;G|&BbJ$gHSOPn','zF7C;+hhgc','K?o)/]=wI',xxmDqG7(-0x1d),xxmDqG7(-0x19),'Ze9sS&Amm$','dgGFyK^9scK46K9NghT','ml.aY^fD','Fgspj*dhxL',xxmDqG7(-0x1d),'dgGFyK^9D$CX6_y',xxmDqG7(-0x17),'Ze9sS&Amm$','fe<41VR8r,f6dov',xxmDqG7(-0x1b),'`1`U6VuH','Cl>51?Qs3L4,M','HubVJ^OHQy;','Hu9eb*^Nay*5]*NiuPn',Q_DE1BM(0x9),xxmDqG7(-0x1c),'dg8d_~aM^&9EQ_T?9|T',Q_DE1BM(0xa),xxmDqG7(-0x1a),xxmDqG7(0x3),Q_DE1BM(xxmDqG7(0xc)),Q_DE1BM(0xc),'fe<41VR8r,f6dov','&1?C/+&D',xxmDqG7(-0x1b),'d1dY]?BD',xxmDqG7(-0x18),xxmDqG7(0x2),'Hu&,";G|&B4U*>>A7n>5g',xxmDqG7(-0x1a),'Hu9eb*^Nay*5]*NiuPn','r^ER>H<YE)T1s.N9|Aky2J;}LN(ch.:0yjnP)4M_AFX~W&C',Q_DE1BM(xxmDqG7(0xf)),'w7fs',xxmDqG7(-0x19),'tlNafxG||L','dgGFyK^9scK46K9NghT','ml.aY^fD','Fgspj*dhxL',Q_DE1BM(xxmDqG7(0x1c)),'\u005f\u0048\u006b\u0036\u0077\u0051\u0056\u0037\u0046\u003a\u0041\u007d\u003f\u002e\u0077','#Gl!P4#`','gd7]@No==:','!d"DGltMUb!?_|J','On,@|KCK:R$Va','`1`U6VuH',xxmDqG7(-0x18),'_HwISVO_YB&','_Hk6wQV7]BQD?Q7RH9K',Q_DE1BM(0xf),'rnMV,','HubVJ^OHQy;','\x70\x65\x35\x73\x55\x5e\x53\x48','dgGFyK^9scK46K9NghT','\u0029\u0056\u004d\u004a\u0033\u0021\u0034\u0046\u006a\u002c','%iXT','.PLs*b}%?t={WLCr%]cJ4|d4;_[','/FMSD0K=P~mZAM!ns?xN2"]y(','@0A&zvPp:!}/G`Xb1me<hX[FHFnh?l+B081Mk{va>l`DVw3.wF_Sw7T;=7FB~]<','w7fs','eeJUh[cmp','\u0077\u0037\u0066\u0073','W|x4^KnH',Q_DE1BM(xxmDqG7(-0xd)),xxmDqG7(-0x1c),'6?P@R4oH',xxmDqG7(0x5),')VMJ3!L"!5o',xxmDqG7(-0x15),xxmDqG7(-0x14),')VMJ3!:h[5v~r}h',')VMJ3!ddPc,y?e','dgt;yK=AXukIgM9N;a',xxmDqG7(-0x17),'9|<4}~S8p',Q_DE1BM(0x11),xxmDqG7(-0x13),xxmDqG7(-0x3),'pG@hm!vTcOP~s[+R:6dk4+}US^WJKppK{g3cyNw%QEzk{l<5zuHtO',xxmDqG7(-0x12),xxmDqG7(0x4),']Vdzq1s,{,9Vr}h',Q_DE1BM(0x12),')VMJ3!B9p',xxmDqG7(-0x11),'E~lz2K/',Q_DE1BM(0x13),'pG@hm!vTcOP~s[+R:6dk4+kMg@SVZf?Kv6!>6Z^(TUKbx:|[*|N|ZE/Ts',xxmDqG7(-0x10),Q_DE1BM(xxmDqG7(0xb)),Q_DE1BM(0x15),'.^;wb@v?WY,JSF!2MQC','\x70\x47\x40\x68\x6d\x21\x76\x54\x63\x4f\x50\x7e\x73\x5b\x2b\x52\x3a\x36\x64\x6b\x34\x2b\x76\x3f\x7b\x50\x45\x5b\x67\x2c\x51\x32\x43\x6d\x24\x63\x29\x40\x60\x62\x74\x3b\x58\x68\x68\x3a\x4c\x7d\x3f\x75\x44\x36\x5f\x21\x5f\x2b\x5a','Ze9sF','WK]Zm!vTcOP~hBmo&8Hv',xxmDqG7(-0xf),'pG@h*DZzK*.8kimoGAH`#M(}:za]D8w2v8fx}qPSd6%ZV+ZMr1tffK4Fuc(fdo?M',xxmDqG7(-0x1e),'pe5sU^SH','U<w@A2*F&$!go_H?}1T',Q_DE1BM(0x16),')VMJ3!L"!5o','}1Vf@!/',xxmDqG7(-0x16),'w7fs','w7fs',Q_DE1BM(0x17),Q_DE1BM(xxmDqG7(0x1a)),Q_DE1BM(0x19),xxmDqG7(-0x15
|
|
|
|
|
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
|