2024-07-13 12:26:06 +00:00
|
|
|
var _0xoda='jsjiami.com.v7';const _0x297f15=_0x44b9;(function(_0x101950,_0x5acd79,_0x1788e7,_0x20b580,_0x5d1142,_0x4b2ef4,_0x45b189){return _0x101950=_0x101950>>0x4,_0x4b2ef4='hs',_0x45b189='hs',function(_0x4503d7,_0x488853,_0x5bf453,_0x2c1eee,_0x573eeb){const _0x1e159f=_0x44b9;_0x2c1eee='tfi',_0x4b2ef4=_0x2c1eee+_0x4b2ef4,_0x573eeb='up',_0x45b189+=_0x573eeb,_0x4b2ef4=_0x5bf453(_0x4b2ef4),_0x45b189=_0x5bf453(_0x45b189),_0x5bf453=0x0;const _0x3965fa=_0x4503d7();while(!![]&&--_0x20b580+_0x488853){try{_0x2c1eee=parseInt(_0x1e159f(0x34b,'3%R)'))/0x1*(parseInt(_0x1e159f(0x1d5,'FeO@'))/0x2)+-parseInt(_0x1e159f(0x3db,'8TlD'))/0x3*(parseInt(_0x1e159f(0x488,'Zy^6'))/0x4)+-parseInt(_0x1e159f(0x68a,'X4a$'))/0x5+-parseInt(_0x1e159f(0x3d0,'MCbD'))/0x6+-parseInt(_0x1e159f(0x247,'CfjU'))/0x7*(parseInt(_0x1e159f(0x485,'9g6U'))/0x8)+-parseInt(_0x1e159f(0x3d6,'MCbD'))/0x9+-parseInt(_0x1e159f(0x677,'FeO@'))/0xa*(-parseInt(_0x1e159f(0x253,'8TlD'))/0xb);}catch(_0x398761){_0x2c1eee=_0x5bf453;}finally{_0x573eeb=_0x3965fa[_0x4b2ef4]();if(_0x101950<=_0x20b580)_0x5bf453?_0x5d1142?_0x2c1eee=_0x573eeb:_0x5d1142=_0x573eeb:_0x5bf453=_0x573eeb;else{if(_0x5bf453==_0x5d1142['replace'](/[YkAeFfrUqbIMgnRJhKE=]/g,'')){if(_0x2c1eee===_0x488853){_0x3965fa['un'+_0x4b2ef4](_0x573eeb);break;}_0x3965fa[_0x45b189](_0x573eeb);}}}}}(_0x1788e7,_0x5acd79,function(_0x23944b,_0x156e54,_0x4aad10,_0xd7e74,_0x34ff74,_0x2ec126,_0xd48dd){return _0x156e54='\x73\x70\x6c\x69\x74',_0x23944b=arguments[0x0],_0x23944b=_0x23944b[_0x156e54](''),_0x4aad10=`\x72\x65\x76\x65\x72\x73\x65`,_0x23944b=_0x23944b[_0x4aad10]('\x76'),_0xd7e74=`\x6a\x6f\x69\x6e`,(0x178908,_0x23944b[_0xd7e74](''));});}(0xc10,0x82f66,_0x3ac8,0xc3),_0x3ac8)&&(_0xoda=`\xc97`);const _0x46c783=$[_0x297f15(0x3f1,'pWV8')]()?require(_0x297f15(0x69b,'8TlD')):'',_0x297512=$[_0x297f15(0x66b,'$esi')]()?require(_0x297f15(0x489,'3%R)')):'',_0x5582ea=require(_0x297f15(0x327,'ihJ]')),_0x1cf9a9=require(_0x297f15(0x5b6,'ilj4')),_0x1e3f71=require(_0x297f15(0x375,'xP1z')),_0x494318=require(_0x297f15(0x500,'iTc*'));let _0x3cf2f1=[],_0x58b75f='',_0x1304c4='',_0xf3da0a='',_0x1479ad='3';if(process[_0x297f15(0x5d8,'FbCr')][_0x297f15(0x750,'3%R)')]){const _0x58af75=require(_0x297f15(0x2c9,'70cI'));$[_0x297f15(0x653,'zc0C')]=_0x58af75[_0x297f15(0x23a,'gnsH')]($[_0x297f15(0x7fa,'xP1z')][_0x297f15(0x365,'Bu$t')]($)),$[_0x297f15(0x373,'M0x1')]=_0x58af75[_0x297f15(0x26b,'8TlD')]($[_0x297f15(0x5e9,'K(yP')][_0x297f15(0x691,'ft4V')]($));}if($[_0x297f15(0x27b,'d%A*')]()){Object[_0x297f15(0x218,'kk)b')](_0x46c783)[_0x297f15(0x72b,'ilj4')](_0x192615=>{const _0x1efa6e=_0x297f15;_0x3cf2f1[_0x1efa6e(0x255,'3S8v')](_0x46c783[_0x192615]);});if(process[_0x297f15(0x614,'pWV8')][_0x297f15(0x5c6,'ft4V')]&&process[_0x297f15(0x19a,'xWY[')][_0x297f15(0x650,'#&1$')]===_0x297f15(0x377,'E]MN'))console[_0x297f15(0x502,'*e22')]=()=>{};}else _0x3cf2f1=[$[_0x297f15(0x675,'pWV8')](_0x297f15(0x417,'8TlD')),$[_0x297f15(0x4a8,'&AJb')](_0x297f15(0x208,'ihJ]')),...jsonfomat($[_0x297f15(0x4eb,'Bu$t')](_0x297f15(0x575,'C!%c'))||'[]')[_0x297f15(0x305,'&AJb')](_0x1de70d=>_0x1de70d[_0x297f15(0x1aa,'yv)%')])][_0x297f15(0x47a,'yv)%')](_0x3bd2cd=>!!_0x3bd2cd);let _0x38c9e0=process[_0x297f15(0x795,'YZ9V')][_0x297f15(0x323,'9g6U')]||_0x297f15(0x3a8,'#&1$'),_0x318ead=process[_0x297f15(0x74a,'70cI')][_0x297f15(0x623,'xWY[')]||_0x297f15(0x4bf,'#&1$'),_0x203413=process[_0x297f15(0x4bc,'ilj4')][_0x297f15(0x6ff,'k*qw')]||'',_0x51676c=_0x297f15(0x1fd,'M0x1');function _0x44b9(_0x26c54d,_0x28141e){const _0x4868f3=_0x3ac8();return _0x44b9=function(_0x1b5122,_0xd332ca){_0x1b5122=_0x1b5122-0x158;let _0x3ac8e2=_0x4868f3[_0x1b5122];if(_0x44b9['MkCWSA']===undefined){var _0x44b9c5=function(_0x364e76){const _0x4399e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3d963f='',_0x415e60='',_0x5cf128=_0x3d963f+_0x44b9c5;for(let _0x534fee=0x0,_0x16bc33,_0x4978ea,_0x2bf2ab=0x0;_0x4978ea=_0x364e76['charAt'](_0x2bf2ab++);~_0x4978ea&&(_0x16bc33=_0x534fee%0x4?_0x16bc33*0x40+_0x4978ea:_0x4978ea,_0x534fee++%0x4)?_0x3d963f+=_0x5cf128['charCodeAt'](_0x2bf2ab+0xa)-0xa!==0x0?String['from
|
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
|