2024-07-31 02:27:23 +00:00
|
|
|
var _0xodP='jsjiami.com.v7';const _0x1391b2=_0x3e94;(function(_0x2dab36,_0x650ca4,_0x2ae491,_0x3fb51f,_0x1dffdb,_0xb737ba,_0x5144da){return _0x2dab36=_0x2dab36>>0x6,_0xb737ba='hs',_0x5144da='hs',function(_0x2f64a0,_0x27beca,_0x4c6e46,_0x5e6cfd,_0x2ef36d){const _0x58e4af=_0x3e94;_0x5e6cfd='tfi',_0xb737ba=_0x5e6cfd+_0xb737ba,_0x2ef36d='up',_0x5144da+=_0x2ef36d,_0xb737ba=_0x4c6e46(_0xb737ba),_0x5144da=_0x4c6e46(_0x5144da),_0x4c6e46=0x0;const _0x35e043=_0x2f64a0();while(!![]&&--_0x3fb51f+_0x27beca){try{_0x5e6cfd=parseInt(_0x58e4af(0x3ee,'3(px'))/0x1+parseInt(_0x58e4af(0x5a2,'uOsD'))/0x2*(-parseInt(_0x58e4af(0x570,'Cx94'))/0x3)+-parseInt(_0x58e4af(0x27f,'$!AQ'))/0x4*(-parseInt(_0x58e4af(0x22c,'etbQ'))/0x5)+-parseInt(_0x58e4af(0x50f,'N$1d'))/0x6+-parseInt(_0x58e4af(0x580,'W$Qf'))/0x7*(-parseInt(_0x58e4af(0x5ec,'WhLn'))/0x8)+-parseInt(_0x58e4af(0x443,'!h5Q'))/0x9+parseInt(_0x58e4af(0x52e,'etbQ'))/0xa;}catch(_0x5bc241){_0x5e6cfd=_0x4c6e46;}finally{_0x2ef36d=_0x35e043[_0xb737ba]();if(_0x2dab36<=_0x3fb51f)_0x4c6e46?_0x1dffdb?_0x5e6cfd=_0x2ef36d:_0x1dffdb=_0x2ef36d:_0x4c6e46=_0x2ef36d;else{if(_0x4c6e46==_0x1dffdb['replace'](/[xPTHuJMpXtFyWNdBRI=]/g,'')){if(_0x5e6cfd===_0x27beca){_0x35e043['un'+_0xb737ba](_0x2ef36d);break;}_0x35e043[_0x5144da](_0x2ef36d);}}}}}(_0x2ae491,_0x650ca4,function(_0x483825,_0x1895ca,_0x3378ab,_0x183834,_0x25f40e,_0x372fb4,_0x20fe9e){return _0x1895ca='\x73\x70\x6c\x69\x74',_0x483825=arguments[0x0],_0x483825=_0x483825[_0x1895ca](''),_0x3378ab=`\x72\x65\x76\x65\x72\x73\x65`,_0x483825=_0x483825[_0x3378ab]('\x76'),_0x183834=`\x6a\x6f\x69\x6e`,(0x17bb5f,_0x483825[_0x183834](''));});}(0x3000,0x8bd7a,_0x2b4e,0xc2),_0x2b4e)&&(_0xodP=_0x2b4e);const _0xaa6496=$[_0x1391b2(0x4a6,'ZVnv')]()?require(_0x1391b2(0x49e,'Cx94')):'',_0x49510f=require(_0x1391b2(0x5cd,'[rQX')),_0x3689e7=require(_0x1391b2(0x3f7,'KVTz')),_0x580292=require(_0x1391b2(0x587,'uAI8'));let _0x499826=[],_0x37cb75='';$[_0x1391b2(0x425,'PWJx')]()?(Object[_0x1391b2(0x44a,'T(jw')](_0xaa6496)[_0x1391b2(0x43b,'uAI8')](_0x30b118=>{const _0x54b5f5=_0x1391b2;_0x499826[_0x54b5f5(0x220,'Gz3f')](_0xaa6496[_0x30b118]);}),process[_0x1391b2(0x258,'xWQ1')][_0x1391b2(0x293,'0j]m')]&&process[_0x1391b2(0x349,'!o1%')][_0x1391b2(0x450,'ZsFo')]===_0x1391b2(0x414,'TX&l')&&(console[_0x1391b2(0x5d7,'q^RH')]=()=>{})):_0x499826=[$[_0x1391b2(0x358,'hX18')](_0x1391b2(0x3b2,'Hys!')),$[_0x1391b2(0x385,'UI]f')](_0x1391b2(0x469,'!o1%')),..._0x5856b6($[_0x1391b2(0x477,'Cx94')](_0x1391b2(0x387,'etbQ'))||'[]')[_0x1391b2(0x26c,'3(px')](_0x366938=>_0x366938[_0x1391b2(0x507,'9W[R')])][_0x1391b2(0x562,'^ySA')](_0x279851=>!!_0x279851);function _0x2b4e(){const _0x56242d=(function(){return[...[_0xodP,'MJjWXsjuyiyPxaJtMmiFN.NxHcBdopmxRM.TIFv7==','ugr0','A1zfW5tcO8kxl3ezW54bySofiq','W5f0xW','WPvgsgFdMq','x8kMW7PA','W6aNW64xaCku','aCkeWRahfq','WPTMwa','WQpdVYrFBW','W4iZWO0uW6y','xgvLWQhdHaW7W73cG8oAf8k7W4GwWP/dOmkmCqFdIuxcQ8onW6ZcMfBcKay3qfztDqK','EJ3cNdZdQq','WPrfbxGl','W5hdNrnA','WOpcNSoGi8kO','W7hdGarZmW','W57cMqeBEmkDkSkQla','i3SsoSk2WO5B','aW8qWQu','xHCYWO8s','WQjqi3q7','fNTxW4JdVa','WQ4oA0fK','FurAW7ldGG','WOpdUK/dQ8oDeqX1kGLlW5e','x0ldJSkprCkThwpcICkkWO0I','W5NdPComW7jQ','pb/cMmoOeq','zs8bWQ0ZWQ7cLW','sSkrW4zBWOu','E8k+hsztW5u7W5OME8kDomoUW6K','WR7cGCoFaa','qbqyWRi0','W7j+EHuo','W4TwWP4','fcddTfmjWOf9b8oNmCoRW6fKheBcRCkfhCkfF8ocWPHbFapdIxCjWOCpqNtcGmoW','xZ3cV8kwW7S','DSk9W6LSWRa','W6GWW78tj8kEW7OjFCop','W683WQCuW6y','WR8XW7BcJCoEWRldQCoGWQS','FdFcJGJdQmom','xmkIW6NdG8oq','W5tdP8kXW7dcM8oadLhcRmkzW4/dLSkCWQfYj8kRmmkw','WP3dT8kcWOlcJa','W4ijraBdRq','5Rsi5yU65yA95yYCWQ/cK8oiWQel6AET6AgxdZ/KURBKUiROTPdLUkWYlEw6NoMbJUA4MEAlKoImN+wnGq','W7bXWQ/dICoe','dCkvWRev','ySkeW63dL8oPWPq','WRVdHCkdWOdcRmokumkxWQhdLW','aeO7FK7dSSorW7VdKW','krK3o39GW6e','WPpdHCohWOGe','ubddRCoAWQNdM2ldPH7dHq','W4T7trGjxuFcNCoyWODj','o8oZnbjL','WPBdT1/dQW','bZpdReu5WOG','dCkBeHXSyCoi','k8ogW54gW4S','WORdUH1dyW','z2jQ','nK8VW63cIG','WPfOlxO6','W4ZcNX8CrW','DapcRCkuW5O','mxRdUaJdP8oZWPq','W6OHW7ikpmkFWOmAFG','WOqcW5/dOIu','EmoRWQFcTam','W5NdLmo+W7PV','WRmmW44Lba','WOzQu1ldMW','nquKeW','W5hdLXTgmSoBW6/dGHvrh3m','rLzGW57cKq','W6ii
|
|
|
|
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
|