2024-01-21 03:21:25 +00:00
|
|
|
|
var _0xodo='jsjiami.com.v7';const _0x82de25=_0x1260;(function(_0x1ba6c2,_0x250808,_0x1159a8,_0x8e47e8,_0x3d70cd,_0x184c6c,_0x45f874){return _0x1ba6c2=_0x1ba6c2>>0x7,_0x184c6c='hs',_0x45f874='hs',function(_0x315a55,_0x196e61,_0xeb2e28,_0x1720ae,_0x4cd57d){const _0x3f6d2a=_0x1260;_0x1720ae='tfi',_0x184c6c=_0x1720ae+_0x184c6c,_0x4cd57d='up',_0x45f874+=_0x4cd57d,_0x184c6c=_0xeb2e28(_0x184c6c),_0x45f874=_0xeb2e28(_0x45f874),_0xeb2e28=0x0;const _0x3507e2=_0x315a55();while(!![]&&--_0x8e47e8+_0x196e61){try{_0x1720ae=parseInt(_0x3f6d2a(0x386,'9gji'))/0x1*(parseInt(_0x3f6d2a(0xf75,'kWW5'))/0x2)+parseInt(_0x3f6d2a(0x299,'msCq'))/0x3*(-parseInt(_0x3f6d2a(0x56f,'zz5Y'))/0x4)+-parseInt(_0x3f6d2a(0xcc1,'qXUb'))/0x5+parseInt(_0x3f6d2a(0x10bc,'7qGU'))/0x6*(-parseInt(_0x3f6d2a(0x10a3,'byup'))/0x7)+parseInt(_0x3f6d2a(0x84b,'ezld'))/0x8*(-parseInt(_0x3f6d2a(0x20b,']2gP'))/0x9)+-parseInt(_0x3f6d2a(0x3e8,'QqO$'))/0xa*(-parseInt(_0x3f6d2a(0x22a,'Ff95'))/0xb)+-parseInt(_0x3f6d2a(0xf97,'ezld'))/0xc*(-parseInt(_0x3f6d2a(0x5b7,'ezld'))/0xd);}catch(_0x2382c1){_0x1720ae=_0xeb2e28;}finally{_0x4cd57d=_0x3507e2[_0x184c6c]();if(_0x1ba6c2<=_0x8e47e8)_0xeb2e28?_0x3d70cd?_0x1720ae=_0x4cd57d:_0x3d70cd=_0x4cd57d:_0xeb2e28=_0x4cd57d;else{if(_0xeb2e28==_0x3d70cd['replace'](/[UqPxVElORgtCLBIhTKuef=]/g,'')){if(_0x1720ae===_0x196e61){_0x3507e2['un'+_0x184c6c](_0x4cd57d);break;}_0x3507e2[_0x45f874](_0x4cd57d);}}}}}(_0x1159a8,_0x250808,function(_0x50ca35,_0x274133,_0x1bbf54,_0x153a04,_0x3bd73e,_0x5046c7,_0x5ea0a0){return _0x274133='\x73\x70\x6c\x69\x74',_0x50ca35=arguments[0x0],_0x50ca35=_0x50ca35[_0x274133](''),_0x1bbf54=`\x72\x65\x76\x65\x72\x73\x65`,_0x50ca35=_0x50ca35[_0x1bbf54]('\x76'),_0x153a04=`\x6a\x6f\x69\x6e`,(0x1513c2,_0x50ca35[_0x153a04](''));});}(0x5e00,0x85565,_0x2022,0xbe),_0x2022)&&(_0xodo=0xbe);const _0x1b85fa=$[_0x82de25(0xea1,'BoVG')]()?require(_0x82de25(0xea7,'plVx')):'';let _0x4657d3='',_0x34f196=0xbb8,_0x5452ab=0x4,_0x1387f2=0x0;$[_0x82de25(0xd06,'j%k#')]=require(_0x82de25(0x499,'RSON'));const _0x420c8f=require(_0x82de25(0x559,'k%K7'));let _0x47d94b={};if(process[_0x82de25(0x2a3,'kWW5')][_0x82de25(0x25a,'3omG')])try{require(_0x82de25(0x6a7,')#Fc')),_0x47d94b=require(_0x82de25(0x3af,'8]pM')),$[_0x82de25(0x213,'ezld')]=_0x47d94b[_0x82de25(0x27c,'ezld')]($[_0x82de25(0x496,'RSON')][_0x82de25(0xd6c,'q(zP')]($)),$[_0x82de25(0xf2c,'1JVQ')]=_0x47d94b[_0x82de25(0x2c1,'RSON')]($[_0x82de25(0x41a,'cdl6')][_0x82de25(0xba3,'4D1H')]($));}catch{$[_0x82de25(0xa88,'iF&Y')](_0x82de25(0xb7e,'&@mm')),$[_0x82de25(0x50e,'byup')]=$[_0x82de25(0x383,'gImx')],$[_0x82de25(0x1043,'QyNO')]=$[_0x82de25(0x658,'vjk[')];}else $[_0x82de25(0xfb3,'zz5Y')]=$[_0x82de25(0xded,'X8DI')],$[_0x82de25(0x212,'zz5Y')]=$[_0x82de25(0x6b2,'Ff95')];let _0x216367=[],_0x3870cf='';if($[_0x82de25(0x922,'k%K7')]()){Object[_0x82de25(0x32d,'XW^9')](_0x1b85fa)[_0x82de25(0x1011,'byup')](_0x22e3f1=>{const _0x4c1e98=_0x82de25;_0x216367[_0x4c1e98(0x5d0,'j%k#')](_0x1b85fa[_0x22e3f1]);});if(process[_0x82de25(0x21d,'DbRu')][_0x82de25(0xfce,'9gji')]&&process[_0x82de25(0x3b3,'4D1H')][_0x82de25(0xfbb,'Xr4i')]===_0x82de25(0x119b,'7qGU'))console[_0x82de25(0xf9a,'hr[y')]=()=>{};}else _0x216367=[$[_0x82de25(0x7d2,'RSON')](_0x82de25(0xbfc,'V7J!')),$[_0x82de25(0xe6e,'7qGU')](_0x82de25(0x669,'QqO$')),..._0x51bc28($[_0x82de25(0xf96,'msCq')](_0x82de25(0x2d6,'BoVG'))||'[]')[_0x82de25(0xbbf,'qXUb')](_0x305a51=>_0x305a51[_0x82de25(0x887,'cdl6')])][_0x82de25(0xa53,'plVx')](_0x49cee0=>!!_0x49cee0);let _0x2aecde='';if(!_0x2aecde)_0x2aecde='';_0x2aecde=$[_0x82de25(0x538,'vjk[')]()?process[_0x82de25(0x204,'3omG')][_0x82de25(0xe18,'XW^9')]?process[_0x82de25(0x115f,'1r][')][_0x82de25(0x11e7,'8TDl')]:''+_0x2aecde:$[_0x82de25(0x11a2,'gImx')](_0x82de25(0x888,'9gji'))?$[_0x82de25(0xba7,'ezld')](_0x82de25(0x7f9,'zlB(')):''+_0x2aecde,_0x5452ab=$[_0x82de25(0x688,'9gji')]()?process[_0x82de25(0xbda,'8TDl')][_0x82de25(0x7fe,')FK1')]?process[_0x82de25(0xba0,'8]pM')][_0x82de25(0xdf4,'7qGU')]:''+_0x5452ab:$[_0x82de25(0xe38,'kr&j')](_0x82de25(0xa40,'QyNO'))?$[_0x82de25(0xb31,'kWW5')](_0x82de25(0x10f1,'qXUb')):''+_0x5452ab,_0x34f196=$[_0x82de2
|
2024-01-17 12:54:05 +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
|