2024-08-11 23:21:14 +00:00
|
|
|
var _0xodX='jsjiami.com.v7';const _0x1894b5=_0x5bb4;(function(_0x16f3b1,_0x506ed3,_0x28d1e6,_0x184cad,_0x717910,_0x1444de,_0x5e997b){return _0x16f3b1=_0x16f3b1>>0x7,_0x1444de='hs',_0x5e997b='hs',function(_0x261bd9,_0x44d197,_0x3f7ce,_0x27d7f8,_0x1ba0c1){const _0x5eec9e=_0x5bb4;_0x27d7f8='tfi',_0x1444de=_0x27d7f8+_0x1444de,_0x1ba0c1='up',_0x5e997b+=_0x1ba0c1,_0x1444de=_0x3f7ce(_0x1444de),_0x5e997b=_0x3f7ce(_0x5e997b),_0x3f7ce=0x0;const _0x30b033=_0x261bd9();while(!![]&&--_0x184cad+_0x44d197){try{_0x27d7f8=-parseInt(_0x5eec9e(0x2c3,'EjNY'))/0x1+parseInt(_0x5eec9e(0x31e,'u7]U'))/0x2*(-parseInt(_0x5eec9e(0x29d,'%ZJM'))/0x3)+parseInt(_0x5eec9e(0x1b8,'vvEr'))/0x4*(-parseInt(_0x5eec9e(0x31c,'tu20'))/0x5)+-parseInt(_0x5eec9e(0x24e,'RhG9'))/0x6+-parseInt(_0x5eec9e(0x2b8,'Vedz'))/0x7+-parseInt(_0x5eec9e(0x2a0,'EjNY'))/0x8*(parseInt(_0x5eec9e(0x21c,'BpJS'))/0x9)+parseInt(_0x5eec9e(0x244,'d3M&'))/0xa;}catch(_0x4cde90){_0x27d7f8=_0x3f7ce;}finally{_0x1ba0c1=_0x30b033[_0x1444de]();if(_0x16f3b1<=_0x184cad)_0x3f7ce?_0x717910?_0x27d7f8=_0x1ba0c1:_0x717910=_0x1ba0c1:_0x3f7ce=_0x1ba0c1;else{if(_0x3f7ce==_0x717910['replace'](/[TKfGUAEHXWNYFMuQP=]/g,'')){if(_0x27d7f8===_0x44d197){_0x30b033['un'+_0x1444de](_0x1ba0c1);break;}_0x30b033[_0x5e997b](_0x1ba0c1);}}}}}(_0x28d1e6,_0x506ed3,function(_0x55fd4b,_0xf78572,_0x5639e6,_0x293040,_0x5b705e,_0xf82541,_0x34e55b){return _0xf78572='\x73\x70\x6c\x69\x74',_0x55fd4b=arguments[0x0],_0x55fd4b=_0x55fd4b[_0xf78572](''),_0x5639e6=`\x72\x65\x76\x65\x72\x73\x65`,_0x55fd4b=_0x55fd4b[_0x5639e6]('\x76'),_0x293040=`\x6a\x6f\x69\x6e`,(0x17d6a8,_0x55fd4b[_0x293040](''));});}(0x6400,0x68a1b,_0x15f2,0xca),_0x15f2)&&(_0xodX=_0x15f2);const _0x379693=$[_0x1894b5(0x2b1,'zp6^')]()?require(_0x1894b5(0x1b7,'oZ^m')):'';let _0x2e90d5=[];function _0x5bb4(_0x458161,_0x210d9d){const _0x165d07=_0x15f2();return _0x5bb4=function(_0x51f41d,_0x302568){_0x51f41d=_0x51f41d-0x1af;let _0x15f25a=_0x165d07[_0x51f41d];if(_0x5bb4['IgzgGH']===undefined){var _0x5bb45e=function(_0x102c44){const _0xf2aa43='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x165694='',_0x19e2e8='',_0x37c858=_0x165694+_0x5bb45e;for(let _0x5e7ee1=0x0,_0x1185d9,_0x3d6fe6,_0x7331d7=0x0;_0x3d6fe6=_0x102c44['charAt'](_0x7331d7++);~_0x3d6fe6&&(_0x1185d9=_0x5e7ee1%0x4?_0x1185d9*0x40+_0x3d6fe6:_0x3d6fe6,_0x5e7ee1++%0x4)?_0x165694+=_0x37c858['charCodeAt'](_0x7331d7+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1185d9>>(-0x2*_0x5e7ee1&0x6)):_0x5e7ee1:0x0){_0x3d6fe6=_0xf2aa43['indexOf'](_0x3d6fe6);}for(let _0x330f54=0x0,_0x3efdbe=_0x165694['length'];_0x330f54<_0x3efdbe;_0x330f54++){_0x19e2e8+='%'+('00'+_0x165694['charCodeAt'](_0x330f54)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19e2e8);};const _0x235007=function(_0x343059,_0x4f0f70){let _0x11876d=[],_0x33ca64=0x0,_0x4bcab6,_0x53568c='';_0x343059=_0x5bb45e(_0x343059);let _0x1b0309;for(_0x1b0309=0x0;_0x1b0309<0x100;_0x1b0309++){_0x11876d[_0x1b0309]=_0x1b0309;}for(_0x1b0309=0x0;_0x1b0309<0x100;_0x1b0309++){_0x33ca64=(_0x33ca64+_0x11876d[_0x1b0309]+_0x4f0f70['charCodeAt'](_0x1b0309%_0x4f0f70['length']))%0x100,_0x4bcab6=_0x11876d[_0x1b0309],_0x11876d[_0x1b0309]=_0x11876d[_0x33ca64],_0x11876d[_0x33ca64]=_0x4bcab6;}_0x1b0309=0x0,_0x33ca64=0x0;for(let _0x53a247=0x0;_0x53a247<_0x343059['length'];_0x53a247++){_0x1b0309=(_0x1b0309+0x1)%0x100,_0x33ca64=(_0x33ca64+_0x11876d[_0x1b0309])%0x100,_0x4bcab6=_0x11876d[_0x1b0309],_0x11876d[_0x1b0309]=_0x11876d[_0x33ca64],_0x11876d[_0x33ca64]=_0x4bcab6,_0x53568c+=String['fromCharCode'](_0x343059['charCodeAt'](_0x53a247)^_0x11876d[(_0x11876d[_0x1b0309]+_0x11876d[_0x33ca64])%0x100]);}return _0x53568c;};_0x5bb4['kECRmT']=_0x235007,_0x458161=arguments,_0x5bb4['IgzgGH']=!![];}const _0x2ff08b=_0x165d07[0x0],_0x150fdb=_0x51f41d+_0x2ff08b,_0x5b28a5=_0x458161[_0x150fdb];if(!_0x5b28a5){if(_0x5bb4['OOTsuH']===undefined){const _0x3db02e=function(_0x529a91){this['FLlWKl']=_0x529a91,this['hBjeip']=[0x1,0x0,0x0],this['LKevYt']=function(){return'newState';},this['IjWqfq']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['dAWycH']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x
|
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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } 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 } isShadowrocket() { return "undefined" != typeof $rocket } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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.isNo
|