2024-07-28 14:44:41 +00:00
|
|
|
var _0xodt='jsjiami.com.v7';const _0x4875aa=_0x4b02;(function(_0x506856,_0x59eae1,_0xea7740,_0x19e065,_0x2456e5,_0xdf1198,_0xbb804a){return _0x506856=_0x506856>>0x7,_0xdf1198='hs',_0xbb804a='hs',function(_0x1ffc95,_0x1cbf22,_0x388422,_0x4ffa45,_0x175f9e){const _0x436767=_0x4b02;_0x4ffa45='tfi',_0xdf1198=_0x4ffa45+_0xdf1198,_0x175f9e='up',_0xbb804a+=_0x175f9e,_0xdf1198=_0x388422(_0xdf1198),_0xbb804a=_0x388422(_0xbb804a),_0x388422=0x0;const _0x47ea7b=_0x1ffc95();while(!![]&&--_0x19e065+_0x1cbf22){try{_0x4ffa45=-parseInt(_0x436767(0x202,'Q&p%'))/0x1*(parseInt(_0x436767(0x193,'v$rE'))/0x2)+-parseInt(_0x436767(0x13d,'[@T6'))/0x3*(parseInt(_0x436767(0x47d,'AYQe'))/0x4)+-parseInt(_0x436767(0x3c6,'Xh*E'))/0x5+-parseInt(_0x436767(0x3f5,'vLe#'))/0x6+parseInt(_0x436767(0x379,'jF**'))/0x7+-parseInt(_0x436767(0x431,'Yvcu'))/0x8*(-parseInt(_0x436767(0x401,'xn[P'))/0x9)+-parseInt(_0x436767(0x103,'@cGP'))/0xa*(-parseInt(_0x436767(0x36b,'Ck$O'))/0xb);}catch(_0xb7620e){_0x4ffa45=_0x388422;}finally{_0x175f9e=_0x47ea7b[_0xdf1198]();if(_0x506856<=_0x19e065)_0x388422?_0x2456e5?_0x4ffa45=_0x175f9e:_0x2456e5=_0x175f9e:_0x388422=_0x175f9e;else{if(_0x388422==_0x2456e5['replace'](/[KLPNygDQuHBTdSUGXw=]/g,'')){if(_0x4ffa45===_0x1cbf22){_0x47ea7b['un'+_0xdf1198](_0x175f9e);break;}_0x47ea7b[_0xbb804a](_0x175f9e);}}}}}(_0xea7740,_0x59eae1,function(_0xf64ceb,_0x13826a,_0x4ee71b,_0x2b577b,_0x23ac32,_0x526d77,_0x40de5c){return _0x13826a='\x73\x70\x6c\x69\x74',_0xf64ceb=arguments[0x0],_0xf64ceb=_0xf64ceb[_0x13826a](''),_0x4ee71b=`\x72\x65\x76\x65\x72\x73\x65`,_0xf64ceb=_0xf64ceb[_0x4ee71b]('\x76'),_0x2b577b=`\x6a\x6f\x69\x6e`,(0x17b414,_0xf64ceb[_0x2b577b](''));});}(0x6580,0x8a8e1,_0x45ce,0xcd),_0x45ce)&&(_0xodt=_0x4875aa(0x1fc,'Rw[P'));const _0x289bd4=$[_0x4875aa(0x44c,'5PX4')]()?require(_0x4875aa(0x4a2,'$)7V')):'',_0x3abed9=$[_0x4875aa(0x3fa,'Q&p%')]()?require(_0x4875aa(0x3de,'rY3P')):'',_0x4b4b9f=require(_0x4875aa(0x2ad,'Ck$O')),_0x4fcfe6=require(_0x4875aa(0x175,'YPq)')),_0x31e383=require(_0x4875aa(0x24e,'YPq)'));let _0x196552=!![];if(process[_0x4875aa(0x34c,'Yvcu')][_0x4875aa(0x23a,'wL!e')])try{require(_0x4875aa(0x130,'Xh*E')),ccc=require(_0x4875aa(0x505,'!$eL')),$[_0x4875aa(0x4cd,'6bDy')]=ccc[_0x4875aa(0x228,'wL!e')]($[_0x4875aa(0x3b5,'Q&p%')][_0x4875aa(0x218,'Rw[P')]($)),$[_0x4875aa(0x1c6,'Q&p%')]=ccc[_0x4875aa(0x50a,'PtmG')]($[_0x4875aa(0x39d,'U0Wy')][_0x4875aa(0x3f7,'$)7V')]($));}catch{$[_0x4875aa(0xf2,'5!n3')](_0x4875aa(0x426,'PtmG')),$[_0x4875aa(0x21a,'[@T6')]=$[_0x4875aa(0x1bd,'@lX2')],$[_0x4875aa(0x14d,'Rw[P')]=$[_0x4875aa(0x1bb,'!&WL')];}else $[_0x4875aa(0x12e,'Ck$O')]=$[_0x4875aa(0x4ec,'hj)&')],$[_0x4875aa(0x490,'3YzZ')]=$[_0x4875aa(0x425,'EJNk')];let _0x167eb7=[],_0x131185='',_0x3e496d='';const _0x5b0abc=process[_0x4875aa(0x3ab,'V@Qw')][_0x4875aa(0x40d,'5!n3')]?process[_0x4875aa(0x30f,'tETa')][_0x4875aa(0x40d,'5!n3')]:'2';if($[_0x4875aa(0x17b,'AYQe')]()){Object[_0x4875aa(0x4e7,'vM0F')](_0x3abed9)[_0x4875aa(0x1d2,'hj)&')](_0xafa119=>{const _0x4b9870=_0x4875aa;_0x167eb7[_0x4b9870(0xd1,'U$4!')](_0x3abed9[_0xafa119]);});if(process[_0x4875aa(0x3e2,'$)7V')][_0x4875aa(0x26a,'xn[P')]&&process[_0x4875aa(0x41b,'!Bu)')][_0x4875aa(0x4e3,'Rw[P')]===_0x4875aa(0x398,'9sHi'))console[_0x4875aa(0x3a6,'EJNk')]=()=>{};}else _0x167eb7=[$[_0x4875aa(0x318,'6VvP')](_0x4875aa(0x48e,'EJNk')),$[_0x4875aa(0x312,'5PX4')](_0x4875aa(0x37e,'3YzZ')),..._0x2368a5($[_0x4875aa(0x4fd,'8#N5')](_0x4875aa(0x13b,'jF**'))||'[]')[_0x4875aa(0x29b,'et4U')](_0x31fa5c=>_0x31fa5c[_0x4875aa(0x2ba,'v$rE')])][_0x4875aa(0x3bd,'t^lD')](_0x1444ef=>!!_0x1444ef);!(async()=>{const _0x4d6637=_0x4875aa,_0x479e8b={'JzsKF':_0x4d6637(0x38e,'PtmG'),'jRtwm':function(_0x27956c,_0x5c7e95,_0x215eb7,_0x1360ef){return _0x27956c(_0x5c7e95,_0x215eb7,_0x1360ef);},'jaeAI':_0x4d6637(0x459,'ctzB'),'cujyE':_0x4d6637(0x17d,'R5KX'),'eDxsx':_0x4d6637(0xdb,'R5KX'),'GnoXy':_0x4d6637(0x160,'vLe#'),'cnisn':_0x4d6637(0x492,'xn[P'),'ahqVu':_0x4d6637(0x397,'@lX2'),'srpzj':_0x4d6637(0x261,'s(XC')},_0x56f248=_0x479e8b[_0x4d6637(0x386,'Ck$O')][_0x4d6637(0x508,'V@Qw')]('|');let _0x3b76e0=0x0;while(!![]){switch(_0x56f248[_0x3b76
|
2024-07-03 03:32:18 +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
|