2024-08-11 01:14:17 +08:00
|
|
|
|
var _0xodB='jsjiami.com.v7';const _0x1fcc58=_0x5ad0;function _0x5ad0(_0x253471,_0x5b77c9){const _0x1deb27=_0x51d9();return _0x5ad0=function(_0x5f1e21,_0x42f182){_0x5f1e21=_0x5f1e21-0xb3;let _0x51d9ba=_0x1deb27[_0x5f1e21];if(_0x5ad0['RaArVW']===undefined){var _0x5ad0ef=function(_0x58869a){const _0x2cb5f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa07f0f='',_0x5ec741='',_0x222c4d=_0xa07f0f+_0x5ad0ef;for(let _0x20450c=0x0,_0x4e0a41,_0x2beaa0,_0x5e47de=0x0;_0x2beaa0=_0x58869a['charAt'](_0x5e47de++);~_0x2beaa0&&(_0x4e0a41=_0x20450c%0x4?_0x4e0a41*0x40+_0x2beaa0:_0x2beaa0,_0x20450c++%0x4)?_0xa07f0f+=_0x222c4d['charCodeAt'](_0x5e47de+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x4e0a41>>(-0x2*_0x20450c&0x6)):_0x20450c:0x0){_0x2beaa0=_0x2cb5f9['indexOf'](_0x2beaa0);}for(let _0x49e80c=0x0,_0x4ac682=_0xa07f0f['length'];_0x49e80c<_0x4ac682;_0x49e80c++){_0x5ec741+='%'+('00'+_0xa07f0f['charCodeAt'](_0x49e80c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ec741);};const _0x29fbc6=function(_0x2016a2,_0x9068d4){let _0x120f4b=[],_0x394cda=0x0,_0x4fa6f2,_0x559387='';_0x2016a2=_0x5ad0ef(_0x2016a2);let _0x595a47;for(_0x595a47=0x0;_0x595a47<0x100;_0x595a47++){_0x120f4b[_0x595a47]=_0x595a47;}for(_0x595a47=0x0;_0x595a47<0x100;_0x595a47++){_0x394cda=(_0x394cda+_0x120f4b[_0x595a47]+_0x9068d4['charCodeAt'](_0x595a47%_0x9068d4['length']))%0x100,_0x4fa6f2=_0x120f4b[_0x595a47],_0x120f4b[_0x595a47]=_0x120f4b[_0x394cda],_0x120f4b[_0x394cda]=_0x4fa6f2;}_0x595a47=0x0,_0x394cda=0x0;for(let _0x52f4ad=0x0;_0x52f4ad<_0x2016a2['length'];_0x52f4ad++){_0x595a47=(_0x595a47+0x1)%0x100,_0x394cda=(_0x394cda+_0x120f4b[_0x595a47])%0x100,_0x4fa6f2=_0x120f4b[_0x595a47],_0x120f4b[_0x595a47]=_0x120f4b[_0x394cda],_0x120f4b[_0x394cda]=_0x4fa6f2,_0x559387+=String['fromCharCode'](_0x2016a2['charCodeAt'](_0x52f4ad)^_0x120f4b[(_0x120f4b[_0x595a47]+_0x120f4b[_0x394cda])%0x100]);}return _0x559387;};_0x5ad0['EaDTsy']=_0x29fbc6,_0x253471=arguments,_0x5ad0['RaArVW']=!![];}const _0x44cbe2=_0x1deb27[0x0],_0x2bfebd=_0x5f1e21+_0x44cbe2,_0x1439f6=_0x253471[_0x2bfebd];if(!_0x1439f6){if(_0x5ad0['oykQiN']===undefined){const _0x3e6be9=function(_0x17bb12){this['zXPzrk']=_0x17bb12,this['zZaxHd']=[0x1,0x0,0x0],this['ikSVBJ']=function(){return'newState';},this['xNKasK']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['cXNzLe']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3e6be9['prototype']['ZfHGxx']=function(){const _0x2c8ddd=new RegExp(this['xNKasK']+this['cXNzLe']),_0x2805cf=_0x2c8ddd['test'](this['ikSVBJ']['toString']())?--this['zZaxHd'][0x1]:--this['zZaxHd'][0x0];return this['PgTzwt'](_0x2805cf);},_0x3e6be9['prototype']['PgTzwt']=function(_0x4ab636){if(!Boolean(~_0x4ab636))return _0x4ab636;return this['KekRCN'](this['zXPzrk']);},_0x3e6be9['prototype']['KekRCN']=function(_0x268812){for(let _0x4a1ecd=0x0,_0x4d0442=this['zZaxHd']['length'];_0x4a1ecd<_0x4d0442;_0x4a1ecd++){this['zZaxHd']['push'](Math['round'](Math['random']())),_0x4d0442=this['zZaxHd']['length'];}return _0x268812(this['zZaxHd'][0x0]);},new _0x3e6be9(_0x5ad0)['ZfHGxx'](),_0x5ad0['oykQiN']=!![];}_0x51d9ba=_0x5ad0['EaDTsy'](_0x51d9ba,_0x42f182),_0x253471[_0x2bfebd]=_0x51d9ba;}else _0x51d9ba=_0x1439f6;return _0x51d9ba;},_0x5ad0(_0x253471,_0x5b77c9);}(function(_0x251221,_0x3a473b,_0x4c324b,_0x3734a9,_0x19fc49,_0x39070e,_0x3036bb){return _0x251221=_0x251221>>0x4,_0x39070e='hs',_0x3036bb='hs',function(_0x3a90a4,_0x21a056,_0x3340d8,_0x4e3a17,_0x31cf0b){const _0x4175f6=_0x5ad0;_0x4e3a17='tfi',_0x39070e=_0x4e3a17+_0x39070e,_0x31cf0b='up',_0x3036bb+=_0x31cf0b,_0x39070e=_0x3340d8(_0x39070e),_0x3036bb=_0x3340d8(_0x3036bb),_0x3340d8=0x0;const _0x1fc6dd=_0x3a90a4();while(!![]&&--_0x3734a9+_0x21a056){try{_0x4e3a17=parseInt(_0x4175f6(0x2b4,'em8h'))/0x1*(-parseInt(_0x4175f6(0x1c6,'o7&3'))/0x2)+-parseInt(_0x4175f6(0xd0,'TfHz'))/0x3+-parseInt(_0x4175f6(0x1fd,'[JHj'))/0x4*(parseInt(_0x4175f6(0x20d,'[cf6'))/0x5)+parseInt(_0x4175f6(0x1d1,'svUO'))/0x6+-parseInt(_0x4175f6(0x28d,'JJ4V'))/0x7*(-parseInt(_0x4175f6(0x1d8,'JJ4V'))/0x8)+parseInt(_0x4175f6(0x28c,'gIpH'))/0x9+-parseInt(_0x4175f6(0x24d,'Ipyp'))/0xa*
|
|
|
|
|
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
|