2024-07-15 15:05:34 +00:00
|
|
|
var _0xodS='jsjiami.com.v7';const _0x544c43=_0x3b91;(function(_0x2bb12f,_0x14fab0,_0x1f8fb8,_0x16a810,_0x1efa4d,_0x48dcfa,_0x445623){return _0x2bb12f=_0x2bb12f>>0x6,_0x48dcfa='hs',_0x445623='hs',function(_0x235c9d,_0x511bd5,_0x91b251,_0x4d3d0d,_0xedf949){const _0x2e2b4d=_0x3b91;_0x4d3d0d='tfi',_0x48dcfa=_0x4d3d0d+_0x48dcfa,_0xedf949='up',_0x445623+=_0xedf949,_0x48dcfa=_0x91b251(_0x48dcfa),_0x445623=_0x91b251(_0x445623),_0x91b251=0x0;const _0x2ff230=_0x235c9d();while(!![]&&--_0x16a810+_0x511bd5){try{_0x4d3d0d=parseInt(_0x2e2b4d(0x4bf,'5[Lp'))/0x1*(parseInt(_0x2e2b4d(0x647,'0Gq1'))/0x2)+-parseInt(_0x2e2b4d(0x67a,'@UqS'))/0x3+parseInt(_0x2e2b4d(0x383,'2wnp'))/0x4*(parseInt(_0x2e2b4d(0x19d,'a86^'))/0x5)+-parseInt(_0x2e2b4d(0x388,'t6Kr'))/0x6+parseInt(_0x2e2b4d(0x4eb,'0Gq1'))/0x7*(parseInt(_0x2e2b4d(0x3c5,'[)&6'))/0x8)+parseInt(_0x2e2b4d(0x5f7,'wRg0'))/0x9*(-parseInt(_0x2e2b4d(0x628,'0Gq1'))/0xa)+parseInt(_0x2e2b4d(0x2a1,'ke8U'))/0xb*(-parseInt(_0x2e2b4d(0x5c0,'vy%@'))/0xc);}catch(_0x18a50b){_0x4d3d0d=_0x91b251;}finally{_0xedf949=_0x2ff230[_0x48dcfa]();if(_0x2bb12f<=_0x16a810)_0x91b251?_0x1efa4d?_0x4d3d0d=_0xedf949:_0x1efa4d=_0xedf949:_0x91b251=_0xedf949;else{if(_0x91b251==_0x1efa4d['replace'](/[DPABGunKdHkWNfQyYRSb=]/g,'')){if(_0x4d3d0d===_0x511bd5){_0x2ff230['un'+_0x48dcfa](_0xedf949);break;}_0x2ff230[_0x445623](_0xedf949);}}}}}(_0x1f8fb8,_0x14fab0,function(_0x560fa1,_0x404cb0,_0x2b8ba5,_0x166f8e,_0x3d2039,_0x4370a1,_0x2c337b){return _0x404cb0='\x73\x70\x6c\x69\x74',_0x560fa1=arguments[0x0],_0x560fa1=_0x560fa1[_0x404cb0](''),_0x2b8ba5=`\x72\x65\x76\x65\x72\x73\x65`,_0x560fa1=_0x560fa1[_0x2b8ba5]('\x76'),_0x166f8e=`\x6a\x6f\x69\x6e`,(0x178e33,_0x560fa1[_0x166f8e](''));});}(0x3240,0xa4c99,_0x55d3,0xcb),_0x55d3)&&(_0xodS=`\x6f5`);function _0x55d3(){const _0x10b49f=(function(){return[...[_0xodS,'BjsDRjNWdiAbaRumKik.nAcuGyofmB.vSYu7PHQD==','EeFdR3ZdOa','vxmkq1BdIq','EKNdLwldLq','g8o9tv/dPmkdW6VcTNZcVSkxjZO+','bdpdUmo4W4lcMmksWQeGAqpcVSop','auLYW4q','W47cK8kVWPtdMq','W5nAW6VdU3FdKSoIdSkDWPZdQCk3W7TPivGSeZJcUuBcVWOHW4u7wSoCW5xdNKtcJLdcHCo6ugxcMeHtn8kRzsj2t8opW4DiW7WtWQddNmoRbG','n8ovdJVcUSk+WQxdQmoYDua','W6BcL8o7d8kdW6m','WR/cOmkFW4iQbG','qXpdRa0UW7y','leNdOCkudmo5WQBcOG','eMtdS8kBia','WOr9WQ/cVG','BmokWONdLCkX','m1eIeHqK','DCkOnmkVWRO','i8ohWPldH8onWRb3WQG','uXK/WPrOWQTqjZtcMCoQr8oY','WQ91hSkvrZi','wWKNFCkWWRFdVa','u8ooWOu','CLuQy1q','qW7dSXq5','nLldOCkBhmoUWRa','W7vmW6RcQrNcNSoMsW','hSorWPVdHCokWRu','wqq8cSoq','AXGEWP7cT8k/WPBcKG','rhhdHmo6x8kL','gJ9BBwtcNZRdPbmYWRfsnmoFWPrVygFcTX9IW5i8BG','WR/cT8kGW7Gs','WO3dOI8SnZVcM8ktW61l','CmkDlSkx','sxmbqNBdMahcUMv0WOag','vmkeWOX2rG','irNdIb4','5y+K5yk6rW','C8ouWOBdJ8kp','zqtcRNFcJSoXWQS','nCosWPfpWPecrtCDWRC','WRPqWRlcL8o4','W4RcR8k6WQRdSCkI','sGK6umkSWQFdUfuhW6G','W5BcPx8','W43cUSk7WQJdI8k8jSoR','EbClnmo5','sHq8sSkQWQa','uCkfWPZcVSky','yuRdHCosrW','W4dcGSkNWQ3dPq','bmo6rq','W4RcM3DWwa','E8oYWOOcna','baJdSGmC','Bq/cQSowuSk0W6JdUe3cUmkNnG','W5qLWRSEamoOAu1yWRHW','W47dLmkCi8ooW4HV','kVcLJ5W','CSkqnCkzWQK','DY3dKb0X','DSksWQzrxq','zaCzWP/cTq','WPFcGhxcP8kIymkDECochSkojCoeCSkWWO5oCL1rW4VdQSkrW5ldKSorW4BdUa','WOvTW6ZcTx0','rCknaSk0WOW','tctcPNdcQa','WP4/WQK','5B+05yUQ5AAg56sK5Oks6ywU77YB','sNCWW4FdSW','WPvCWPVcGSoA','W4rDW7ZcRJq','W6tcNCo4lCkgW7NdUCoskWS','W4bMW7LfvCoGztSdW7aawmk3','W6JcHMdcHmk5','FmoUWRqMnG','A8keWRL2qW','o8ovda','th/dL8oE','W4mKW7hcJSkgqa','W4O5W7BcMSkgw8kAe1jJ','W5WXW7pcGmkg','5Ass56Adv/cONie','W4pdL8k/p8oD','WPVcK2tcOW','D0JcN8kYWPOjW7eHWR4zW6DLWQW','W7FcPCoNcmkH','xHi4tSo/W77dQae','CCkhWOXYxCoPzmk9WQK','CHRcKL/cOW','WOa1WR0ccmkH','f8kAiaNdHa','dvmYWRvg','W6/cNCkmWOxdQG','W4hcI34','qf0uW4W','W71IFSk7WPK','eCkRkJWK','WPj3WRlcRSocWOe','kWlcUCkuWRmV','W7HDW7RcMJa','WOnjxCoiW5BcQIFdPmkuW7tdQCk1W5e','usevvCkY','CXeV','amoLsKddSCkgW7pcVM0','W6DnWOqjia','lCkLE37dMCkc','fxtLTRROR4pNV48','W5ZcS2W','ASo1WQpdSmkC','WQ91hCkmsIub','sSkeWRRdJCoL','W7HQWOiebL5lW75NW5HrjSkSW695','g8kpvgNdOG','WRf/cG','WPnTW5hcTvVdUXK','5BYm5yQT54IV5P2+772tzWWsFSoqW73dIue','yeNdUmopW68','ymkLWOVdTmof','txddGmonvmkNWRxdImoIA8k5rg4gW5NdRJVdPYi','W5yxamkC','auZcUWTt','BCoqmWmfnhHT','ySkNWRNcRmoGWOLZnmknACoN'
|
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
|