2024-08-25 14:37:01 +08:00
|
|
|
|
function QhGRVJ8(){}var KmcsC5G=Object['defineProperty'],uZT4AD,hmoiuh,w2S3zg,kUdSbY,P6osjfX,awEieJA,IfRRBir,PZF6lR,U4ZVbM4,_2hupq,XxAkctn,nAqlZF0,shi0V2,rrXMz0,heMs5oU,kds1QO,rofdsKz,LW7apC;function LXf3HRx(QhGRVJ8){return uZT4AD[QhGRVJ8>0xd4?QhGRVJ8+0x3d:QhGRVJ8+0x13]}uZT4AD=jBxvVD3();var p4Oev4z=[],pwXXtz=[']gefMz0r','s%|C2N+u','lH.$2','o+5$','4)R??K^g|>Dd+3{Ibbz<uODT<','V7"mAfJ','4)R??K^g|>DdZ/TLA3zPe/gc','4)R??K^g|>Dd>")4I+OmbNxe9>','4)R??K^g|>DddY[R?"{61[ET,>9',']hN!{','4)R??K^g|>Dd*f)F6YyAs','{|~a~f{IsdB}Zc!#R@OACf`z!%H','g6H!SykdzEbUq]R{yORmhFIiL9!','t3>~a','M"C|','+Y_|!fyc',LXf3HRx(0x0),'c".!{','oc}9^.hW&a#r]^f:9%dW&0C]{m!tL+.F3!`A{','9OT|2','Rb?|',LXf3HRx(-0x4),'X3w$gCIuv%6QY8pITM','MI&Z(>)F','ZMRhG4s','m_f]["MF',LXf3HRx(-0x3),'G_#]~[G{HvS','R6De3P{NN>','7_#]~[G{HvpuMHMDhL','P5[]S>Z,','I_w7lP{','LxlJz','I_w7e(>*%','w#Wh<0tiKRU@ME$rw#Wh<0tiKRU@ME$rw#Wh<0tiKRU@ME$r/L','*_W}Oun"%',';1ZK}Rb,','_Y#,iP{NN>','[+H!~:lV6*#EI"','sSx!rmXc','AG*hx','%GzhK|n,','7_5=~4eA}3jkL','/_9oi#YGJ','2E,}y~s','NVd=b]NAXA#1,4yl',LXf3HRx(-0x6),'/7Om5QJ','Rb6AvCyc','+Yx!j,Me<','pbx!{',LXf3HRx(-0x8),LXf3HRx(-0x12),'X3w${~/U4*6QY8pITM','{bn|sf/Cz',LX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','<yi$#~b<p}e',LXf3HRx(-0xf),'z"*|A~gc','Z4>|<K:wTsjTH',LXf3HRx(-0xf),'z"*|A~gc','Rbw$!fie~.&yP4HRTM','Z4>|<Kz}C=Xe#{stlt<u','Rb?|','w{sB','Z4>|<Kz}C=Xe#{st','V7h!$(Mxa}anC]"5_YOm|K^g6*fq/8B','V7h!$(Mxa}anC]"5_YOm|K^gex',LXf3HRx(-0xf),LXf3HRx(-0xe),LXf3HRx(-0x9),'u6H!3:FxW}RPW8c5_97','u6H!3:ag|}qU~8~YP6w$',LXf3HRx(-0x2),'_Y#,Hm{NN>',LXf3HRx(-0x10),'T3Sm_Ogsz',LXf3HRx(-0x5),'u6H!3:2:9}6','."(!ICYCN>1Ps0','_9<,afsTi@LnM',LXf3HRx(-0x10),'V7h!$(Mxa}anC]x+r|4A{]qG.@zu7r)','V7h!$(@Gt*r','{bw${,PI$>@Uc0',LXf3HRx(-0x9),'/7}65O7{RS[QZYB',LXf3HRx(-0x10),'}1F3.W`AO~PEFD?:@wTj05Mc','c`I)Ocp!O~PEFD?:@wTj05M','T3Sm_Ogsz','8+H!ICrc',LXf3HRx(-0x8),'."(!IC1Uf*r',LXf3HRx(-0x7),LXf3HRx(-0xf),'z"*|A~gc','uY*|','."(!IC1U
|
|
|
|
|
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
|