2024-07-20 14:35:38 +00:00
|
|
|
var _0xodA='jsjiami.com.v7';const _0x88641d=_0x4297;(function(_0x4f1781,_0x5d67eb,_0x1bdf73,_0x786cd8,_0xd7f52,_0x475e49,_0x5c3b87){return _0x4f1781=_0x4f1781>>0x9,_0x475e49='hs',_0x5c3b87='hs',function(_0x4648b7,_0x207fe2,_0x3c6982,_0x2c94a1,_0x16d77c){const _0x5d2dcf=_0x4297;_0x2c94a1='tfi',_0x475e49=_0x2c94a1+_0x475e49,_0x16d77c='up',_0x5c3b87+=_0x16d77c,_0x475e49=_0x3c6982(_0x475e49),_0x5c3b87=_0x3c6982(_0x5c3b87),_0x3c6982=0x0;const _0x1807ab=_0x4648b7();while(!![]&&--_0x786cd8+_0x207fe2){try{_0x2c94a1=-parseInt(_0x5d2dcf(0x28f,'$Tjw'))/0x1+-parseInt(_0x5d2dcf(0x5e1,'!$aM'))/0x2+-parseInt(_0x5d2dcf(0x4bc,'%Uy@'))/0x3*(-parseInt(_0x5d2dcf(0x357,'C(mR'))/0x4)+parseInt(_0x5d2dcf(0x24b,'q!(x'))/0x5*(-parseInt(_0x5d2dcf(0xfe,'RL[B'))/0x6)+-parseInt(_0x5d2dcf(0x33a,'GVPt'))/0x7+parseInt(_0x5d2dcf(0x60c,'lKGo'))/0x8*(parseInt(_0x5d2dcf(0xb7,'C(mR'))/0x9)+parseInt(_0x5d2dcf(0x605,'Edes'))/0xa;}catch(_0x1ef003){_0x2c94a1=_0x3c6982;}finally{_0x16d77c=_0x1807ab[_0x475e49]();if(_0x4f1781<=_0x786cd8)_0x3c6982?_0xd7f52?_0x2c94a1=_0x16d77c:_0xd7f52=_0x16d77c:_0x3c6982=_0x16d77c;else{if(_0x3c6982==_0xd7f52['replace'](/[MSTyudwGBeUXKgxHVDJknl=]/g,'')){if(_0x2c94a1===_0x207fe2){_0x1807ab['un'+_0x475e49](_0x16d77c);break;}_0x1807ab[_0x5c3b87](_0x16d77c);}}}}}(_0x1bdf73,_0x5d67eb,function(_0x53790e,_0x5caed0,_0x4c908c,_0x35631c,_0x10ce0a,_0xa575e6,_0x30992b){return _0x5caed0='\x73\x70\x6c\x69\x74',_0x53790e=arguments[0x0],_0x53790e=_0x53790e[_0x5caed0](''),_0x4c908c=`\x72\x65\x76\x65\x72\x73\x65`,_0x53790e=_0x53790e[_0x4c908c]('\x76'),_0x35631c=`\x6a\x6f\x69\x6e`,(0x179f04,_0x53790e[_0x35631c](''));});}(0x18c00,0x382ec,_0x1afd,0xc8),_0x1afd)&&(_0xodA=_0x88641d(0x64d,']FKH'));const _0x9bb6a7=$[_0x88641d(0x53e,'%oz[')]()?require(_0x88641d(0x418,'*C)o')):'',_0x313ff0=$[_0x88641d(0x757,'p*XC')]()?require(_0x88641d(0x3f8,'^Pp1')):'',_0x5e4e4d=require(_0x88641d(0x4dd,'%oz[')),_0x2759f0=require(_0x88641d(0x523,'&!c3')),_0x10db22=require(_0x88641d(0x6d3,'XVKB')),_0x7a77c5=require(_0x88641d(0x516,'9KUB'));let _0x2765a1=[],_0x1a2fb1='',_0x145d40='',_0xce89c3='',_0x145ae3='3';if(process[_0x88641d(0x4c2,'%Uy@')][_0x88641d(0x227,'YkBP')]){const _0x5343dc=require(_0x88641d(0x1bc,']FKH'));$[_0x88641d(0x569,'WUr@')]=_0x5343dc[_0x88641d(0x6cf,'BihN')]($[_0x88641d(0x6af,'1Y7^')][_0x88641d(0x1cc,'FGu^')]($)),$[_0x88641d(0x5b3,'!$aM')]=_0x5343dc[_0x88641d(0x472,'usZV')]($[_0x88641d(0x128,'q!(x')][_0x88641d(0x678,'B7sm')]($));}if($[_0x88641d(0x478,'BihN')]()){Object[_0x88641d(0x21b,'JlAz')](_0x9bb6a7)[_0x88641d(0x278,'1i*U')](_0x5b4a7f=>{const _0x1c3383=_0x88641d;_0x2765a1[_0x1c3383(0x309,'9KUB')](_0x9bb6a7[_0x5b4a7f]);});if(process[_0x88641d(0x316,'rYzr')][_0x88641d(0x32e,'FGu^')]&&process[_0x88641d(0x61c,'B7sm')][_0x88641d(0x662,'nB#@')]===_0x88641d(0x6db,'rYzr'))console[_0x88641d(0x6c6,'C(mR')]=()=>{};}else _0x2765a1=[$[_0x88641d(0x404,'9@jf')](_0x88641d(0x53c,'q!(x')),$[_0x88641d(0x37c,'q!(x')](_0x88641d(0x2da,'FDoH')),...jsonfomat($[_0x88641d(0x3c5,'MX52')](_0x88641d(0x500,'p*XC'))||'[]')[_0x88641d(0x488,']FKH')](_0x9ea2f4=>_0x9ea2f4[_0x88641d(0x705,'bV8p')])][_0x88641d(0x2c5,'C(mR')](_0x1f64b5=>!!_0x1f64b5);let _0x391dea=process[_0x88641d(0x348,'!$aM')][_0x88641d(0x2a9,'ajMs')]||_0x88641d(0x647,'MX52'),_0x1b0aa7=process[_0x88641d(0x1d9,'tcI[')][_0x88641d(0x6c7,'lKGo')]||_0x88641d(0x18e,'q7a6'),_0x2486cd=process[_0x88641d(0x140,'lKGo')][_0x88641d(0x56c,'B7sm')]||'',_0x255cda=_0x88641d(0x421,'rYzr');function _0x1afd(){const _0x3083f6=(function(){return[...[_0xodA,'TBegjVnsTjHSiadmGwki.DcJoymM.vnX7KxeuKUl==','W4FdM1qCWQSkWRNdMCk4lSo6WOfc','d1RcKt4UWOmyEqFcUNpdPXDgW5OYWRdcO2i','ea3dO8oJW5/dJG','WPJcGbZdOIK','WO7dVCkxwYG','wYe9W4q','W5ztgHhdUSkPW4eR','W4CuW6tcNqu','yLNdQG','W4/dRuThqW','5y225yIY5yE077+n','WP3cRtRdVsS','W7H2mtq','jUweSUInUow8Omki','WOxdMh3cRmou','Fse6W4aeca','ouKvW5JcRa','WONdMWzxcmoSWQFdH8oF','W75Bx8of','W4hdHvmAWOy3WRRdGG','A8oGr1TX','W57dQxWMWOe','WQj1sCkkWQ0','quWhDxhcVH/cIKrb','WQOluq','W4tcJmoylSkRW45+W59JfdldPq','yLNdRG0X','W6LKicFdTSkp','WRxdMcST','6k2M5yMg6zMy5OAU5z+yA8klkmkfWOxOV4VLH5NMOBZKV7RMLy7LHzVLRlKO5BI+6kYG6yoT6l656iEW5P+
|
2024-06-28 07:47:44 +00:00
|
|
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|