2024-08-19 15:49:34 +00:00
|
|
|
|
var _0xodX='jsjiami.com.v7';const _0x1c3bd7=_0x557b;(function(_0x42b988,_0x1bc94a,_0x3bf53b,_0x57b932,_0x49353c,_0x21e956,_0xdbfbe7){return _0x42b988=_0x42b988>>0x1,_0x21e956='hs',_0xdbfbe7='hs',function(_0x3c26c5,_0xfbce39,_0x3c4f1a,_0x41050f,_0x2193bb){const _0xc6a7c=_0x557b;_0x41050f='tfi',_0x21e956=_0x41050f+_0x21e956,_0x2193bb='up',_0xdbfbe7+=_0x2193bb,_0x21e956=_0x3c4f1a(_0x21e956),_0xdbfbe7=_0x3c4f1a(_0xdbfbe7),_0x3c4f1a=0x0;const _0x23cab3=_0x3c26c5();while(!![]&&--_0x57b932+_0xfbce39){try{_0x41050f=-parseInt(_0xc6a7c(0x285,'*y9z'))/0x1*(parseInt(_0xc6a7c(0x203,'JCpP'))/0x2)+parseInt(_0xc6a7c(0x217,'DjBP'))/0x3*(parseInt(_0xc6a7c(0x57a,']34y'))/0x4)+-parseInt(_0xc6a7c(0x2a9,'zXD#'))/0x5*(-parseInt(_0xc6a7c(0x4df,']34y'))/0x6)+parseInt(_0xc6a7c(0x6be,'fa3L'))/0x7*(-parseInt(_0xc6a7c(0x3e2,'Tvxz'))/0x8)+-parseInt(_0xc6a7c(0x669,'qNgN'))/0x9+parseInt(_0xc6a7c(0x557,'k99i'))/0xa*(-parseInt(_0xc6a7c(0x295,'RQFm'))/0xb)+parseInt(_0xc6a7c(0x44b,'xPpn'))/0xc;}catch(_0x12c82a){_0x41050f=_0x3c4f1a;}finally{_0x2193bb=_0x23cab3[_0x21e956]();if(_0x42b988<=_0x57b932)_0x3c4f1a?_0x49353c?_0x41050f=_0x2193bb:_0x49353c=_0x2193bb:_0x3c4f1a=_0x2193bb;else{if(_0x3c4f1a==_0x49353c['replace'](/[RUbgXAKqDtWNeFGwLMrS=]/g,'')){if(_0x41050f===_0xfbce39){_0x23cab3['un'+_0x21e956](_0x2193bb);break;}_0x23cab3[_0xdbfbe7](_0x2193bb);}}}}}(_0x3bf53b,_0x1bc94a,function(_0x3c03fc,_0x5dae94,_0x3b4ac7,_0x3c2434,_0x425bcc,_0x2074b3,_0x3112b8){return _0x5dae94='\x73\x70\x6c\x69\x74',_0x3c03fc=arguments[0x0],_0x3c03fc=_0x3c03fc[_0x5dae94](''),_0x3b4ac7=`\x72\x65\x76\x65\x72\x73\x65`,_0x3c03fc=_0x3c03fc[_0x3b4ac7]('\x76'),_0x3c2434=`\x6a\x6f\x69\x6e`,(0x17ef0e,_0x3c03fc[_0x3c2434](''));});}(0x17a,0xf3df8,_0xb38f,0xbf),_0xb38f)&&(_0xodX=`\x799`);const _0x3639db=(function(){const _0x3db974=_0x557b,_0x2632e8={'ioflt':_0x3db974(0x6b4,'O$pk'),'fWbVk':function(_0x2fba23,_0x20289e){return _0x2fba23+_0x20289e;},'FdIXH':function(_0x911e59,_0x47815f){return _0x911e59+_0x47815f;},'UFrGF':function(_0x11f012,_0x298357){return _0x11f012!==_0x298357;},'aHczI':_0x3db974(0x60d,'hZNT')};let _0xfabde2=!![];return function(_0x394c20,_0x328b8d){const _0x29c524=_0xfabde2?function(){const _0x231aec=_0x557b,_0x4d9c31={'uKlPq':_0x2632e8[_0x231aec(0x2cd,'fa3L')],'dMTyW':function(_0x550ce4,_0x5d07c0){const _0x584105=_0x231aec;return _0x2632e8[_0x584105(0x516,'DjBP')](_0x550ce4,_0x5d07c0);},'fVznn':function(_0x3faf09,_0x9afb9b){const _0x5235e7=_0x231aec;return _0x2632e8[_0x5235e7(0x720,'sQ2s')](_0x3faf09,_0x9afb9b);}};if(_0x2632e8[_0x231aec(0x361,'BAZT')](_0x2632e8[_0x231aec(0x6a5,'*H51')],_0x2632e8[_0x231aec(0x308,'fa3L')])){if(_0x452d2d[_0x231aec(0x714,'UAXx')]?.[_0x4d9c31[_0x231aec(0x4d9,'JCpP')]])_0x39c36e[_0x231aec(0x45e,'$9u1')](_0x4d9c31[_0x231aec(0x398,'16$&')]('>\x20',_0xb18893[_0x231aec(0x712,'sQ2s')]?.[_0x4d9c31[_0x231aec(0x219,'BAZT')]]));else{if(_0x2e1925[_0x231aec(0x28a,'$9u1')])_0x3e5ff3[_0x231aec(0x6cf,'ew#3')]=!![],_0x2a0ec9[_0x231aec(0x676,'&7KU')](_0x4d9c31[_0x231aec(0x283,'qNgN')]('>\x20',_0x45bcba[_0x231aec(0x430,'4v9W')]));else _0x4f4202[_0x231aec(0x29c,'16$&')]?_0x587bbd[_0x231aec(0x676,'&7KU')](_0x4d9c31[_0x231aec(0x6b2,'&7KU')]('>\x20',_0x426a80[_0x231aec(0x53f,'0f3(')])):_0x72f79a[_0x231aec(0x43d,'BIgc')](_0x4d9c31[_0x231aec(0x4c9,'UAXx')](_0x4d9c31[_0x231aec(0x62c,'iP!c')](_0x4d9c31[_0x231aec(0x350,'H4[H')]('❓',_0xdc30ea),'\x20'),_0x199af5[_0x231aec(0x304,'E@SD')](_0x3d82c0)));}}else{if(_0x328b8d){const _0x47dcd4=_0x328b8d[_0x231aec(0x1fe,'qCV(')](_0x394c20,arguments);return _0x328b8d=null,_0x47dcd4;}}}:function(){};return _0xfabde2=![],_0x29c524;};}()),_0x580678=_0x3639db(this,function(){const _0x1d45b0=_0x557b,_0x57ea4c={'uKinW':_0x1d45b0(0x345,'BIgc')};return _0x580678[_0x1d45b0(0x6ff,'fa3L')]()[_0x1d45b0(0x6cc,'4v9W')](_0x57ea4c[_0x1d45b0(0x674,'XA[b')])[_0x1d45b0(0x738,'0f3(')]()[_0x1d45b0(0x637,'ZZ!L')](_0x580678)[_0x1d45b0(0x5da,'xPpn')](_0x57ea4c[_0x1d45b0(0x49d,'qCV(')]);});_0x580678();function _0x557b(_0x46469d,_0x2310fc){const _0x41f11c=_0xb38f();return _0x557b=function(_0x2490da,_0x51a01c){_0x2490da=_0x2490da-0x1e5;let _0xb38fab=_0x41f11c[
|
2024-06-28 07:47:44 +00:00
|
|
|
|
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
|