2024-08-15 13:27:19 +00:00
|
|
|
var _0xods='jsjiami.com.v7';const _0x14c165=_0x2b74;(function(_0x49978c,_0x53fde9,_0x529a83,_0x2780bd,_0x428f33,_0x5e74f4,_0x20a5da){return _0x49978c=_0x49978c>>0x1,_0x5e74f4='hs',_0x20a5da='hs',function(_0x1676fa,_0x5dcb97,_0x3faab1,_0x509482,_0x591940){const _0x13cf10=_0x2b74;_0x509482='tfi',_0x5e74f4=_0x509482+_0x5e74f4,_0x591940='up',_0x20a5da+=_0x591940,_0x5e74f4=_0x3faab1(_0x5e74f4),_0x20a5da=_0x3faab1(_0x20a5da),_0x3faab1=0x0;const _0x2d6e01=_0x1676fa();while(!![]&&--_0x2780bd+_0x5dcb97){try{_0x509482=-parseInt(_0x13cf10(0x550,'Oft4'))/0x1*(-parseInt(_0x13cf10(0x37e,'CE0Q'))/0x2)+parseInt(_0x13cf10(0x5c4,'AdU$'))/0x3*(parseInt(_0x13cf10(0x4a4,'ZsKJ'))/0x4)+-parseInt(_0x13cf10(0x6c2,'hS[A'))/0x5*(parseInt(_0x13cf10(0x33b,'0Mdw'))/0x6)+parseInt(_0x13cf10(0x5e1,'zFAF'))/0x7*(-parseInt(_0x13cf10(0x72e,'n$bH'))/0x8)+parseInt(_0x13cf10(0x494,'XGs&'))/0x9*(parseInt(_0x13cf10(0x6da,'kVeQ'))/0xa)+-parseInt(_0x13cf10(0x480,'eSdF'))/0xb+-parseInt(_0x13cf10(0x305,'ZsKJ'))/0xc*(-parseInt(_0x13cf10(0x20a,'qmzk'))/0xd);}catch(_0x20f5fc){_0x509482=_0x3faab1;}finally{_0x591940=_0x2d6e01[_0x5e74f4]();if(_0x49978c<=_0x2780bd)_0x3faab1?_0x428f33?_0x509482=_0x591940:_0x428f33=_0x591940:_0x3faab1=_0x591940;else{if(_0x3faab1==_0x428f33['replace'](/[BdNSgfEtIqFQXnKLwUP=]/g,'')){if(_0x509482===_0x5dcb97){_0x2d6e01['un'+_0x5e74f4](_0x591940);break;}_0x2d6e01[_0x20a5da](_0x591940);}}}}}(_0x529a83,_0x53fde9,function(_0x5862d7,_0x37e587,_0x44f381,_0x102225,_0x3f4fb5,_0x100ee3,_0x5fa2c3){return _0x37e587='\x73\x70\x6c\x69\x74',_0x5862d7=arguments[0x0],_0x5862d7=_0x5862d7[_0x37e587](''),_0x44f381=`\x72\x65\x76\x65\x72\x73\x65`,_0x5862d7=_0x5862d7[_0x44f381]('\x76'),_0x102225=`\x6a\x6f\x69\x6e`,(0x17e4a5,_0x5862d7[_0x102225](''));});}(0x180,0x4d79c,_0x1c03,0xc2),_0x1c03)&&(_0xods=_0x1c03);const _0x239912=(function(){const _0x2e01da=_0x2b74,_0x156eee={'NLYsu':function(_0xc093a2,_0x45f4fc){return _0xc093a2!==_0x45f4fc;},'uUcvy':_0x2e01da(0x2c6,'qmzk'),'zNyPm':_0x2e01da(0x334,'&g9s'),'swVGw':function(_0x22de4a,_0x1809dd){return _0x22de4a!==_0x1809dd;},'qnpnx':_0x2e01da(0x2af,'IEqY'),'mWfxM':function(_0x52f5b6,_0x4d3319){return _0x52f5b6!==_0x4d3319;},'LwAdD':_0x2e01da(0x74f,'hS[A')};let _0x3b6d13=!![];return function(_0x267b9c,_0x345bf7){const _0x852e43=_0x2e01da;if(_0x156eee[_0x852e43(0x4fc,'IEqY')](_0x156eee[_0x852e43(0x549,'Ba4[')],_0x156eee[_0x852e43(0x37a,'&g9s')]))_0x374b18[_0x852e43(0x285,'7lrZ')](_0x3b28ef);else{const _0x1b954f=_0x3b6d13?function(){const _0x265234=_0x852e43;if(_0x156eee[_0x265234(0x52a,'2s7y')](_0x156eee[_0x265234(0x323,'XGs&')],_0x156eee[_0x265234(0x44f,']iiU')])){if(_0x345bf7){if(_0x156eee[_0x265234(0x460,'1H(F')](_0x156eee[_0x265234(0x5e8,'lMh(')],_0x156eee[_0x265234(0x33d,'nTpK')]))_0x260601[_0x265234(0x209,'bkU0')](_0x2ca4b9[_0x265234(0x2ee,'$FJ!')]);else{const _0x33e953=_0x345bf7[_0x265234(0x509,'bkU0')](_0x267b9c,arguments);return _0x345bf7=null,_0x33e953;}}}else _0x17562b[_0x265234(0x5eb,'*$ri')](_0x35b464,_0x345245);}:function(){};return _0x3b6d13=![],_0x1b954f;}};}()),_0x83decc=_0x239912(this,function(){const _0x1d7f04=_0x2b74,_0x18456d={'VoacG':_0x1d7f04(0x64b,'*Pxe')};return _0x83decc[_0x1d7f04(0x683,'wM0i')]()[_0x1d7f04(0x437,'hy!2')](_0x18456d[_0x1d7f04(0x281,']iiU')])[_0x1d7f04(0x315,'XGs&')]()[_0x1d7f04(0x547,'lMh(')](_0x83decc)[_0x1d7f04(0x66f,'nTpK')](_0x18456d[_0x1d7f04(0x593,'v7N2')]);});_0x83decc();function _0x1c03(){const _0x9dd5d0=(function(){return[...[_0xods,'nQjQsfBjXwiQIqafIKmLdi.UgcdqLoFNmPt.vSE7==','waXRWOu4','WProWP4xdG','W5GqWOFdLmkzheNdUbC+o1NcI8k8A8oQzeBcGCkXWQZcK8kPW4i6WObv','W78vcSo6','mSozleJdIa','mexdNM/dH2X5','W6NcJJpcRmog','WRZcJCkuWQW','D0rTpwW','WOOAWPCTW5dcL8o3','uSkuE8k+gW','i3hdSSkaeSoWlSoEW78','WQ3cOHNcQKu','WQhcO8keWRH2','krldJSo7ybSQWPW','mtCJwerA','WPXpW7FdGNO','iWPHW5/dOv/cT8kE','FwzVW6m','rCoptxVdPG','mZ87tq','W5aQW7JcL2BdRmon','vCk9wmobW4u','W6WtbSo6','WPqRWRFcP33cTCogWPJdUmkQ','WQjln8oQWPZcPW','W4tdRCk1aWi','57+M5yoc5OIn5yQV776E6i2K5B+NhG','g8oEkMVdMstcQG3cPhPcjSoepfm','W4NcNGZcO8o4','h8oknhFdGGhcRGFcUxPwhCociKi','W7NcMvyd','t8kYj28Mka','WRJdULXnWRG','tSkKkx4b','umkqqCoZW
|
2024-07-19 09:37:29 +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
|