faker3/jd_bean_home.js

14 lines
82 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
2025-02-25 11:57:53 +08:00
升级赚京豆
活动入口京东APP首页-京东秒杀
cron:1 1 1 1 *
2024-11-12 11:17:55 +08:00
*/
2025-02-25 11:57:53 +08:00
const $ = new Env('升级赚京豆')
function zcVvZgm(){}var rRx5l6B=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],cLB_jbs,fRVnFDm,CZCOaX,eqhdvm,I4OMYT,W20EuJ,oCIavQ,jNQPONa,t7TXlaM,rQqHokF,PE48u4o,KlS8JLX,JkOWSI,ewRtfw,AuzXD4n,A6_gtr;function nyUMfFt(zcVvZgm){return cLB_jbs[zcVvZgm>-0x5a?zcVvZgm>0x7?zcVvZgm-0x5:zcVvZgm+0x59:zcVvZgm+0x34]}zcVvZgm(cLB_jbs=K_hPFu(),fRVnFDm=nEpLij((zcVvZgm,rRx5l6B)=>{return rRx5l6B(zcVvZgm())},0x2)(TOYm9A,rrK9L5a));var lFyNqM=[],DyVefB=['\x32\x7e\x6c\x5d\x7b\x6b\x29\x53\x3e',pa_sly(nyUMfFt(-0x52)),pa_sly(0x1),'y#L9O`c=rzR@x',pa_sly(nyUMfFt(-0x45)),'\u003f\u0055\u0052\u0070\u0069','\x47\x2c\x7b\x33',pa_sly(0x3),'HgWU','\x7c\x7e\x62\x22\x6f','\u003b\u007c\u006b\u0034\u0076\u0062\u0073\u0066\u0053\u0031\u005e\u006a\u004f\u0076\u007d\u0065\u0034\u0068\u0064\u0066\u0053\u0021\u0047\u004f\u006f\u003d\u0022\u005d\u0061\u007b\u0062\u0077\u0024\u0022\u0045\u005b\u006f','\x6f\x45\x3c\x33\x44',pa_sly(0x4),pa_sly(0x5),pa_sly(0x6),pa_sly(nyUMfFt(-0x46)),'\u0052\u0045\u006c\u0067\u002a\u005b\u0070','\u006c\u004b\u004c\u0025\u0066\u0040\u006c\u0024\u0052\u005e\u004a','\u002f\u0072\u005b\u0037\u004b\u0054\u006e\u0028\u0028\u0026','\x30\x4b\x4c\x25\x66\x40\x6c\x24\x52\x5e\x51\x67\x3b\x52\x3b\x2c\x53\x7e',pa_sly(0x8),'\x30\x4b\x2b\x74\x34\x51\x70',nyUMfFt(-0x55),'iUsg%9#A','\x50\x3b\x31\x38\x5d\x54\x6e\x28\x28\x26','OB*3','[wMQp(1|`]KYN,','\u006c\u0021\u002b\u0074\u004a\u0025\u0030\u0041','\u0048\u0075\u0042\u0035\u006b','\u0056\u0055\u0039\u0051\u003f\u0026\u0053\u0065\u0062\u0078\u0038\u0037\u0047','\x6f\x2a\x73\x64\x63\x36\x6f\x7c\x6d\x7c\x6b\x3f\x5e\x75\x22\x55','\u0069\u006d\u0062\u0075\u0024',pa_sly(0x9),pa_sly(0xa),pa_sly(0xb),'JBeQL',pa_sly(0xc),'\u004c\u0042\u0057\u0033\u003b\u0026\u0032\u007b\u0050',pa_sly(nyUMfFt(-0x47)),nyUMfFt(-0x59),'\u0075\u002c\u0072\u0051\u0043\u007d\u006b','bU7)4MGe(V*Y~a:','*,mlo0@d`]o','\u0063\u006f\u0030\u002a\u0038\u0032\u0063\u0035','\x4b\x55\x25\x6c\x70\x28\x24\x35',pa_sly(nyUMfFt(-0x3c)),'\x7a\x6d\x4d\x2a\x4e\x45\x71\x5d\x56\x6d\x3a\x4a\x47','{4ilB{k','\x50\x2c\x5d\x33\x7a\x70\x64\x35',pa_sly(nyUMfFt(-0x50)),pa_sly(nyUMfFt(-0x56)),'\u0060\u0024\u0041\u0075\u003b\u0026\u006b','\x5d\x33\x3e\x60\x7a\x26\x6b',pa_sly(0x11),'\x42\x42\x46\x7a\x59\x6c\x6b','\u002a\u002c\u006d\u006c\u006e\u004d\u003b\u005d\u0054\u0052\u0038',pa_sly(nyUMfFt(-0x36)),'\x2e\x33\x39\x51\x51\x70\x5e\x3c\x3b\x41\x6d\x37\x47','\u0062\u0055\u0037\u0029\u003d\u0063\u0046\u003c\u003d\u0078\u0075\u005b\u0047',nyUMfFt(-0x57),pa_sly(nyUMfFt(-0x37)),pa_sly(0xe),nyUMfFt(-0x53),'\u0042\u0050\u006a\u004c\u0072\u0024\u0038\u0047','\x3d\x2c\x3c\x33\x44','\u0050\u002c\u005d\u0033\u007a\u0070\u0064\u0035','\x77\x24\x5d\x33\x73\x2e\x6c\x7e\x71\x5d\x78\x21\x49\x26\x6d\x4f\x5e\x3a\x23\x75',nyUMfFt(-0x59),pa_sly(nyUMfFt(-0x39)),pa_sly(0x15),pa_sly(0x16),pa_sly(0x17),pa_sly(0xd),'\u004f\u0042\u002a\u0033',pa_sly(nyUMfFt(-0x58)),'OB*3',pa_sly(0x19),pa_sly(nyUMfFt(-0x58)),nyUMfFt(-0x54),nyUMfFt(-0x57),'\x4f\x42\x2a\x33','hrml)}e(TR',pa_sly(0x10),pa_sly(0x1a),'\x29\x23\x23\x2c',pa_sly(nyUMfFt(-0x56)),'\u0063\u006f\u0030\u0051\u004d\u006c\u0032\u0037\u0047\u0073\u006d','\u0075\u002c\u0072\u0051\u0043\u007d\u006b','\u0045\u0030\u0037\u006c\u0042\u007b\u0054\u0044\u004a\u0074\u002c\u005a\u003e\u006d\u006a',pa_sly(nyUMfFt(-0x56)),pa_sly(0x18),pa_sly(nyUMfFt(-0x56)),'\x63\x6f\x30\x51\x4d\x6c\x32\x37\x47\x73\x6d','\u0075\u002c\u0072\u0051\u0043\u007d\u006b',pa_sly(0x13),'BB9Q%X)D=R8','\u0062\u0055\u0037\u0029\u003a\u0038\u0074\u0054\u0050','\u0024\u0042\u005d\u0033\u0055\u0022\u0061\u003b\u0038\u005d\u0034\u0057\u004b\u003a\u0078\u0048\u003c\u0047',pa_sly(nyUMfFt(-0x56)),'\x55\x6d\x37\x6c\x6c\x2b\x2f\x7b\x54\x52','\x7d\x30\x69\x6c\x32\x28\x24\x35','\u004b\u0055\u0067\u0051\u0041\u0058\u006b',pa_sly(nyUMfFt(-0x38)),pa_sly(0x1c),pa_sly(0x1d),nyUMfFt(-0x59),nyUMfFt(-0x55),nyUMfFt(-0x59),pa_sly(0x19),'w$]3s.l~q]x!I&mO^:#u','\u004f\u0042\u002a\u0033','\u003c\u0055\u006d\u006c\u0063\u0045\u0064\u003b\u0050','\u003b\u006d\u0065\u0051\u0061\u006c\u0056\u0035',pa_sly(nyUMfFt(-0x33)),pa_sly(0x1f),pa_sly(nyUMfFt(0x4)),'\x56\x
// 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