2024-07-22 06:31:16 +00:00
|
|
|
var _0xodk='jsjiami.com.v7';const _0x3410d3=_0x4577;(function(_0x2977b4,_0x1bb4c5,_0x17ae82,_0x2952bf,_0x2f70d5,_0x4749bd,_0x57b5f3){return _0x2977b4=_0x2977b4>>0x8,_0x4749bd='hs',_0x57b5f3='hs',function(_0x36cf9a,_0x4c2021,_0x5147f8,_0x4f3035,_0x5829ce){const _0x55b7da=_0x4577;_0x4f3035='tfi',_0x4749bd=_0x4f3035+_0x4749bd,_0x5829ce='up',_0x57b5f3+=_0x5829ce,_0x4749bd=_0x5147f8(_0x4749bd),_0x57b5f3=_0x5147f8(_0x57b5f3),_0x5147f8=0x0;const _0x3e2f17=_0x36cf9a();while(!![]&&--_0x2952bf+_0x4c2021){try{_0x4f3035=parseInt(_0x55b7da(0x467,'YYNv'))/0x1+-parseInt(_0x55b7da(0x5a5,'UoQV'))/0x2*(-parseInt(_0x55b7da(0xbd,'7P9h'))/0x3)+parseInt(_0x55b7da(0x36e,'@5*e'))/0x4+parseInt(_0x55b7da(0x1ce,'0hcN'))/0x5+-parseInt(_0x55b7da(0x181,'8J$['))/0x6*(-parseInt(_0x55b7da(0x5aa,'X@U*'))/0x7)+parseInt(_0x55b7da(0x5ed,'W5P('))/0x8*(parseInt(_0x55b7da(0x397,'F(BE'))/0x9)+parseInt(_0x55b7da(0x3d9,'Ve37'))/0xa*(-parseInt(_0x55b7da(0x5fd,'Ve37'))/0xb);}catch(_0x1dc79a){_0x4f3035=_0x5147f8;}finally{_0x5829ce=_0x3e2f17[_0x4749bd]();if(_0x2977b4<=_0x2952bf)_0x5147f8?_0x2f70d5?_0x4f3035=_0x5829ce:_0x2f70d5=_0x5829ce:_0x5147f8=_0x5829ce;else{if(_0x5147f8==_0x2f70d5['replace'](/[LOQkTfpwXJGSNgDPyxtdh=]/g,'')){if(_0x4f3035===_0x4c2021){_0x3e2f17['un'+_0x4749bd](_0x5829ce);break;}_0x3e2f17[_0x57b5f3](_0x5829ce);}}}}}(_0x17ae82,_0x1bb4c5,function(_0x277725,_0x2f63d6,_0x341b9d,_0x58a263,_0x1bb66e,_0x39ac0c,_0xd3324a){return _0x2f63d6='\x73\x70\x6c\x69\x74',_0x277725=arguments[0x0],_0x277725=_0x277725[_0x2f63d6](''),_0x341b9d=`\x72\x65\x76\x65\x72\x73\x65`,_0x277725=_0x277725[_0x341b9d]('\x76'),_0x58a263=`\x6a\x6f\x69\x6e`,(0x17a219,_0x277725[_0x58a263](''));});}(0xbf00,0xa2b6c,_0x33ff,0xc1),_0x33ff)&&(_0xodk=0x23c3);const _0xabc051=(function(){const _0x4eedb9=_0x4577,_0x3e2bb4={'ZdSil':_0x4eedb9(0x520,'N#3p'),'NNJOU':_0x4eedb9(0x361,'F(BE'),'kTWcH':_0x4eedb9(0x689,'wOO%'),'GQVNZ':function(_0x3830ac,_0x31b0d9){return _0x3830ac===_0x31b0d9;},'VCAGV':_0x4eedb9(0x193,'ZRxs'),'NnrNH':_0x4eedb9(0x348,'R8!P'),'tRMJe':_0x4eedb9(0x578,']vC6'),'XBdcx':function(_0x4dc5c1,_0x384740){return _0x4dc5c1!==_0x384740;},'SDicR':_0x4eedb9(0x4f7,'YcZC'),'jdtiB':_0x4eedb9(0x634,'giGX'),'bnkXJ':function(_0x396c06,_0x127a47){return _0x396c06===_0x127a47;},'mqSuO':_0x4eedb9(0x461,'(ImH'),'VHqCx':_0x4eedb9(0x412,'YcZC')};let _0x4cce41=!![];return function(_0x19501c,_0x365817){const _0x485915=_0x4eedb9,_0x43193b={'RCydp':_0x3e2bb4[_0x485915(0x3a5,'#@eb')],'iZwNn':_0x3e2bb4[_0x485915(0x409,'N#3p')],'eJGxX':_0x3e2bb4[_0x485915(0x349,']vC6')],'AuAgA':function(_0x227aa7,_0x43bdd5){const _0x5ee4d1=_0x485915;return _0x3e2bb4[_0x5ee4d1(0x5c6,'w%bY')](_0x227aa7,_0x43bdd5);},'lurhs':_0x3e2bb4[_0x485915(0x283,'UoQV')],'PMwnx':_0x3e2bb4[_0x485915(0x5e5,'@5*e')],'wGJmq':_0x3e2bb4[_0x485915(0x2f5,'557N')],'gKGzl':function(_0x2d91c5,_0x5017f5){const _0x4e881a=_0x485915;return _0x3e2bb4[_0x4e881a(0x468,'557N')](_0x2d91c5,_0x5017f5);},'lpwfB':_0x3e2bb4[_0x485915(0x2ab,'&JyY')],'BPHIQ':_0x3e2bb4[_0x485915(0x3cf,'wbpX')]};if(_0x3e2bb4[_0x485915(0x4e0,'8J$[')](_0x3e2bb4[_0x485915(0x179,'ZRxs')],_0x3e2bb4[_0x485915(0x5c9,'X@U*')]))_0x127143[_0x485915(0x60a,'w%bY')]('❌',_0x13620e[_0x485915(0x43d,'ssCA')][_0x485915(0x159,')vt8')],_0x23fcd6[_0x485915(0x3d4,'wOO%')][_0x485915(0x2fa,'F(BE')]);else{const _0x38bb58=_0x4cce41?function(){const _0x5d2d3b=_0x485915;if(_0x43193b[_0x5d2d3b(0x41f,')zSU')](_0x43193b[_0x5d2d3b(0x198,'lfzQ')],_0x43193b[_0x5d2d3b(0x35b,'(ImH')])){if(_0x493899)_0x5aa989[_0x5d2d3b(0x189,'#@eb')](''+_0x56ad5e[_0x5d2d3b(0xee,']vC6')](_0x50c82e,_0x32aa9c));else{if(_0xf99078[_0x5d2d3b(0x42d,'Oc!L')]('登录'))_0x5b6096[_0x5d2d3b(0x519,'W5P(')]=![];}}else{if(_0x365817){if(_0x43193b[_0x5d2d3b(0x2f9,'F(BE')](_0x43193b[_0x5d2d3b(0x1f6,')zSU')],_0x43193b[_0x5d2d3b(0x5f7,'Ml)W')])){const _0x326336=_0x365817[_0x5d2d3b(0x474,')zSU')](_0x19501c,arguments);return _0x365817=null,_0x326336;}else{var _0x845318=new _0x202a22[(_0x5d2d3b(0x43f,'Z(mL'))](_0x43193b[_0x5d2d3b(0xca,'5@sX')],_0x43193b[_0x5d2d3b(0x449,'#@eb')])[_0x5d2d3b(0x23e,'A4*#')](_0x43193b[_0x5d2d3b(0x680,']vC6')]);_0x357ff4[_0x5d2d3b
|
2024-06-28 07:47:44 +00:00
|
|
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|