2024-01-17 13:45:39 +00:00
|
|
|
|
var _0xodd='jsjiami.com.v7';const _0x14e3f4=_0x54a0;(function(_0x426afb,_0xab4fa2,_0x1c760e,_0x32bcd6,_0x3568a9,_0x3b905c,_0x2ccbbb){return _0x426afb=_0x426afb>>0x1,_0x3b905c='hs',_0x2ccbbb='hs',function(_0xc0515e,_0x2f3504,_0x5d02b6,_0x407299,_0x1a4419){const _0x1d8c8b=_0x54a0;_0x407299='tfi',_0x3b905c=_0x407299+_0x3b905c,_0x1a4419='up',_0x2ccbbb+=_0x1a4419,_0x3b905c=_0x5d02b6(_0x3b905c),_0x2ccbbb=_0x5d02b6(_0x2ccbbb),_0x5d02b6=0x0;const _0x107963=_0xc0515e();while(!![]&&--_0x32bcd6+_0x2f3504){try{_0x407299=-parseInt(_0x1d8c8b(0x6dc,'gmdF'))/0x1+parseInt(_0x1d8c8b(0x5b3,'V(sy'))/0x2+parseInt(_0x1d8c8b(0xeee,'NMgt'))/0x3+-parseInt(_0x1d8c8b(0x828,'raAF'))/0x4*(parseInt(_0x1d8c8b(0x117b,'HKB2'))/0x5)+parseInt(_0x1d8c8b(0xf67,'mXxF'))/0x6*(parseInt(_0x1d8c8b(0xff2,'mL4U'))/0x7)+parseInt(_0x1d8c8b(0xfae,'A#Ms'))/0x8+-parseInt(_0x1d8c8b(0x32e,'BmO]'))/0x9;}catch(_0x288863){_0x407299=_0x5d02b6;}finally{_0x1a4419=_0x107963[_0x3b905c]();if(_0x426afb<=_0x32bcd6)_0x5d02b6?_0x3568a9?_0x407299=_0x1a4419:_0x3568a9=_0x1a4419:_0x5d02b6=_0x1a4419;else{if(_0x5d02b6==_0x3568a9['replace'](/[ehBqJKNuLSkrtCUyEAf=]/g,'')){if(_0x407299===_0x2f3504){_0x107963['un'+_0x3b905c](_0x1a4419);break;}_0x107963[_0x2ccbbb](_0x1a4419);}}}}}(_0x1c760e,_0xab4fa2,function(_0x395761,_0xd98649,_0x1b82c8,_0x5ad2e2,_0x398ce9,_0x4aab75,_0x46e0bc){return _0xd98649='\x73\x70\x6c\x69\x74',_0x395761=arguments[0x0],_0x395761=_0x395761[_0xd98649](''),_0x1b82c8=`\x72\x65\x76\x65\x72\x73\x65`,_0x395761=_0x395761[_0x1b82c8]('\x76'),_0x5ad2e2=`\x6a\x6f\x69\x6e`,(0x150c42,_0x395761[_0x5ad2e2](''));});}(0x184,0x362e0,_0x1705,0xc4),_0x1705)&&(_0xodd=_0x14e3f4(0x6f0,'u5AM'));const _0x289d09=$[_0x14e3f4(0xcb7,'hVrT')]()?require(_0x14e3f4(0x557,'4]4L')):'';let _0x1a5428='',_0x398879=0x1388,_0x3cb378=0x4,_0x5bd228=0x0;$[_0x14e3f4(0x118f,'mL4U')]=require(_0x14e3f4(0x43a,'YuG&'));const _0x3a648c=require(_0x14e3f4(0xfaa,'U8ui'));if(process[_0x14e3f4(0x1251,'Ib]C')][_0x14e3f4(0xed6,'1d#u')])try{require(_0x14e3f4(0xc56,'UmwG')),ccc=require(_0x14e3f4(0x292,'A#Ms')),$[_0x14e3f4(0x35b,'pZst')]=ccc[_0x14e3f4(0xaf6,'AmeS')]($[_0x14e3f4(0xd4a,'wSn[')][_0x14e3f4(0xf17,'fg*]')]($)),$[_0x14e3f4(0x1052,'WU@G')]=ccc[_0x14e3f4(0x26c,'A#Ms')]($[_0x14e3f4(0x10c9,'AmeS')][_0x14e3f4(0x1067,'zU6h')]($));}catch{$[_0x14e3f4(0xc79,'u(uz')](_0x14e3f4(0xc03,'hVrT')),$[_0x14e3f4(0xf3d,'L]K[')]=$[_0x14e3f4(0x6c6,'vSnT')],$[_0x14e3f4(0x460,'zU6h')]=$[_0x14e3f4(0x1106,'UOhs')];}else $[_0x14e3f4(0x1180,'MXB]')]=$[_0x14e3f4(0x358,'raAF')],$[_0x14e3f4(0xcc7,'gdWB')]=$[_0x14e3f4(0xf1d,'NMgt')];function _0x1705(){const _0x596b0c=(function(){return[...[_0xodd,'qjSskjiBaJmfiKA.hcryLoChmN.vE7LyLtutSeUC==','W4frsSkUbCkBWR8Fma','WO1dcb9R','psWmgCoA','AmkFc8kkWOFcVmon','W7TvWOSWWPW','W6vrxmkRaCkWWPq4','hCkIWQ0xBSk/uSkJWOe','WRBdPColW5jz','rvKfp8o6','baRdS18h','W4D8m8oNpG','xmoIWQXlbSkO','dgbEW7Gp','vemGdtG','vdninCosW5BdPr7cIJNcKmkQW6lcJmodFSkO','W4jkvSk4gSkQWRaF','kZ7dTx49','WOr5W5qjWRi','A8oCWRhcHCoGpdCj','uCkZluTbW7BcHSo+bW','WPJcQmkNW6nv','WQOzfCkFWQa','WQFdRSo2W4xdS8kI','xCkjrfiV','mh7dNZ5G','WQZdJ8orW4DU','d8k+WPOPFW','hCknamoZW5DVW49bWQHr','qmoVWQLPjW','smkTW6eB','kCkxvXVcOSkJW7tcQCoSWQORWQ4/v0CwW5y','W7qMWPNcG8kf','WOvgcJ9v','kdesmG9QFXdcHCke','h8kUWR0mE8kP','mmohW6mGWP/cRwNcUmoUW4y3twWDBmoGkSkYaW','l0bGW7mo','WP/cUmkzW4jK','FcZcJSo4W7m','WP4/Emkyoa','eGKKatG','tsVcH8oqxNiDrIVdRs4','nteMimol','WQ1BW7KTWPq','ymkrpmk/WQi','WQtcICosW6aR','oCkyW7ldOmkQBNy','ru0TmmoN','WOaPA8kNhCoppSoY','sSkkeSkmWRy','lcSnibC','WRRdQSohW4vn','mSorDCkD','WO1bW5yEWPG','mtaTjb9W','ufyKjHa','gxfxx8ogWPW','W7CKWOpcQCkl','j8oAE8kCWP3dQmkOW5hcH8kQWPxdQtRdHZldRW','WQqSd8k3','WRn2eafZ','igZcPab8','WRL+W4GHWPy','WOywBmkfaq','ACkOp8kCWQq','W6Gnz8kija','gCkyfW','E8kwhmkj','FCkOyhO7WRxcMerwagNcKW','WPK1BCk0j8ohpmo5','WPioW74aW58','W6zqmvXeW6G','xmk/khbqW6VcNG','WQr1W6W+WOC','eeFdSbf5','hf7dNrr0W5lcRW','gSkFWQiQCW','WOxdRCocW4HM','kdyopG','WQePeSkWWRe','WRZdJ8owW5hdMq','tMmKnZu','umkGW7OwW4pcPSoPWRuO','jxvHW70s','WO0AW6qIW4xcHW','E04immog','seeMaXGxma','WRtcImoSW4q+','rSoYWQPQamk/a391','WRr1W7C2WQVcNCkhWOHlW4xdQa3cVbaLWQfg','jGTyqSkYW5m','WQddPSo
|
2024-01-17 12:54:05 +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
|