2024-08-20 03:50:54 +00:00
|
|
|
var _0xodX='jsjiami.com.v7';const _0x5c258c=_0x2b56;(function(_0x3235f7,_0x4e9e91,_0x5a712c,_0x96bb,_0x4176be,_0x3547e2,_0x8c7596){return _0x3235f7=_0x3235f7>>0x4,_0x3547e2='hs',_0x8c7596='hs',function(_0x42e41b,_0x2a0a6e,_0x285f0b,_0x108180,_0x33fc6f){const _0x2ad6bb=_0x2b56;_0x108180='tfi',_0x3547e2=_0x108180+_0x3547e2,_0x33fc6f='up',_0x8c7596+=_0x33fc6f,_0x3547e2=_0x285f0b(_0x3547e2),_0x8c7596=_0x285f0b(_0x8c7596),_0x285f0b=0x0;const _0x44c58f=_0x42e41b();while(!![]&&--_0x96bb+_0x2a0a6e){try{_0x108180=parseInt(_0x2ad6bb(0x4fc,'jOaQ'))/0x1*(-parseInt(_0x2ad6bb(0x662,'#6^%'))/0x2)+parseInt(_0x2ad6bb(0x5ec,'yo^9'))/0x3*(parseInt(_0x2ad6bb(0x77,'j)Ra'))/0x4)+parseInt(_0x2ad6bb(0x310,'Wo1N'))/0x5*(-parseInt(_0x2ad6bb(0x596,'Rdc4'))/0x6)+parseInt(_0x2ad6bb(0x4cb,'ULD*'))/0x7*(-parseInt(_0x2ad6bb(0x469,'yo^9'))/0x8)+parseInt(_0x2ad6bb(0x4db,'1BS1'))/0x9+parseInt(_0x2ad6bb(0x54d,'bd0U'))/0xa*(parseInt(_0x2ad6bb(0x1ef,'A2P5'))/0xb)+parseInt(_0x2ad6bb(0x2d8,'JhRi'))/0xc;}catch(_0x22cf77){_0x108180=_0x285f0b;}finally{_0x33fc6f=_0x44c58f[_0x3547e2]();if(_0x3235f7<=_0x96bb)_0x285f0b?_0x4176be?_0x108180=_0x33fc6f:_0x4176be=_0x33fc6f:_0x285f0b=_0x33fc6f;else{if(_0x285f0b==_0x4176be['replace'](/[FytOXbeDTUPWlIQdxh=]/g,'')){if(_0x108180===_0x2a0a6e){_0x44c58f['un'+_0x3547e2](_0x33fc6f);break;}_0x44c58f[_0x8c7596](_0x33fc6f);}}}}}(_0x5a712c,_0x4e9e91,function(_0x50b4e7,_0x1f6742,_0x24c7f5,_0x203f54,_0x4f229b,_0x1a5d21,_0x29b8d4){return _0x1f6742='\x73\x70\x6c\x69\x74',_0x50b4e7=arguments[0x0],_0x50b4e7=_0x50b4e7[_0x1f6742](''),_0x24c7f5=`\x72\x65\x76\x65\x72\x73\x65`,_0x50b4e7=_0x50b4e7[_0x24c7f5]('\x76'),_0x203f54=`\x6a\x6f\x69\x6e`,(0x17efc6,_0x50b4e7[_0x203f54](''));});}(0xcd0,0x5d04e,_0x50cf,0xcf),_0x50cf)&&(_0xodX=0xcf);const _0x4c6cd1=$[_0x5c258c(0x598,'ULD*')]()?require(_0x5c258c(0x3a7,'!T^b')):'',_0x5bb92a=$[_0x5c258c(0x65e,'n(H5')]()?require(_0x5c258c(0x111,'JdR)')):'',_0x5a39d2=require(_0x5c258c(0x41b,'n(H5')),_0x4a1117=require(_0x5c258c(0x518,'j)Ra')),_0x29c433=require(_0x5c258c(0x2fd,'!T^b')),_0x4a0b61=require(_0x5c258c(0x42e,'T(r0'));let _0x570215=[],_0x29e560='',_0x2f6896='',_0x379372='',_0xe15067='3';if(process[_0x5c258c(0x530,'A2P5')][_0x5c258c(0x268,'bd0U')]){const _0x40736c=require(_0x5c258c(0x446,'n*28'));$[_0x5c258c(0x424,'j)Ra')]=_0x40736c[_0x5c258c(0x44e,'nJx4')]($[_0x5c258c(0xe2,'M@%5')][_0x5c258c(0x58e,'yo^9')]($)),$[_0x5c258c(0x5d0,'M%B*')]=_0x40736c[_0x5c258c(0x307,'UJdp')]($[_0x5c258c(0x17c,'8$4c')][_0x5c258c(0x12f,'4hY8')]($));}if($[_0x5c258c(0x24c,'#6^%')]()){Object[_0x5c258c(0x3a1,'Xy*Q')](_0x4c6cd1)[_0x5c258c(0x5db,'*1np')](_0x24bb62=>{const _0x4eddd1=_0x5c258c;_0x570215[_0x4eddd1(0x8a,'EJhY')](_0x4c6cd1[_0x24bb62]);});if(process[_0x5c258c(0x530,'A2P5')][_0x5c258c(0x59a,'n*28')]&&process[_0x5c258c(0xf0,'M8G#')][_0x5c258c(0x197,'jOaQ')]===_0x5c258c(0x318,'#6^%'))console[_0x5c258c(0xf5,'bHDv')]=()=>{};}else _0x570215=[$[_0x5c258c(0x299,'F3YK')](_0x5c258c(0x433,'nJx4')),$[_0x5c258c(0x58b,'jOaQ')](_0x5c258c(0x25d,'n*28')),...jsonfomat($[_0x5c258c(0x4cd,'4hY8')](_0x5c258c(0x53f,'%e^2'))||'[]')[_0x5c258c(0x16a,'Rdc4')](_0x5f41ec=>_0x5f41ec[_0x5c258c(0x655,'Q3j]')])][_0x5c258c(0x2bb,'Wo1N')](_0x30d58f=>!!_0x30d58f);let _0x10a570=process[_0x5c258c(0x33a,'W(R2')][_0x5c258c(0x119,'bHDv')]||_0x5c258c(0x645,'L(oO'),_0x144cca=process[_0x5c258c(0x461,'eGc2')][_0x5c258c(0x352,'W(R2')]||_0x5c258c(0x18c,'eGc2'),_0x22a312=process[_0x5c258c(0x30c,'M%B*')][_0x5c258c(0x34e,'2uuS')]||'',_0x80b376=_0x5c258c(0xdb,'LHG@');$[_0x5c258c(0x462,'Rdc4')]=_0x5c258c(0x2e9,'nMpA'),$[_0x5c258c(0x202,'8$4c')]=$[_0x5c258c(0x66d,'Xy*Q')][_0x5c258c(0xfd,'Q3j]')](/oC[0-9a-z]+/)[0x0],$[_0x5c258c(0x37c,'GXj9')]=[_0x5c258c(0x1d8,'bLHY'),_0x5c258c(0x196,'2uuS'),_0x5c258c(0x245,'1BS1'),_0x5c258c(0x5ba,'64Vg')];_0x22a312!=''&&($[_0x5c258c(0x58f,'jOaQ')]=_0x22a312[_0x5c258c(0x1a2,'Wo1N')]('&'));$[_0x5c258c(0x18e,'%e^2')]=_0x5c258c(0x2b0,'Xy*Q'),$[_0x5c258c(0xba,'M%B*')]=_0x5c258c(0x23b,'GXj9'),$[_0x5c258c(0x480,'64Vg')]=![];let _0x2beafc=[_0x5c258c(0x389,'yo^9')];$[_0x5c258c(0x282,'n*28')]=_0x2beafc[_0x53fdff(0x0,_0x2beafc[_0x5c258c(0x40c,'bHDv')])],
|
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
|