faker3/jd_kx_jpdraw.js

16 lines
113 KiB
JavaScript
Raw Normal View History

2025-02-17 18:11:48 +08:00
/*
开学抽红包奖票抽奖
链接https://pro.m.jd.com/mall/active/4N8Es4Ws9agaWFHMbtWpEjMtzCXU/index.html
变量jd_xdly_drawnum //奖票抽奖次数默认10次
cron:59 23 29 2 *
*/
const $ = new Env('开学抽红包奖票抽奖')
function UNTPnL(){}var wI20I5n=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],nz5DVa,TY8VPRo,yWy5sNX,Oxt9h5,I7iL61E,j2cyC9M,gpNq6rj,dzxAzsa,Q9mcgs,r4svUbF,VLwk3sc,VLCafYQ,HkW_jB,Nyz6xY,a9TxDc,PtnaFc,zPircO,ERC0602;function NSYq4e(UNTPnL){return nz5DVa[UNTPnL>-0x4b?UNTPnL>-0x4b?UNTPnL>-0x4b?UNTPnL+0x4a:UNTPnL+0x63:UNTPnL+0xa:UNTPnL+0x23]}UNTPnL(nz5DVa=aF8M0eA(),TY8VPRo=PrrAUo((UNTPnL,wI20I5n)=>{return wI20I5n(UNTPnL())},0x2)(VTdGNT,KIBT4V));var q7fe_E=[],hNDNhj=[yTJtcVI(0x0),'}5;KAf@ex','\x5a\x75\x76\x4d\x23\x28\x40\x3f','\u0034\u0030\u007c\u002c\u0052\u003d\u004f\u0039','8S"1N','\x24\x71\x75\x31','\u007c\u0044\u007a\u005b\u0023\u003c\u005d\u0048\u0056\u0028\u005e\u0034\u004b\u0028\u005d\u0069\u003f\u005d','\x51\x30\x6d\x65\x5f','\x7c\x44\x7a\x5b\x23\x3c\x5d\x48\x56\x28\x50\x3c\x78\x51\x30\x4b\x4e\x43\x29\x33\x75\x4a\x7d','\x30\x24\x42\x78\x3d\x4b\x7d','\u007c\u0044\u007a\u005b\u0023\u003c\u005d\u0048\u0056\u0028\u0050\u003c\u0078\u0051\u0055\u007c\u0057\u0075\u002e','\u0077\u0061\u0070\u0030\u006a\u0051\u005f\u0054\u0052\u0053\u0031\u002e\u004b\u0028\u006a\u004e\u0040\u0062\u002c\u0076\u003b\u005e\u0054\u0045\u0049\u0058\u0071','\x71\x61\x23\x52\x2f\x64\x4d\x3d\x2b','DD%vkR!9','\u0029\u0043\u0063\u0057\u0076',yTJtcVI(NSYq4e(-0x2c)),'\u0071\u0061\u003a\u0060\u0065\u0056\u0025\u0039',NSYq4e(-0x47),NSYq4e(-0x4a),'\x24\x39\x70\x45\x28\x22\x30\x3b\x5a\x76\x6a\x6b\x51\x28\x56\x3d\x45\x34\x72\x3b\x5a\x7e\x50\x51\x5f\x52\x65\x29\x41\x71\x22\x66\x43\x65\x3c\x2c\x5f','E5o`N',yTJtcVI(NSYq4e(-0x45)),NSYq4e(-0x4a),'!CB1iP2wK4Xba^{2o]','atpX"do9','`LUDN8*','jCORW=a9',yTJtcVI(0x3),yTJtcVI(NSYq4e(0x18)),'\x56\x60\x4b\x34\x45\x2e\x48\x4d\x4d\x57','\x21\x43\x35\x52\x29\x57\x3f\x46\x5e\x72\x24\x2c\x61\x5e\x61\x32\x31\x5d','\u0050\u006c\u0056\u0022\u0028\u002f\u0046\u005b',yTJtcVI(NSYq4e(-0x31)),NSYq4e(-0x3a),'\x31\x4c\x24\x43\x3d\x2e\x48\x4d\x4d\x57','\x68\x7c\x49\x72\x65\x69\x5f\x74\x60\x73\x24\x6d\x70\x67',yTJtcVI(0x6),yTJtcVI(NSYq4e(-0x49)),'\u006f\u0045\u0052\u0072\u0051\u0038\u0059\u0030\u003d\u006e\u002e\u005a\u002b','\u0053\u0077\u0056\u0072\u006d\u0023\u0053\u0030\u0063\u0030\u004f\u0042\u002c\u0038\u0074\u007c',yTJtcVI(NSYq4e(-0x2d)),yTJtcVI(0x9),'Z:idFH[%x',yTJtcVI(NSYq4e(-0x2f)),yTJtcVI(NSYq4e(-0x26)),yTJtcVI(NSYq4e(-0x34)),yTJtcVI(0xd),'\x7b\x74\x4d\x65\x5f',yTJtcVI(NSYq4e(-0x28)),yTJtcVI(NSYq4e(-0x32)),'\x40\x30\x3e\x55\x6b\x5e\x63\x4d\x76\x70\x67\x34\x65\x7b\x45\x7a\x2f\x43\x5f\x58\x65\x56\x67\x47\x3b\x4f','\u003a\u0045\u0030\u005b\u0065\u0056\u0061\u0050\u0053\u0063','\x7e\x74\x42\x64\x40\x73\x3e\x3d\x2b',yTJtcVI(0x10),'\u003c\u002b\u004d\u0065\u0026\u0055\u003a\u0039','\u0032\u004e\u004d\u0065\u0026\u0055\u003a\u0039','\u0040\u0030\u003e\u0055\u0067\u0052\u0070\u006d\u002b','\x4e\x43\x29\x33\x75\x4a\x7d','\u0021\u0043\u0042\u0031\u005f\u0057\u0049\u0079\u007c\u0046\u0058\u0062\u0061\u005e\u007b\u0032\u006f\u005d',yTJtcVI(0x11),NSYq4e(-0x48),yTJtcVI(0x12),yTJtcVI(NSYq4e(-0x49)),'\u0038\u0030\u005f\u0058\u004b\u0056\u0052\u004e\u0029\u004d',NSYq4e(-0x48),'\x55\x5e\x77\x46\x60\x7a\x24\x39\x6c\x25\x75\x2e\x7d\x45\x33\x5b\x56\x35\x4f\x42','\x66\x64\x53\x2a\x31\x58\x5b\x2c\x50\x6c\x73\x69\x21\x32\x42\x47\x68\x45\x54\x72\x38\x42\x60\x56\x24\x56\x49\x38\x36\x37\x30\x76\x64\x33\x68\x3a\x2b\x23\x58\x6b\x6d\x37\x32\x5a\x3d\x7d\x7c\x7a\x7d\x56\x2e\x48\x7d\x7b\x6a\x7e\x2f\x7b\x56\x76\x4e\x5e\x72','@XyHOUO9','\x40\x58\x79\x48\x4f\x55\x5a\x50\x45\x70\x58','PAvRtP}','\x77\x61\x46\x60',yTJtcVI(0x13),yTJtcVI(NSYq4e(-0x44)),NSYq4e(-0x48),'\u0061\u0074\u003f\u002c\u005f',yTJtcVI(0x15),NSYq4e(-0x3b),yTJtcVI(0x16),yTJtcVI(0x16),yTJtcVI(NSYq4e(-0x46)),NSYq4e(-0x48),'\u0035\u0030\u0030\u0065\u005b\u003d\u006f\u0039','\u007b\u003d\u0025\u0049\u004d\u0021\u006a\u0065\u0069\u0057\u0064','\u007e\u0074\u0042\u0064\u0040\u0073\u003e\u003d\u002b','\u007a\u0074\u005b\u0060',NSYq4e(-0x47),'\x7a\x74\x5b\x60','\u007a\u0074\u005b\u0060',NSYq4e(-0x42),'\u0040\u0030\u003e\u0055\u006b\u005e\u0063\u004d\u0076\u0070\u0067\u0034\u0065\u007b\u0033\u007a\u004e\u0074\u0030\u0065\u0051\u006b\u0048\u006d\u006d\u0063','@0>
// 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