2024-01-20 12:29:25 +00:00
|
|
|
var _0xods='jsjiami.com.v7';const _0x24a087=_0xd141;(function(_0xe4a05,_0x509a38,_0x382743,_0x5e7f4a,_0x56a02f,_0xeebb4e,_0x206ae4){return _0xe4a05=_0xe4a05>>0x4,_0xeebb4e='hs',_0x206ae4='hs',function(_0x9c7487,_0x4b35ac,_0x5d2225,_0x2aa40d,_0x4a5f41){const _0x5ef9fe=_0xd141;_0x2aa40d='tfi',_0xeebb4e=_0x2aa40d+_0xeebb4e,_0x4a5f41='up',_0x206ae4+=_0x4a5f41,_0xeebb4e=_0x5d2225(_0xeebb4e),_0x206ae4=_0x5d2225(_0x206ae4),_0x5d2225=0x0;const _0x37f9a9=_0x9c7487();while(!![]&&--_0x5e7f4a+_0x4b35ac){try{_0x2aa40d=-parseInt(_0x5ef9fe(0x191,'9zuj'))/0x1+-parseInt(_0x5ef9fe(0x493,'jz1b'))/0x2+parseInt(_0x5ef9fe(0x31e,'PSRT'))/0x3*(parseInt(_0x5ef9fe(0x521,'KfPo'))/0x4)+parseInt(_0x5ef9fe(0x39c,'5B]N'))/0x5+-parseInt(_0x5ef9fe(0x4c5,'@OX3'))/0x6+-parseInt(_0x5ef9fe(0x1df,'wwfd'))/0x7+-parseInt(_0x5ef9fe(0x4ba,'&!xS'))/0x8*(-parseInt(_0x5ef9fe(0x352,'cWit'))/0x9);}catch(_0x33e7f4){_0x2aa40d=_0x5d2225;}finally{_0x4a5f41=_0x37f9a9[_0xeebb4e]();if(_0xe4a05<=_0x5e7f4a)_0x5d2225?_0x56a02f?_0x2aa40d=_0x4a5f41:_0x56a02f=_0x4a5f41:_0x5d2225=_0x4a5f41;else{if(_0x5d2225==_0x56a02f['replace'](/[qnBpfJCbrlehuSXgWFGU=]/g,'')){if(_0x2aa40d===_0x4b35ac){_0x37f9a9['un'+_0xeebb4e](_0x4a5f41);break;}_0x37f9a9[_0x206ae4](_0x4a5f41);}}}}}(_0x382743,_0x509a38,function(_0x2abb1d,_0x321801,_0x58975b,_0x8f5341,_0x17f644,_0x58a569,_0x487705){return _0x321801='\x73\x70\x6c\x69\x74',_0x2abb1d=arguments[0x0],_0x2abb1d=_0x2abb1d[_0x321801](''),_0x58975b=`\x72\x65\x76\x65\x72\x73\x65`,_0x2abb1d=_0x2abb1d[_0x58975b]('\x76'),_0x8f5341=`\x6a\x6f\x69\x6e`,(0x1512d1,_0x2abb1d[_0x8f5341](''));});}(0xcc0,0x608d5,_0x2293,0xce),_0x2293)&&(_0xods=0x6ba);const _0x1ccdd5=$[_0x24a087(0x374,'64)J')]()?require(_0x24a087(0x553,'(G#v')):'',_0x4077c1=$[_0x24a087(0x47c,'G[51')]()?require(_0x24a087(0x647,'S7$f')):'',_0x365c2f=require(_0x24a087(0x620,'Aai[')),_0x4635a8=require(_0x24a087(0x610,'Aai['));let _0x1e6e24=!![],_0x39944c=[],_0x1d1f32=[],_0x5c0c14=[],_0x2cad6a=[],_0x1f873e,_0x32fbec=[],_0x418cea='',_0xd7d9e4='',_0x3357fe='',_0x3669cb='',_0x1430ea;const _0x4db261=process[_0x24a087(0x239,'bldl')][_0x24a087(0x38b,')6CP')]||_0x24a087(0x4b8,'qi2G'),_0x56f03b=process[_0x24a087(0x594,'DZ3d')][_0x24a087(0x384,'DZ3d')]||'-1',_0xc314b5=process[_0x24a087(0x397,'KfPo')][_0x24a087(0x1cb,']5%8')]||'1',_0x330740=process[_0x24a087(0x5ef,'&RNG')][_0x24a087(0x6a0,'eHsL')]||'5',_0x42b7d6=process[_0x24a087(0x3b1,'Q^*)')][_0x24a087(0x19b,'6aqP')]||'1',_0x49972d=process[_0x24a087(0x660,'KXsq')][_0x24a087(0x612,'5B]N')]||'1',_0xd733b2=process[_0x24a087(0x371,'5B]N')][_0x24a087(0x536,'Ebo%')]||![],_0x3a8697=process[_0x24a087(0x1ae,'cWit')][_0x24a087(0x2c2,'Q^*)')]||'',_0x304996=process[_0x24a087(0x660,'KXsq')][_0x24a087(0x407,'KfPo')]||![],_0x1f8080=process[_0x24a087(0x34d,'eHsL')][_0x24a087(0x476,'wwfd')]||'',_0x5e33e3=process[_0x24a087(0x2e1,'iip3')][_0x24a087(0x23a,'G[51')]?process[_0x24a087(0x630,'u$]Y')][_0x24a087(0x3d4,'KdVM')]:![];if(process[_0x24a087(0x3ba,'9fCc')][_0x24a087(0x3aa,'wwfd')])try{_0x1f873e=require(_0x24a087(0x52e,'PSRT')),$[_0x24a087(0x2d9,'jz1b')]=_0x1f873e[_0x24a087(0x4a7,'KfPo')]($[_0x24a087(0x1fe,'5B]N')][_0x24a087(0x314,'J!ju')]($)),$[_0x24a087(0x1e3,'S7$f')]=_0x1f873e[_0x24a087(0x534,'w((z')]($[_0x24a087(0x410,'J!ju')][_0x24a087(0x47e,'RY7w')]($));}catch{$[_0x24a087(0x601,'1zAA')]=$[_0x24a087(0x57f,'A2GI')],$[_0x24a087(0x302,'xLiL')]=$[_0x24a087(0x63a,'u$]Y')];}else $[_0x24a087(0x1b6,'KXsq')]=$[_0x24a087(0x249,']5%8')],$[_0x24a087(0x27f,'u$]Y')]=$[_0x24a087(0x172,'bldl')];if($[_0x24a087(0x236,'Aai[')]()){Object[_0x24a087(0x33c,'qx!R')](_0x4077c1)[_0x24a087(0x2d7,'KdVM')](_0x559096=>{const _0x2de0fa=_0x24a087;_0x32fbec[_0x2de0fa(0x212,'qi2G')](_0x4077c1[_0x559096]);});if(process[_0x24a087(0x566,'T4&e')][_0x24a087(0x615,'xLiL')]&&process[_0x24a087(0x239,'bldl')][_0x24a087(0x642,'9zuj')]===_0x24a087(0x188,'LT#*'))console[_0x24a087(0x273,'G[51')]=()=>{};}else _0x32fbec=[$[_0x24a087(0x308,'(G#v')](_0x24a087(0x310,'aDL7')),$[_0x24a087(0x497,'J!ju')](_0x24a087(0x44c,'6aqP')),..._0x3922bd($[_0x24a087(0x609,'KfPo')](_0x24a087(0x30d,'64)J'))||'[]')[_0x24a087(0x69c,'J!ju')](_0x6671
|
2024-01-15 12:52:31 +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
|