2024-07-10 01:47:44 +00:00
|
|
|
var _0xodZ='jsjiami.com.v7';const _0x3a64e6=_0x43cd;(function(_0x4a246c,_0x457ec3,_0x497b69,_0x95406e,_0x29ef7c,_0x3c95bb,_0x5c4d33){return _0x4a246c=_0x4a246c>>0x5,_0x3c95bb='hs',_0x5c4d33='hs',function(_0x5b89c6,_0x22cf5c,_0x37c0cf,_0xfc7391,_0x212e13){const _0x52316a=_0x43cd;_0xfc7391='tfi',_0x3c95bb=_0xfc7391+_0x3c95bb,_0x212e13='up',_0x5c4d33+=_0x212e13,_0x3c95bb=_0x37c0cf(_0x3c95bb),_0x5c4d33=_0x37c0cf(_0x5c4d33),_0x37c0cf=0x0;const _0x56800b=_0x5b89c6();while(!![]&&--_0x95406e+_0x22cf5c){try{_0xfc7391=parseInt(_0x52316a(0x38e,'e$sW'))/0x1*(-parseInt(_0x52316a(0x28c,'z4dD'))/0x2)+parseInt(_0x52316a(0x5dd,'WySz'))/0x3+parseInt(_0x52316a(0x3c1,'DtT&'))/0x4*(-parseInt(_0x52316a(0x6af,'zvGH'))/0x5)+parseInt(_0x52316a(0x74d,'07dG'))/0x6+parseInt(_0x52316a(0x4e7,'B5N^'))/0x7*(-parseInt(_0x52316a(0x60e,'a[kS'))/0x8)+parseInt(_0x52316a(0x196,'zvGH'))/0x9+parseInt(_0x52316a(0x46f,'G8LV'))/0xa;}catch(_0x1bb81e){_0xfc7391=_0x37c0cf;}finally{_0x212e13=_0x56800b[_0x3c95bb]();if(_0x4a246c<=_0x95406e)_0x37c0cf?_0x29ef7c?_0xfc7391=_0x212e13:_0x29ef7c=_0x212e13:_0x37c0cf=_0x212e13;else{if(_0x37c0cf==_0x29ef7c['replace'](/[NPydOFHBbtwGufTxUVEhSl=]/g,'')){if(_0xfc7391===_0x22cf5c){_0x56800b['un'+_0x3c95bb](_0x212e13);break;}_0x56800b[_0x5c4d33](_0x212e13);}}}}}(_0x497b69,_0x457ec3,function(_0x450e51,_0xdc501d,_0x1099c6,_0x1ede5a,_0x552020,_0x2d1689,_0xfebc46){return _0xdc501d='\x73\x70\x6c\x69\x74',_0x450e51=arguments[0x0],_0x450e51=_0x450e51[_0xdc501d](''),_0x1099c6=`\x72\x65\x76\x65\x72\x73\x65`,_0x450e51=_0x450e51[_0x1099c6]('\x76'),_0x1ede5a=`\x6a\x6f\x69\x6e`,(0x177ff4,_0x450e51[_0x1ede5a](''));});}(0x1820,0xb69f2,_0x1207,0xc3),_0x1207)&&(_0xodZ=0x1d5e);const _0x2b8f7e=$[_0x3a64e6(0x4ae,'k2Uo')]()?require(_0x3a64e6(0x253,'$ZF1')):'',_0x1bf700=$[_0x3a64e6(0x4ae,'k2Uo')]()?require(_0x3a64e6(0x17a,'G8LV')):'',_0x7791a8=require(_0x3a64e6(0x4d1,'c0!F')),_0x3c3565=require(_0x3a64e6(0x6d9,'c0!F')),_0x249f1e=require(_0x3a64e6(0x30e,'ES0L')),_0x3d1254=require(_0x3a64e6(0x379,'G8LV'));let _0x382a04=[],_0x4d2e21='',_0x698ae5='',_0x2f7da4='',_0x1cb36d='3';if(process[_0x3a64e6(0x732,'e5%w')][_0x3a64e6(0x398,')yck')]){const _0xe33e80=require(_0x3a64e6(0x458,'k2Uo'));$[_0x3a64e6(0x479,'B5N^')]=_0xe33e80[_0x3a64e6(0x56e,'5uOC')]($[_0x3a64e6(0x412,'z4dD')][_0x3a64e6(0x4c0,'qltE')]($)),$[_0x3a64e6(0x4bf,'JFy(')]=_0xe33e80[_0x3a64e6(0x1e9,'G8LV')]($[_0x3a64e6(0x51d,'93Sn')][_0x3a64e6(0x55f,'Q!2@')]($));}if($[_0x3a64e6(0x197,'G8LV')]()){Object[_0x3a64e6(0x133,'R$un')](_0x2b8f7e)[_0x3a64e6(0x731,'zvGH')](_0x293860=>{const _0xcd4672=_0x3a64e6;_0x382a04[_0xcd4672(0x35e,'GYEC')](_0x2b8f7e[_0x293860]);});if(process[_0x3a64e6(0x3a2,'Kmgo')][_0x3a64e6(0x6bb,'5uOC')]&&process[_0x3a64e6(0x3a2,'Kmgo')][_0x3a64e6(0x331,'Q!2@')]===_0x3a64e6(0x2be,'JFy('))console[_0x3a64e6(0x2e4,'X@pV')]=()=>{};}else _0x382a04=[$[_0x3a64e6(0x115,'DtT&')](_0x3a64e6(0x31c,'B5N^')),$[_0x3a64e6(0x661,']Kq)')](_0x3a64e6(0x569,']Kq)')),...jsonfomat($[_0x3a64e6(0x69d,'zvGH')](_0x3a64e6(0x5e1,'5uOC'))||'[]')[_0x3a64e6(0x218,'X@pV')](_0x1a08ae=>_0x1a08ae[_0x3a64e6(0x21b,'*0@G')])][_0x3a64e6(0x556,'OK0)')](_0x36314a=>!!_0x36314a);let _0x13779f=process[_0x3a64e6(0x146,'OK0)')][_0x3a64e6(0x7b0,'WySz')]||_0x3a64e6(0x615,'[CWE'),_0x461633=process[_0x3a64e6(0x29b,'CMD1')][_0x3a64e6(0x3b5,'^P)l')]||_0x3a64e6(0x4e3,'hXen'),_0x281efe=process[_0x3a64e6(0x7bf,'6%N@')][_0x3a64e6(0x5f4,'X@pV')]||'',_0x450e32=_0x3a64e6(0x21e,'ES0L');$[_0x3a64e6(0x697,'CMD1')]=_0x3a64e6(0x567,'lfTL'),$[_0x3a64e6(0x41e,'^WV#')]=$[_0x3a64e6(0xef,'ES0L')][_0x3a64e6(0x49e,'e5%w')](/oC[0-9a-z]+/)[0x0],$[_0x3a64e6(0x385,'hXen')]=[_0x3a64e6(0x419,'c0!F'),_0x3a64e6(0x696,'MVVE'),_0x3a64e6(0x3a6,'k2Uo'),_0x3a64e6(0x3f4,'$nCe')];_0x281efe!=''&&($[_0x3a64e6(0x777,'l0gZ')]=_0x281efe[_0x3a64e6(0x502,'z4dD')]('&'));$[_0x3a64e6(0x14c,'JFy(')]=_0x3a64e6(0x326,'CMD1'),$[_0x3a64e6(0x51b,'k2Uo')]=_0x3a64e6(0x45a,'^WV#'),$[_0x3a64e6(0x36d,'xzb9')]=![];let _0x35f756=[_0x3a64e6(0x62e,'5uOC')];$[_0x3a64e6(0x21c,'e5%w')]=_0x35f756[_0x5c6e6b(0x0,_0x35f756[_0x3a64e6(0x23a,']Kq)')])],$[_0x3a64e6(0x11b,'xzb9')]=process[_0x3a64e6(0x2b7,'*)a6')][
|
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
|