jdpro/jd_lnjhy.js

8 lines
76 KiB
JavaScript
Raw Normal View History

2024-01-24 12:04:54 +00:00
/*
33 3 17-31,1-4 1,2 * jd_lnjhy.js
*/
const $ = new Env('龙年接好运');
var _0xod0='jsjiami.com.v7';function _0x47d4(){const _0x3b35f1=(function(){return[...[_0xod0,'ONjxJsHjXiamriL.cwnoHm.vYD7EWnDTOuwGeODe==','aKRcQmkzWPS','eSoIqCofW48','W6JdNCoAimoKi1RcHa','W5RdUSk1WOFdRW','WPhdRSkrWQdORA3MSztLPkNOTjVVV53ORyJMOyxMN7ZNVz7OT5RPH7BORi8','W452jmo7iW','ldVdPSojW4m','W5fgW4hcQa','eSoruSoLW4i','xmo1W4xdQYS','nv7cLxW','js/cJbyZ','W77dGCkSWODr','atJdQdv0','iY/dIdf9','leL9xSoN','oCk/xSkNWRu','f8kYfaraWQG','pqa3W5NdHa','EcxcSa','D8kxWPG','WOKAWQ7dQ8kzlmkSgmk2hSozcW','nGZcN8o4lq','W53dGmkM','mdNcUCoplq','W4HoW7xcS8ogCmkDn8k+pSoOpq','W7bnW6dcSCof','W7yeW6TipW','bMRcQW','hhpdU0ldIrq5qa','sHC7WQZdJW','d0TSnmk7','W4fIW6hcR8o+','j3pcVSkUWRa','AtFdO8oN6k2D5Rgz5AEI6lsm77+W6kYL5Qco5P2Q57Yd6lsQ6yEV6k+J','mmkdcYnC','geBcGgO5','lbqNW5ldQa','c2TSW4K5','W4XCyZFcOW','WQJcHCk0WRG4','WP11W49lxmo9','W6D9F3dcSG','pSkAkIvB','W59EW6dcGmoq','W71HDZFcUG','FZyeWO7dPG','hW3cLSo9i8kqDCoW','W7rPimo5nG','pCksu8kFWOi','W5PWW6VcJt4','W5LeW7FcUCogE+w0JowLRUAwL3dcPNG','WOZcUtFdRSkO','j2hdS1u','mmkchG1x','gYidW6/dHwKcW53dNa','WQZcIIBdOCk0','hJ7dLvDx','cSk8tmkDWR4','jrNdH8oAW49PWQPKWP3cSCkMW6y8WQbQwrSI','duDEcmk1WPFdRSk9wa','W49hsItcHW','auddPmotWOK','c8odBSo5W4pdIa','5lIM5yIu5OMm5yU377Y/5OIe5AAB5Q2e5PsgsSoz','sdSOWOnQW7TYW7rwW5bwnG','W6e+WQnmWOq','ECklWPdcS8oUWQa','W4vozHdcNa','5y+x5ycb5lII5yUpyW','hSkLcc5hWQC','WRbLW5bwEW','cSkKW73cVW0','xJKGWRVdPq','heD4u8ol','hJ7cTa8QW5NdPmozdvpdOq','W5LlW7tcKX0','WOLnwqq','q8oCvmk5f24O','eHVdOf5dWQ0','pmkbW5RcIYmnDZtdHW','jsJcU8okaW','WO/cUmkbWOO','WP54W4i','o8kdW5xcMJmTDJZdOsPXWQGZDaC6eCkHW4xdRuzdcbygWPCFW5BdMCoHWOVdVslcJsxcV8kskGBcICoVW4tdPCo9DXRcNh7dR2lcPCo1zmkVDmojCIGDrIPaW45iW74OWOxdGCojWRxdIHHWW6mwW508W4Xe','k8kyfGvx','W5vrs3JcVa','kSo9dI/dNa','W40FW5brhW','h8kPWQ3cRvtdM8kRW6LeW4K0WOm','W7rIW4NcPZC','WOKQW4ddQCoX','du9ZW7CA','WR3cOZpdPSkPxWm','6kYi5yIO6zM95OEX5z2Ar8kfW7/cMmo46l+D5yA55Qco5l2j5PEf5ysl5A62uow4S+ISQUMcO+I9PEIeSoAETEwpToIoJUwoT1lcHCoLomohWOu','st0MWQRdRZf+','f0HzW7qR','WPdcRmoL','xvP4W54esSkrl1fYqXqj','wmoDW4VdSIe','W6iFdLHK','oSkLWQ/cKEITSoAYH+wKNUI3K++8IUIUGEAJMUACP+E+QEI0PoMhM+ISUq','cNZcHGX/fa','feRcUCkEWR92W6X8W7RdPuLS','bvFcGmknyG','EKxcK8kbW7u','W7zgW5BcIrFdHCo/','W5ZdQmkWWPbp','bG7cVSolbW','hcxdTSo8W7vAWPrSWRlcHG','W5tdNCkZWQtdQxe','vYJdGLROR4FMSOJLPOJOTRpVVi7ORkRMO6FMN5NNVzlOTRtPH7JOROC','uYi2WPr3W6alWPOuWRCVqq','WP0YW7yOW4W','W7TuW6tcIHS','haeYWPW','ffJcQSkDWO8','W4ldM8kZWOddThfXwmkO','kSkBw8kJWPG','WP7cVSkgWRma','cfBdICoOWPa','btxcVqS7','WPPQW4JcM+ITMoAXNowNJ+I1UU+/K+IUP+AHI+AEVEE8KUI1IUMhU+ITTG','gSkTtSkGWPNcS8oeWOZcSq','eSogESoHW6W','zY3cHdX3','cWddNSoSW5i','aCojsmk5mNiSzNmIW6/cSa','CbVcU8kVW64PnSo7WQSTW6Sc','hXSyWPX+','WRZdS8ozhEITOEAWIowKHEI3HU+/MoIVJoAJUoADRUE/V+I1KUMfHEITOa','WR/cRmoTWQFcR2SNWRLj','lxNdKSooW5BdRW','hSk4vCk9','FXSybCk2W7mNnKJdOmo3','vSkLadhdMCkUBmo7nqJcTSoXW7SVkmkzhW','gWBdTq','W5SSjffG','lMxdQLtdPGe1','W7bbW5dcG8o9','WQa3W5FdGSonCa','dNFcPWbj','ouVcLw0Ig0ddJCkjWPy+FxHRW5KKWRFdRCkFdgVcHSkN','t8o1W7VdVa','bhj4W6lcQN8TiL8F','AmkaWQFcLSoE','lYtdQaf7','WPDixHpdOG','W6P6FstcIW','khb+fSkl','W7fVlq','W55gW4lcImoiWO4','khddTX7dQLS+quFdOKv2','W7zjlSofnW','W6LSW6/cOmoo','huNdISo4WQ0','a3BcGmk4FmkrWOu','WPxcISoKWP7cQG','W4iCbvTypL9F','ig7dULxdVW','peBcRa9h','cMdcGG','WPlcQsRdGCk0','WPbnxru','W681oufS','br7cKaKO','qSoXCmoF6k2q5RoV5Awv6lss776r6k2p5Qg25P2657+o6lAT6ywd6k+W','ECklWPhcQ8oZWRDAWPvYgwG','W7WjWODkWP8','nfZdTa','WO/cT8oWWQxcQgK9WPv0','lW/dNCo3W4m','W7eodfPZ','W4arW7vjaW','WReKW5BdPmoQBSoutW','WRNdGWSHwa','WPRcUCke','WR55W5f3xq','EZqlWOFdGq','lSktW5RcIYqS','cJtcQYSIW5tdMa','W5r3W6hcIbO','c2hdTgtdTa','ECklWPVcVq','fYu1W6BdGa','aaeM','WQtcOHBdS8kRDqjFWQ4XW7JdNeXkW7K','jw/dUq','W4iziMnp','WPTZW6HLrq','cs8jWQzc','WRJcVXG','W4GxW4b+ka','WOj4W5zA','hMPVc8ky','W7/dUHBdNqa','WQGmWQ7dQ8oI','CCkQWRlcNCol','WRdcSqVdQa','WQKQW4i','osBcRG','oatdTmoMW4W','vNlLPyhOTO7cIX3LJ7ZLMy7cJqe','lt/cPmoEfq','iN/dHSopWOG','wfpcOW','WO1yqHNdIIRdRJGk','lr/dLXvc','W4TmW6tcHSo+','W7HpW4ZcG8ox','WR7dMJGn','W5TgW5y','m8ohqSk0nW','o0DKv8o7','WQqYW4tdVCoAxSoktmkU','fJ0x','jsBcK8ollq','W75RW4hcJY8','lgxdKG','vCoPA8kB6k6m5Rge5Aw46lsU77YZ6k685QgC5PYH572z6lw96yw/6kYF','WQ7dKd0Aumor','W4
// prettier-ignore
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