yydspure/jd_jingBeanReceive.js

9 lines
31 KiB
JavaScript
Raw Normal View History

2022-07-28 21:53:26 +08:00
/*
专属礼
6 10 * * * jd_jingBeanReceive.js
*/
var _0xodg='jsjiami.com.v6',_0xodg_=['_0xodg'],_0x1216=[_0xodg,'bmlja05hbWU=','bWF4UGFnZQ==','REJHb2s=','CioqKioqKuW8gOWni+OAkOS6rOS4nOi0puWPtw==','KioqKioqKioqCg==','44CQ5o+Q56S644CRY29va2ll5bey5aSx5pWI','5Lqs5Lic6LSm5Y+3','Cuivt+mHjeaWsOeZu+W9leiOt+WPlgpodHRwczovL2JlYW4ubS5qZC5jb20vYmVhbi9zaWduSW5kZXguYWN0aW9u','dGltZQ==','Y2F0Y2g=','LCDlpLHotKUhIOWOn+WboDog','ZmluYWxseQ==','ZG9uZQ==','SnVVU1c=','elRTZGc=','dVhNTGE=','dEVvRUI=','VVBwclU=','dWN0anU=','WVRIUnc=','bXR5cHk=','YklGUFg=','ZU5XZHY=','YXhLUVU=','Z2V0Sm95SW5mbw==','Ym9keT0lN0IlMjJmaXJzdFR5cGUlMjIlM0EtMTAwJTJDJTIycGx1Z2luX3ZlcnNpb24lMjIlM0E5MDU1OCU3RCZjbGllbnQ9YXBwbGUmY2xpZW50VmVyc2lvbj0xMS4wLjImc3Q9MTY1ODA0NTA1MjcyNSZzdj0xMDImZXA9JTdCJTIyY2lwaGVydHlwZSUyMiUzQTUlMkMlMjJjaXBoZXIlMjIlM0ElN0IlMjJzY3JlZW4lMjIlM0ElMjJDSk95RElleUROQzIlMjIlMkMlMjJ3aWZpQnNzaWQlMjIlM0ElMjJaSnV5RDJTeUNXVHdZSnEyRE5VMlpOcnVFV1RzWXpTbkN0YzRDTlZzWUp1JTNEJTIyJTJDJTIyb3NWZXJzaW9uJTIyJTNBJTIyQ0pHa0NLJTNEJTNEJTIyJTJDJTIyYXJlYSUyMiUzQSUyMkNKUHBDSlVtWHpVbkR0U3pYek95RHpLMCUyMiUyQyUyMm9wZW51ZGlkJTIyJTNBJTIyWTJZNUNRWW1DSnV6Q3pxM0N3RzJaTlZ0WXRPekN6R25aTlB2Q3pxM0QySHZDSkNuRUpIdUVLJTNEJTNEJTIyJTJDJTIydXVpZCUyMiUzQSUyMlkyWTVDUVltQ0p1ekN6cTNDd0cyWk5WdFl0T3pDekduWk5QdkN6cTNEMkh2Q0pDbkVKSHVFSyUzRCUzRCUyMiU3RCUyQyUyMnRzJTIyJTNBMTY1ODA0NTA1MjcyNSUyQyUyMmhkaWQlMjIlM0ElMjJKTTlGMXl3VVB3Zmx2TUlwWVBvazB0dDVrOWtXNEFySkVVM2xmTGh4QnF3JTNEJTIyJTJDJTIydmVyc2lvbiUyMiUzQSUyMjEuMC4zJTIyJTJDJTIyYXBwbmFtZSUyMiUzQSUyMmNvbS4zNjBidXkuamRtb2JpbGUlMjIlMkMlMjJyaWR4JTIyJTNBLTElN0QmZWY9MSZzaWduPWJmOTVmNDJmNmIzZDA2MDc2YzNmNDBkZmQ5MmI0ZTdi','blhvcXY=','U0F5c0Y=','RGdaWHc=','TE9iUnA=','Vmp0TXY=','aVBIU1I=','WVphREg=','cmdrbVc=','alRZWEs=','dHlxRVk=','dE1wdFU=','eWNMbVQ=','bk55SGM=','Rm9paW4=','cG9zdA==','dUtjeVU=','V3JqWlI=','dGhCVWg=','WEdGY0k=','IEFQSeivt+axguWksei0pe+8jOivt+ajgOafpee9kei3r+mHjeivlQ==','cGFyc2U=','TWJoVEc=','SnRUS0s=','c3RyaW5naWZ5','TXRRV2E=','SWplRFQ=','dFh5cVQ=','REZFZWU=','bU1yRXo=','dkFSZHk=','WVZaY3E=','ekJ0U00=','UmdrWlg=','bGZPR3M=','QVlDVVk=','c1VRSVE=','d2luZG93c0NvbnRlbnQ=','bG9nRXJy','cmZBQUk=','TW5wSmg=','c3lHVXQ=','ZEtwaEk=','eVRJUk8=','TldvWUQ=','Rmp3QXI=','amluZ0JlYW5SZWNlaXZl','Ym9keT0lN0IlMjJlbmNyeXB0QXNzaWd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g1MTIzNTdjNjdiOGY1Yg==','TmJqdmQ=','QktNeEE=','Zmp1Qm8=','am9qS28=','aEZlWkY=','aUxZWGE=','cXdZTHY=','V29vSUw=','QkZCcGM=','TFJCTlY=','bW5pRVk=','cE5IRFI=','RHdDWXk=','YmxDb2s=','VFhVTm8=','WktiSnM=','ZndmU2Q=','ZE9HZXc=','UkFLZGw=','dUZlSUU=','Q3h0dGI=','akFpS28=','RGVxSlo=','aW5XTGw=','d3pVWkU=','Y29kZQ==','aXNTdWNjZXNz','aWFkanA=','dG9Wdkw=','c0dkQlU=','alJURk4=','bWVzc2FnZQ==','a255Z0s=','c0pqZWM=','WVRHWmQ=','T29QQWo=','YXBpLm0uamQuY29t','YXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVk','Ki8q','emgtSGFucy1DTjtxPTE=','aHR0cHM6Ly9hcGkubS5qZC5jb20vY2xpZW50LmFjdGlvbj9mdW5jdGlvbklkPQ==','UXpTclo=','UHJXS2o=','eXJLWEM=','QVNWeXI=','SXBBUWc=','c3JXY0s=','eGdvbVY=','cmFuZG9t','SWpxTmI=','TmhsTWY=','bFdkYUM=','RG5LWlo=','VGlIU3U=','cmV0Y29kZQ==','YmFzZQ==','SnR6SVg=','UkdSUEg=','cWROc1E=','YXBwbGljYXRpb24vanNvbix0ZXh0L3BsYWluLCAqLyo=','Z3ppcCwgZGVmbGF0ZSwgYnI=','em
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