2024-01-21 13:44:37 +00:00
|
|
|
var _0xodD='jsjiami.com.v7';const _0x4e6e09=_0x2684;function _0x2684(_0x154025,_0x5dc49b){const _0x3aba57=_0x5d89();return _0x2684=function(_0x17d653,_0x4f7643){_0x17d653=_0x17d653-0xd5;let _0x5d89f0=_0x3aba57[_0x17d653];if(_0x2684['HewBnd']===undefined){var _0x268486=function(_0x1448c5){const _0x38f124='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4b2e8c='',_0x243a69='',_0x44244a=_0x4b2e8c+_0x268486;for(let _0x256b90=0x0,_0x2b14c8,_0x802dc8,_0x6c335b=0x0;_0x802dc8=_0x1448c5['charAt'](_0x6c335b++);~_0x802dc8&&(_0x2b14c8=_0x256b90%0x4?_0x2b14c8*0x40+_0x802dc8:_0x802dc8,_0x256b90++%0x4)?_0x4b2e8c+=_0x44244a['charCodeAt'](_0x6c335b+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2b14c8>>(-0x2*_0x256b90&0x6)):_0x256b90:0x0){_0x802dc8=_0x38f124['indexOf'](_0x802dc8);}for(let _0x57a533=0x0,_0x292aab=_0x4b2e8c['length'];_0x57a533<_0x292aab;_0x57a533++){_0x243a69+='%'+('00'+_0x4b2e8c['charCodeAt'](_0x57a533)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x243a69);};const _0x1fd487=function(_0x100196,_0x1cb7be){let _0xca3fd5=[],_0xb38b1b=0x0,_0xadac5f,_0x9155bb='';_0x100196=_0x268486(_0x100196);let _0x2f6697;for(_0x2f6697=0x0;_0x2f6697<0x100;_0x2f6697++){_0xca3fd5[_0x2f6697]=_0x2f6697;}for(_0x2f6697=0x0;_0x2f6697<0x100;_0x2f6697++){_0xb38b1b=(_0xb38b1b+_0xca3fd5[_0x2f6697]+_0x1cb7be['charCodeAt'](_0x2f6697%_0x1cb7be['length']))%0x100,_0xadac5f=_0xca3fd5[_0x2f6697],_0xca3fd5[_0x2f6697]=_0xca3fd5[_0xb38b1b],_0xca3fd5[_0xb38b1b]=_0xadac5f;}_0x2f6697=0x0,_0xb38b1b=0x0;for(let _0x4027de=0x0;_0x4027de<_0x100196['length'];_0x4027de++){_0x2f6697=(_0x2f6697+0x1)%0x100,_0xb38b1b=(_0xb38b1b+_0xca3fd5[_0x2f6697])%0x100,_0xadac5f=_0xca3fd5[_0x2f6697],_0xca3fd5[_0x2f6697]=_0xca3fd5[_0xb38b1b],_0xca3fd5[_0xb38b1b]=_0xadac5f,_0x9155bb+=String['fromCharCode'](_0x100196['charCodeAt'](_0x4027de)^_0xca3fd5[(_0xca3fd5[_0x2f6697]+_0xca3fd5[_0xb38b1b])%0x100]);}return _0x9155bb;};_0x2684['JfPhQh']=_0x1fd487,_0x154025=arguments,_0x2684['HewBnd']=!![];}const _0x5b9cce=_0x3aba57[0x0],_0x3e81f5=_0x17d653+_0x5b9cce,_0x1a132a=_0x154025[_0x3e81f5];if(!_0x1a132a){if(_0x2684['gYZKsO']===undefined){const _0x47b4f3=function(_0x2fa7a8){this['CnnYOE']=_0x2fa7a8,this['qTpHma']=[0x1,0x0,0x0],this['bydJWV']=function(){return'newState';},this['rDHdFB']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['KxydnD']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x47b4f3['prototype']['kJguZX']=function(){const _0x542cc5=new RegExp(this['rDHdFB']+this['KxydnD']),_0x5a6733=_0x542cc5['test'](this['bydJWV']['toString']())?--this['qTpHma'][0x1]:--this['qTpHma'][0x0];return this['TAcCcP'](_0x5a6733);},_0x47b4f3['prototype']['TAcCcP']=function(_0x1e2fce){if(!Boolean(~_0x1e2fce))return _0x1e2fce;return this['JLJQmy'](this['CnnYOE']);},_0x47b4f3['prototype']['JLJQmy']=function(_0x58ae2b){for(let _0x48e338=0x0,_0x565689=this['qTpHma']['length'];_0x48e338<_0x565689;_0x48e338++){this['qTpHma']['push'](Math['round'](Math['random']())),_0x565689=this['qTpHma']['length'];}return _0x58ae2b(this['qTpHma'][0x0]);},new _0x47b4f3(_0x2684)['kJguZX'](),_0x2684['gYZKsO']=!![];}_0x5d89f0=_0x2684['JfPhQh'](_0x5d89f0,_0x4f7643),_0x154025[_0x3e81f5]=_0x5d89f0;}else _0x5d89f0=_0x1a132a;return _0x5d89f0;},_0x2684(_0x154025,_0x5dc49b);}(function(_0x120f82,_0x51101e,_0x10faa8,_0x48f5f0,_0x7983ed,_0x336ecc,_0x4f873a){return _0x120f82=_0x120f82>>0x2,_0x336ecc='hs',_0x4f873a='hs',function(_0x2d85f8,_0x1db0d7,_0x391adb,_0x371448,_0x1cf15a){const _0x38babf=_0x2684;_0x371448='tfi',_0x336ecc=_0x371448+_0x336ecc,_0x1cf15a='up',_0x4f873a+=_0x1cf15a,_0x336ecc=_0x391adb(_0x336ecc),_0x4f873a=_0x391adb(_0x4f873a),_0x391adb=0x0;const _0x25c26e=_0x2d85f8();while(!![]&&--_0x48f5f0+_0x1db0d7){try{_0x371448=-parseInt(_0x38babf(0x117,'^w4N'))/0x1*(-parseInt(_0x38babf(0x13d,'BYgp'))/0x2)+-parseInt(_0x38babf(0x115,'VuB2'))/0x3+-parseInt(_0x38babf(0x1a4,'O3yo'))/0x4*(-parseInt(_0x38babf(0x113,'EEGC'))/0x5)+-parseInt(_0x38babf(0x193,'OE1R'))/0x6+-parseInt(_0x38babf(0x190,'^w4N'))/0x7*(-parseInt(_0x38babf(0x129,'9)P5'))/0x8)+parseInt(_0x38babf(0x1a6,'C]CZ'))/0x9*(-parseInt(_0x38babf(0x170,'ztUU'))
|
2024-01-02 12:59:48 +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
|