2024-07-28 14:44:41 +00:00
|
|
|
var _0xodT='jsjiami.com.v7';const _0xeb897c=_0x4d05;(function(_0x56c371,_0x37074e,_0x13ca06,_0x549439,_0x34a28d,_0x349044,_0xd4cf91){return _0x56c371=_0x56c371>>0x7,_0x349044='hs',_0xd4cf91='hs',function(_0x1b1c5d,_0x595320,_0x5f3dfe,_0x1a23de,_0x387d19){const _0x221371=_0x4d05;_0x1a23de='tfi',_0x349044=_0x1a23de+_0x349044,_0x387d19='up',_0xd4cf91+=_0x387d19,_0x349044=_0x5f3dfe(_0x349044),_0xd4cf91=_0x5f3dfe(_0xd4cf91),_0x5f3dfe=0x0;const _0x49b779=_0x1b1c5d();while(!![]&&--_0x549439+_0x595320){try{_0x1a23de=parseInt(_0x221371(0x4e6,'Ru0T'))/0x1*(parseInt(_0x221371(0x1fd,'Gt7@'))/0x2)+-parseInt(_0x221371(0x129,'tKb5'))/0x3*(-parseInt(_0x221371(0x385,'IRy0'))/0x4)+parseInt(_0x221371(0x515,'C!^0'))/0x5*(parseInt(_0x221371(0x233,'Z5cb'))/0x6)+parseInt(_0x221371(0x610,'wPV5'))/0x7+parseInt(_0x221371(0x219,'yt!R'))/0x8+-parseInt(_0x221371(0x1da,'HIsE'))/0x9+parseInt(_0x221371(0x57d,'Z5cb'))/0xa*(-parseInt(_0x221371(0x309,'Gt7@'))/0xb);}catch(_0x92f48b){_0x1a23de=_0x5f3dfe;}finally{_0x387d19=_0x49b779[_0x349044]();if(_0x56c371<=_0x549439)_0x5f3dfe?_0x34a28d?_0x1a23de=_0x387d19:_0x34a28d=_0x387d19:_0x5f3dfe=_0x387d19;else{if(_0x5f3dfe==_0x34a28d['replace'](/[PtnkSEQpVFdrqxYGKCTI=]/g,'')){if(_0x1a23de===_0x595320){_0x49b779['un'+_0x349044](_0x387d19);break;}_0x49b779[_0xd4cf91](_0x387d19);}}}}}(_0x13ca06,_0x37074e,function(_0x28dab3,_0x36dd95,_0x23a8e4,_0x454978,_0x11e6c0,_0x56804a,_0x852ba2){return _0x36dd95='\x73\x70\x6c\x69\x74',_0x28dab3=arguments[0x0],_0x28dab3=_0x28dab3[_0x36dd95](''),_0x23a8e4=`\x72\x65\x76\x65\x72\x73\x65`,_0x28dab3=_0x28dab3[_0x23a8e4]('\x76'),_0x454978=`\x6a\x6f\x69\x6e`,(0x17b413,_0x28dab3[_0x454978](''));});}(0x6300,0xb2c9d,_0x50b9,0xc8),_0x50b9)&&(_0xodT=_0xeb897c(0x391,'tKb5'));const _0x59b77c=$[_0xeb897c(0x541,'scTt')]()?require(_0xeb897c(0x55f,'x^^6')):'',_0x3bfeb7=$[_0xeb897c(0x185,'iY^O')]()?require(_0xeb897c(0x56a,'MfD1')):'',_0x16b7a0=require(_0xeb897c(0x597,'du!K')),_0x1b34c0=require(_0xeb897c(0x4f1,'ah8Y')),_0x1c55b4=require(_0xeb897c(0x630,'e9M3'));let _0x5baa7d=!![];if(process[_0xeb897c(0x1bd,'x^^6')][_0xeb897c(0x3e1,']cNN')])try{require(_0xeb897c(0x5cb,'NY&9')),ccc=require(_0xeb897c(0x1ab,'9kcU')),$[_0xeb897c(0x3e5,'km4t')]=ccc[_0xeb897c(0x3f5,'Z5cb')]($[_0xeb897c(0x270,'x^^6')][_0xeb897c(0x4f9,'R#Zv')]($)),$[_0xeb897c(0x587,'x^^6')]=ccc[_0xeb897c(0x1c8,'cpTv')]($[_0xeb897c(0x337,'du!K')][_0xeb897c(0x124,'km4t')]($));}catch{$[_0xeb897c(0x539,'6BmS')](_0xeb897c(0x24c,'tKb5')),$[_0xeb897c(0x19c,'6BmS')]=$[_0xeb897c(0x602,'uh7L')],$[_0xeb897c(0x3b6,'cpTv')]=$[_0xeb897c(0x348,'8hsG')];}else $[_0xeb897c(0x1fb,'Z5cb')]=$[_0xeb897c(0x21b,'Vj@K')],$[_0xeb897c(0x1f2,'^!71')]=$[_0xeb897c(0x2a6,'du!K')];function _0x4d05(_0x1a6281,_0x256be4){const _0x1dcdb7=_0x50b9();return _0x4d05=function(_0x152ced,_0xcaf179){_0x152ced=_0x152ced-0x11d;let _0x50b9e9=_0x1dcdb7[_0x152ced];if(_0x4d05['tilddP']===undefined){var _0x4d0537=function(_0x2f417d){const _0x5d0186='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x549bea='',_0x32d024='',_0x141104=_0x549bea+_0x4d0537;for(let _0x5506f9=0x0,_0x3930c0,_0x11c9dc,_0x27da3a=0x0;_0x11c9dc=_0x2f417d['charAt'](_0x27da3a++);~_0x11c9dc&&(_0x3930c0=_0x5506f9%0x4?_0x3930c0*0x40+_0x11c9dc:_0x11c9dc,_0x5506f9++%0x4)?_0x549bea+=_0x141104['charCodeAt'](_0x27da3a+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3930c0>>(-0x2*_0x5506f9&0x6)):_0x5506f9:0x0){_0x11c9dc=_0x5d0186['indexOf'](_0x11c9dc);}for(let _0x82d612=0x0,_0x52a88a=_0x549bea['length'];_0x82d612<_0x52a88a;_0x82d612++){_0x32d024+='%'+('00'+_0x549bea['charCodeAt'](_0x82d612)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32d024);};const _0x234bf2=function(_0x25259d,_0x429061){let _0x239018=[],_0x57cc25=0x0,_0x397d2c,_0x162017='';_0x25259d=_0x4d0537(_0x25259d);let _0x2123e9;for(_0x2123e9=0x0;_0x2123e9<0x100;_0x2123e9++){_0x239018[_0x2123e9]=_0x2123e9;}for(_0x2123e9=0x0;_0x2123e9<0x100;_0x2123e9++){_0x57cc25=(_0x57cc25+_0x239018[_0x2123e9]+_0x429061['charCodeAt'](_0x2123e9%_0x429061['length']))%0x100,_0x397d2c=_0x239018[_0x2123e9],_0x239018[_0x2123e9]=_0x239018[_0x57cc25],_0x239018
|
2024-06-30 15:19:36 +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
|