2024-08-19 18:33:00 +08:00
|
|
|
|
function fakerlobr27(){}var fakerkogzpv=Object['defineProperty'],fakerjrha7p,fakerzxy3i9,fakerk896ji,fakerstotgd,fakerlrl6f,fakernpmxvk,fakerwipop,faker50eqtr,faker5ntkak,fakerpglrkw,fakerj361vj,faker8e7pyb,faker2o36em,fakerwj4rd8,fakerragodf,fakerax6qj,faker5tdpph,fakeryznng,fakerktil5k,faker9dsuej,fakeryom2w8,fakerajp4gk;function fakerlvkixp(fakerlobr27){return fakerjrha7p[fakerlobr27<0x26?fakerlobr27-0x13:fakerlobr27>0x1ac?fakerlobr27-0x29:fakerlobr27-0x27]}fakerjrha7p=faker6vbl63.call(this);function faker4f626s(fakerlobr27,fakerkogzpv){return fakerzxy3i9.call(null,fakerlobr27,'length',{value:fakerkogzpv,configurable:!0x0})}fakerzxy3i9=Object.defineProperty;var fakergqsqvm=[],fakertl8wx9=['IT#mQ@26',';VY]>*L}f~~7E6',';VY]>*dlRNs','UG<L_9F1FsP8ht','lz[1r','|5LKjV77Nm^','rodIYY&sWqObu4','u#<Z]','H7@E=,g5','e?mtIFX[3}@','nO~lj','+5@j!','se{6G</R','se{6G</R','Sk5gg>]','/vMX(|P:nMg@ROn','ee9q[6{RSM(p^/rA:B','?[(SH','CAQS','.nP1nrDtJYDz_YBP:B','Tomg7','.nP1nrDt>OUm)T*AHB','.nP1nr/R','/}{SW6aR','.nP1nrDt>OH?_ksV+{Tw','.nP1nrDtJYQ?CYfQ7B','YoIk','.nP1nrDtJY)JkT]2u/IS','/}{SNynR','@}ZgG<9R','.nP1nrDtJY)JkTo_He3iQ*]','.nP1nrDtJYQ?W/OuToOS','on<oF`Os?w&|^uz::Q2=M1_U$1o','A/L6;|F<l','nn9KZ6#R','3ebGK','Bk)j','A/@jg>9R',fakerlvkixp(0x34),'Rk(g7','CRMcY(o2NKsZTY><czW2Nf)T76g3VA(4egJq7','cphjH','uvwj','RJ^Vtk^Prh<','RJ^V(2[X_>kB','/vMX(|hR','X/IS:>]','26%s~','se{6G</R','p3c=_0#',':ep63G:8DWZ','uX01ei7mmb','#ep63G:8DWCq/D/xSB','QdbwXzG2','#eFgrC]',fakerlvkixp(0x2b),'R!G=.9N2','@W)}<S~,,T','OA[gG<vB','.vrqH>]',fakerlvkixp(0x40),'(khjH','{K>s($Eg<xSM[','U9ugd6UFoFpE}>*A','KLtS/','+5p6QE]','uvXq_)9R','A/Fg{yB1U','!vFg7','He3iQ*N)[b','=pWy)<]','DATg?<&u$W_=PTm.};3q(|z:_WpEB','@cowg>/)[b','fvI|,=U<l','+5tSJLAR','JlFg&y@R','xHFg&y@R',fakerlvkixp(0x3b),'He3iQ*]','#eIS7GhR','DA:UDpZR','7v=j:>+)l',fakerlvkixp(0x27),'DATg?<&u$W_=PTm.=;$yv)I$a8daB','(khjH','DATg?<&u$W_=PTm.N2(g7',fakerlvkixp(0x43),'U90Ht<gR',';/tSH',fakerlvkixp(0x2a),'wkL6_[|hU8Z','wkL6_[KR','5uTw','U90Ht<?"$WJEdDn','wkL6_[LR','wkL6_[LRyb','wkL6Lda:nM1as/n.','wkL6S@rh@Wdalf','wkL6$DU<DW<%2Dn','wkL6$DKR','@/tSH>#R',fakerlvkixp(0x3f),'D$L)Jm[[q8','eQH^aOlh9','uvwj','ta/=/g,S','u!uZ1o*S','U9tSsGvU!M1','2_W,>I(6','#Q*ZztV6','8omw',fakerlvkixp(0x27),'*tfXPoI.5!9{ODP','^yLR7^36',fakerlvkixp(0x28),'rpQ)amr6','$qjRUoq6','fyl)+','`p`>OQ~6',')_C%pQ1jZ!]5|','U9tSsGvU!M1','2_W,>I(6',fakerlvkixp(0x29),'wI&bC*k>&^SpjW.f@#+YK4Jv!.g8[Wu;YUzc^]|G#$E{:r)','D$L)Jm~6','}28lJiKrf','#n),','U90Ht<GhEbf$dDt',fakerlvkixp(0x28),'rpQ)amr6','A/Fge<f<|`boB','Xsa1R9ZR',')_C%CO$6','0o3qfL9R','`p`>OQ~6','wkL6co!FybJEB','*tP74In*1YJ','lk8jqGPR',fakerlvkixp(0x29),'2G]4LU`q]|IcF8h0mu7MWs1=bh}{:8XZMe5n|JBzuAY$3@w',fakerlvkixp(0x31),fakerlvkixp(0x30),'.ANv','Z`<b=jD.uC~ta<f$."U];59;3m6','+5tSJLWt[;','Z`<b=jD.uC~ta<f$17!M42mdq','?d#)w|`MnTDKIhNji}qcpNo','JtXt@v"2I!YX6#j<[9}^;4B','aG,XpqC3sT*XMTNjA.@',fakerlvkixp(0x27),'kkXqniMml','uvwj',fakerlvkixp(0x2a),'Xsa1R9ZR',fakerlvkixp(0x27),fakerlvkixp(0x27),fakerlvkixp(0x35),'U94Kt<Ox$#','>sRo@p?tjb',':eaHA)7m/{','?o7X_>~a>8Z',';L[g[6jF!{','4v=jM9nR',':exl7','4v=jM9BF6`5oB','?o7X_>|ni8;pI@n','?o7X_>xB',fakerlvkixp(0x2c),'U94Kt</R','7/ISS@9R','U94Kt<Ox$#+%97hVKB','@cowi+@R',fakerlvkixp(0x2b),'jYP$','!1/{Os+ufrlV5*O@p8=+',',r/Gi)883[','v~D5Os+ufrlVa^4IR:#)74YK9}!M1vv1idBfAejbwhJ)inF|JS=yr','#dVH)WiO>|!f8Z$Xv$_*9TL:JUsd8ZXQ|"vKb1<','9/{6co#R',fakerlvkixp(0x2d),'/vfS%o#R',fakerlvkixp(0x2e),'?o7X_>Shl','t"2MBs##lfEAg$','#dVH)WiO>|!f8Z$Xv$_*9TL:JU','hVnJT1<','{,F.7g~q1!>i%E(<{kk','v~D5Os+ufrlVa^4IR:#)74)2dD9"{Gg1+:sm:{}0uK1z[Rc^]cec{h<ua','1YZ.&g<RD#2i|o"<DUW2;eB','v~D5Os+ufrlVa^4IR:#)74YK,!$ir`"y,rDfPuT0^.,ELv','o"i%Dnx~','W[Hnv^eJfe[wn*6!g;2','_}QjzD+g!WEM9HsT2w;','v~D5Os+ufrlVa^4IR:#)74+gilh^dEwT;OUftDqzyQ655R?YgS.:,s,4{','{$XaH','s<,(m>;5MA!pnSmZ[:R;','[/Eq2D?Kils^x.{1[$$','v~D5].{J1]_8)kO@~`=qC20YRJ%/.8jT+8G[Y&l9#:b{"4{2PoyGG17HSf0G#@g2','(khjH','v$|aK}9=',fakerlvkixp(0x3c),')w+!$mPpb3RokLmt9b[@rvUu)X0ZTRy/lQ=jo+9::w<J;Ot','u|~q`6`hZWKMRtKvSkfSKpqmwbgrI7#;Hn]D{A=`C#m%29/YF6D5.*X:1FaCJ/1I~5mwaV&bsaq','He,gC).R&[zDJQngisv/{A<ouOl@7hrY+7W:2^~PlOaa7h#;4`h!rK*Wx`h=xk1H82Zmh8l8
|
|
|
|
|
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
|