2024-12-11 16:57:36 +08:00
|
|
|
|
function gPVvfh(){}var _KNwBv1=Object['defineProperty'],E2N96v1,S7cEIIN,oNZQadY,HZUe5o,u2DX4o,M0NYUf,DCrn9NN,kTv0z7T,oasMIuo,IAru5ZR,jvQcumj,Anmjfn,OKaeUw3,K2N4M7,WM20EK,qbbe_m,kqULyp,tqoDW5d;function q9d9HJ(gPVvfh){return E2N96v1[gPVvfh>-0x27?gPVvfh>0x31?gPVvfh+0x34:gPVvfh<-0x27?gPVvfh+0x56:gPVvfh>0x31?gPVvfh-0x37:gPVvfh+0x26:gPVvfh+0x2b]}gPVvfh(E2N96v1=yuIdff4(),S7cEIIN=sOm95m((gPVvfh,_KNwBv1)=>{return _KNwBv1(gPVvfh())},0x2)(Shq9uid,Kfm3vKD));var zE5vkh=[],WXMSXG=['wYzdgB>RQ','\u007a\u0059\u0028\u0051\u007c\u0029\u002b\u006e','p|9s3](B','p;8U(','#/"U','WtJssjR*$1mC?u@gh/E$=jyXb','WtJssjR*$1mC?u@gh/5$=jyXb',Si8RJ1(q9d9HJ(-0x1c)),'\x57\x74\x4a\x73\x73\x6a\x52\x2a\x24\x31\x6d\x43\x3f\x75\x40\x67\x6c\x7c\x72\x73\x53\x70\x6c\x7d\x34\x41','WtJssjR*$1mC?u@gx$E$n5l}4A','WtJssjR*$1mC?u@givf[3',Si8RJ1(q9d9HJ(-0x12)),Si8RJ1(0x2),Si8RJ1(0x3),'/7M$@5v!',Si8RJ1(q9d9HJ(-0x13)),';[s$',q9d9HJ(-0x25),'Qc&a+]~>B,/`J+A?ae4>B}|JN.[Ymv]Ug[I)N','aPk$(','|=F+Tq7!',Si8RJ1(q9d9HJ(-0x22)),q9d9HJ(-0x26),Si8RJ1(0x6),q9d9HJ(-0x21),'H=P+4T}Q,C#<7,7ZUO',q9d9HJ(-0x26),q9d9HJ(-0x24),'!J5Y35w','JIs$',q9d9HJ(-0x25),Si8RJ1(0x7),'H=^U*yZ9c:[67,3ZkO','7I0[8jk!','\x5b\x37\x5e\x55\x7d\x35\x77',Si8RJ1(q9d9HJ(-0x10)),',/}<&mw','`z.MXE`w*=f','5)#FzkNooj','H=P+4T}Q,C#<7,7ZUO','p85Z&(Qi','H=A@_#w','k=K+MP*}S','G:QeM6_i',Si8RJ1(0x9),'A_~>WH##OS',q9d9HJ(-0x23),'&/;@Tqpz[Q|eZ)','`D{~fMui',Si8RJ1(0xa),'(=y$9Pn}S','%i>.z4w','bvJ@e+bA2AP6>5z/','nK.U7','uoP+"6w','JI[<cyv!','/7A@FYO]b','3IA@f','H=^UfTuXWQ[67,3ZkO','fIE$}5uyS','JIs$','\x5b\x37\x5e\x55\x7d\x35\x77',Si8RJ1(0xb),'(=;@fYl!','zo2@zl]{YB0N57&J',',/r@pq$A2A[XO',q9d9HJ(-0x20),'zo2@UDRs301xOR]/fO','\u0073\u0029\u004b\u002b\u0044\u005d\u0031\u0041\u0049\u0046','s)K+KeRsI0VEO','O)f[V;jkbQl','s)K+a2H!','s)K+KeX}t0]X|7tW','s)K+c;K!Y1',Si8RJ1(0xc),'!=rir#4_;d6Oy;s',Si8RJ1(0xd),'A<!%',Si8RJ1(q9d9HJ(-0x14)),'s)K+D]Z{MH`nqKKJkO',Si8RJ1(q9d9HJ(-0x1a)),q9d9HJ(-0x24),'[7^U}5w','JIs$','[7^U}5w',Si8RJ1(0x10),'[7^U}5w',q9d9HJ(-0x23),q9d9HJ(-0x24),'A@k$%a<qS',q9d9HJ(-0x24),'\u004a\u005b\u006d\u005d\u003d\u007e\u0066\u007b\u007b\u0031',',/}<&mw','}=P+4T}Q,Cl',Si8RJ1(0x11),Si8RJ1(q9d9HJ(-0x22)),Si8RJ1(q9d9HJ(-0x18)),Si8RJ1(0x13),'k=K+MP*}S',':2W<+qF!','M7|Y.~f{{1',Si8RJ1(0x14),Si8RJ1(q9d9HJ(-0x6)),'fIE$}5uyS','f=rs_ac{]ACX:qRh#7W<2+}}=^',q9d9HJ(-0x21),q9d9HJ(-0x1f),'\x3c\x4b\x3d\x59\x34\x54\x7d\x7d\x53','XZ:U+$4/kM}rDo8!{exYbOllZ.',Si8RJ1(q9d9HJ(-0x7)),'Ma2@;+uXOCK',q9d9HJ(-0x20),'8)k$(','f=rs_ac{]ACX:qRh#7W<2+}}=^',Si8RJ1(0x17),'&/;@Tqpz[Q|eZ)',Si8RJ1(q9d9HJ(-0x5)),'JIs$','7I}<f',q9d9HJ(-0x1f),q9d9HJ(-0x1e),q9d9HJ(-0x24),'[7^U}5w','gI8@f',q9d9HJ(-0x1d),Si8RJ1(0x19),'A=M$Berb80l','roD@k','*7fT4T}}S','zo2@UDB_4Ql','H=D@cyu_80dE,)','JIs$',Si8RJ1(0x1a),'\x48\x3d\x44\x40\x63\x79\x75\x5f\x38\x30\x64\x45\x2c\x29',Si8RJ1(0x1b),'DCp9x}u','zo2@UDB_4Ql','roD@k','*7fT4T}}S',Si8RJ1(0x1c),Si8RJ1(q9d9HJ(-0x2)),Si8RJ1(0x1e),'JIs$','[7^U}5w',q9d9HJ(-0x1e),'JIs$',Si8RJ1(q9d9HJ(-0x8)),'zo2@UDRs301xOR]/fO',q9d9HJ(-0x24),'k=K+MP*}S',Si8RJ1(0x1f),'bI(b^','\x62\x76\x4a\x40\x4d\x60\x77','\x3d\x4b\x54\x2c\x7c\x57\x77','HKF++qQ_WQo2O',Si8RJ1(0xb),'\x62\x76\x4a\x40\x4e\x60\x77',']7$[}5[_%F8{w','+V`<e+n*j1cE*r{W','\u0048\u003d\u005e\u0055\u0068\u0050\u0042\u007d\u0037\u0046\u0029\u0021\u007a\u0029\u002a\u007d\u0050\u0032\u003b\u0040\u0040\u0054\u0057\u0021',Si8RJ1(0x20),'bvy$}5w',Si8RJ1(0x21),Si8RJ1(q9d9HJ(0x0)),'[|X]K+DG.;T`,K.','?h")','II_<e+$bI1NXO','H=^UI"ofb',Si8RJ1(0x23),'))2@mYof$1i9O','zo2@UDRs301xOR]/fO','[|X]K+DGS','qod<^Yxv81n0g,.',',aP+.','\x6a\x53\x4b\x2b\x72\x72\x6a\x6b\x78\x31\x58','[|X]!vl!','\u0071\u0060\u0054\u0035\u0052','"Mol~`w','97A@c;OAuCd2m5HV{")(%Yg!','<IP+yGrb"A;XG)','O/W,x@%1Is','s)K+a2H!','s)K+7',',/r@pq$A2A[XO',Si8RJ1(0x24),Si8RJ1(0x25),q9d9HJ(-0x20),'A=M$Berb80l','Cd1[^',q9d9HJ(-0x24),'JI[<;+xX5Ql',Si8RJ1(q9d9HJ(0x4)),Si8RJ1(0x26),'m2M$','k=^U@TH!','A=2sn5JAb',Si8RJ1(0x27),'bvy$.j6bI0B:Nr}"gIQ$a4B}=^P:z,|V,/uoa(3a!','d$4<)pC{dtY,u,i"uFo','fjk$|<A|{1ZB7,&JvLj7d','d$4<)pC{*e^06KkVH=o','\u002b\u007c\u0076\u0035\u0061\u002b\u0077',Si8RJ1(0x28),'4=rs?<;GMHCXO','zgQ$@5mkLbeyH&t','Rz(XCW^R|#~5&S},e#Hgl"M=Q#B3m%Z_A@}o815Ft',Si8RJ1(q9d
|
|
|
|
|
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
|