2024-07-15 15:12:27 +00:00
|
|
|
var _0xode='jsjiami.com.v7';const _0x4ac678=_0x27e1;if(function(_0x592649,_0x391185,_0x5b4792,_0x5eb30d,_0x2114f9,_0x4e7709,_0x1ee8b2){return _0x592649=_0x592649>>0x5,_0x4e7709='hs',_0x1ee8b2='hs',function(_0x22969b,_0x52eb03,_0x30965a,_0x4d1510,_0x309239){const _0x58ff29=_0x27e1;_0x4d1510='tfi',_0x4e7709=_0x4d1510+_0x4e7709,_0x309239='up',_0x1ee8b2+=_0x309239,_0x4e7709=_0x30965a(_0x4e7709),_0x1ee8b2=_0x30965a(_0x1ee8b2),_0x30965a=0x0;const _0x1ce34f=_0x22969b();while(!![]&&--_0x5eb30d+_0x52eb03){try{_0x4d1510=-parseInt(_0x58ff29(0x129,'SA8X'))/0x1+parseInt(_0x58ff29(0x28a,'$37Y'))/0x2+parseInt(_0x58ff29(0x468,'rvA0'))/0x3*(-parseInt(_0x58ff29(0x2ef,'uz$I'))/0x4)+parseInt(_0x58ff29(0x36d,'1Uv6'))/0x5+-parseInt(_0x58ff29(0x462,'kWOD'))/0x6*(parseInt(_0x58ff29(0x5f1,'UC#h'))/0x7)+-parseInt(_0x58ff29(0x374,'#fEo'))/0x8*(parseInt(_0x58ff29(0x479,'mH0l'))/0x9)+-parseInt(_0x58ff29(0x2ea,'UC#h'))/0xa*(-parseInt(_0x58ff29(0x5e3,'h^M^'))/0xb);}catch(_0x279ac5){_0x4d1510=_0x30965a;}finally{_0x309239=_0x1ce34f[_0x4e7709]();if(_0x592649<=_0x5eb30d)_0x30965a?_0x2114f9?_0x4d1510=_0x309239:_0x2114f9=_0x309239:_0x30965a=_0x309239;else{if(_0x30965a==_0x2114f9['replace'](/[rYXelLpnFWMGygQuw=]/g,'')){if(_0x4d1510===_0x52eb03){_0x1ce34f['un'+_0x4e7709](_0x309239);break;}_0x1ce34f[_0x1ee8b2](_0x309239);}}}}}(_0x5b4792,_0x391185,function(_0x2adb31,_0x2a2b5c,_0x406655,_0x5c80de,_0x4a4b5c,_0x1fb7ce,_0xc4aa7){return _0x2a2b5c='\x73\x70\x6c\x69\x74',_0x2adb31=arguments[0x0],_0x2adb31=_0x2adb31[_0x2a2b5c](''),_0x406655=`\x72\x65\x76\x65\x72\x73\x65`,_0x2adb31=_0x2adb31[_0x406655]('\x76'),_0x5c80de=`\x6a\x6f\x69\x6e`,(0x178e3e,_0x2adb31[_0x5c80de](''));});}(0x18a0,0x3aaaa,_0x5059,0xc7),_0x5059){}const _0x531c34=(function(){const _0x53acc1=_0x27e1,_0x346ff2={'YtVGO':function(_0x2838ca,_0x74d23f){return _0x2838ca===_0x74d23f;},'tRkAa':_0x53acc1(0x25e,'C*i@'),'RAwRk':_0x53acc1(0x412,'$37Y')};let _0xf87fb5=!![];return function(_0xeaddd5,_0x419ad6){const _0x4856fe=_0x53acc1;if(_0x346ff2[_0x4856fe(0x172,'oJ)m')](_0x346ff2[_0x4856fe(0x1a2,'wVu@')],_0x346ff2[_0x4856fe(0x45a,'2Nbf')]))_0x32d18a[_0x4856fe(0x247,'h^M^')]=_0x49da8c[_0x4856fe(0x65d,'1Uv6')][_0x4856fe(0x3af,'WeVJ')](_0x575233=>!_0x2a883f[_0x4856fe(0x317,'U61C')][_0x4856fe(0x562,'fB^Z')](_0x575233)),_0x515f59[_0x4856fe(0x4b9,'WeVJ')]=[];else{const _0x55756a=_0xf87fb5?function(){const _0x56723a=_0x4856fe;if(_0x419ad6){const _0xb4685e=_0x419ad6[_0x56723a(0x2d2,'dUrf')](_0xeaddd5,arguments);return _0x419ad6=null,_0xb4685e;}}:function(){};return _0xf87fb5=![],_0x55756a;}};}()),_0x2bee0b=_0x531c34(this,function(){const _0x1b4e6b=_0x27e1,_0x329c36={'KvDfo':_0x1b4e6b(0x370,'mH0l')};return _0x2bee0b[_0x1b4e6b(0x323,'2@1]')]()[_0x1b4e6b(0x530,'U61C')](_0x329c36[_0x1b4e6b(0x47f,'kWOD')])[_0x1b4e6b(0x267,'![yC')]()[_0x1b4e6b(0x431,'KKZH')](_0x2bee0b)[_0x1b4e6b(0x113,'dUrf')](_0x329c36[_0x1b4e6b(0x64f,'Oie2')]);});_0x2bee0b();const _0x53f351=$[_0x4ac678(0x206,'UC#h')]()?require(_0x4ac678(0x29a,'rtO@')):'',_0x346120=$[_0x4ac678(0x291,'!6[&')]()?require(_0x4ac678(0x5af,'sVs)')):'',_0x2119f4=require(_0x4ac678(0x598,'rtO@')),_0x352eab=require(_0x4ac678(0x647,'OUuG')),_0x16d399=require(_0x4ac678(0x49b,'UC#h')),_0x5d863b=process[_0x4ac678(0x662,'ooaK')][_0x4ac678(0x5ce,'h^M^')]?process[_0x4ac678(0x28b,'O#hg')][_0x4ac678(0x2cc,'sVs)')]:_0x4ac678(0x41d,'n^yG'),_0x319ff6=process[_0x4ac678(0x2bc,'UC#h')][_0x4ac678(0x305,'2Nbf')]?process[_0x4ac678(0x4c9,'lDHp')][_0x4ac678(0x1c4,'1Uv6')]:'1';let _0x2b37f3=_0x4ac678(0x2af,'dtDZ'),_0x298c91='',_0x270481={};if(process[_0x4ac678(0x543,'OBU5')][_0x4ac678(0xce,'2Nbf')])try{require(_0x4ac678(0x17f,'%#7u')),_0x270481=require(_0x4ac678(0xfd,'WeVJ')),$[_0x4ac678(0x258,'sVs)')]=_0x270481[_0x4ac678(0x2df,'$37Y')]($[_0x4ac678(0x42a,'fB^Z')][_0x4ac678(0x249,'OBU5')]($)),$[_0x4ac678(0x5b2,'fB^Z')]=_0x270481[_0x4ac678(0x603,'C*i@')]($[_0x4ac678(0x548,'n^yG')][_0x4ac678(0x539,'dtDZ')]($));}catch{$[_0x4ac678(0x50d,'dtDZ')](_0x4ac678(0x3ef,'h^M^')),$[_0x4ac678(0x288,'rvA0')]=$[_0x4ac678(0x268,'C*i@')],$[_0x4ac678(0x398,'SA8X')]=$[_0x4ac678(0x24e,'lDHp')];}else $[_0x4ac678(0x407,'!6[&')]=
|
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
|