faker3/jd_xdly_jpdraw.js

16 lines
113 KiB
JavaScript
Raw Normal View History

2024-10-30 10:48:02 +08:00
/*
东东心动乐园奖票抽奖
链接https://pro.m.jd.com/mall/active/2kxGJF9NdMDjyCfvVXMVZrwfXdpT/index.html
变量jd_xdly_drawnum //奖票抽奖次数默认10次
黑号不会使用奖票抽奖
cron:1 1 1 1 *
*/
const $ = new Env('东东心动乐园奖票抽奖')
function S9YVnV(){}var S5BW5x=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],NKsqVBx,CNu96mw,uVomfe,c3ZT6n0,pyIPzoI,U98K_DD,gLyEKB,tyW3q5f,tx6NPRp,GpN_va,KtKYRgU,T5ZCzI6,Tn0DZv,rW63jOf,b5ivl89,njSAQab,DG9cLLk;function Qo7luQ6(S9YVnV){return NKsqVBx[S9YVnV<0x126?S9YVnV>0x126?S9YVnV-0x2d:S9YVnV>0x126?S9YVnV-0x24:S9YVnV-0x28:S9YVnV-0xa]}NKsqVBx=r5e9kV();function t4yu3PI(S9YVnV,S5BW5x){return CNu96mw(S9YVnV,Qo7luQ6(0x28),{value:S5BW5x,configurable:Qo7luQ6(0x85)})}S9YVnV(CNu96mw=Object.defineProperty,uVomfe=t4yu3PI(nuvUrn((...S5BW5x)=>{var CNu96mw=nuvUrn(S5BW5x=>{return NKsqVBx[S5BW5x<0x119?S5BW5x<0x1a?S5BW5x+0x11:S5BW5x>0x119?S5BW5x-0x26:S5BW5x-0x1b:S5BW5x+0x2b]},0x1);S9YVnV(S5BW5x[Qo7luQ6(0x28)]=0x2,S5BW5x[Qo7luQ6(0x29)]=S5BW5x[CNu96mw(0x30)]);return S5BW5x[0x1](S5BW5x[CNu96mw(0x1c)]())}),Qo7luQ6(0x49))(A2Fp3f,Uc77nK));var nS1uFk=[],thb5QBA=[MCn8NOL(0x0),MCn8NOL(0x1),MCn8NOL(0x2),MCn8NOL(0x3),MCn8NOL(0x4),MCn8NOL(0x5),MCn8NOL(0x6),MCn8NOL(Qo7luQ6(0x51)),MCn8NOL(Qo7luQ6(0x44)),MCn8NOL(0x9),MCn8NOL(0xa),MCn8NOL(0xb),MCn8NOL(Qo7luQ6(0x3e)),MCn8NOL(Qo7luQ6(0x4f)),'\u0028\u004c\u002e\u007c\u0069\u0061\u0043\u006d\u0023\u0068\u0079\u0045\u007b\u004e\u0073\u0078\u002e\u007c\u007a\u0045\u002b\u0052\u0069\u006d\u003f\u0021\u0045',MCn8NOL(0xe),MCn8NOL(0xf),MCn8NOL(0x10),MCn8NOL(Qo7luQ6(0x43)),MCn8NOL(0x12),MCn8NOL(Qo7luQ6(0x31)),MCn8NOL(0x14),'\x50\x79\x5d\x36\x3d\x4c\x45\x63\x48\x2c\x66\x51\x3f\x3d\x4a\x7d\x36\x6f\x75\x63\x48\x72\x23\x3f\x49\x7e\x7b\x41\x76\x53\x4c\x32\x68\x7b\x42\x7c\x49',MCn8NOL(Qo7luQ6(0x9a)),MCn8NOL(0x16),MCn8NOL(0x17),MCn8NOL(Qo7luQ6(0x59)),MCn8NOL(Qo7luQ6(0x4e)),MCn8NOL(0x1a),MCn8NOL(0x1b),'\u005a\u0063\u004c\u0074\u0048\u007c\u0054',MCn8NOL(0x1c),MCn8NOL(0x1d),MCn8NOL(0x1e),MCn8NOL(0x1f),'OR|v6abz',MCn8NOL(Qo7luQ6(0x65)),MCn8NOL(Qo7luQ6(0x6c)),MCn8NOL(0x22),MCn8NOL(Qo7luQ6(0x68)),'oE$|~}jy',MCn8NOL(0x24),MCn8NOL(0x25),MCn8NOL(0x26),MCn8NOL(0x27),MCn8NOL(0x28),MCn8NOL(Qo7luQ6(0x6e)),MCn8NOL(0x2a),MCn8NOL(0x2b),MCn8NOL(Qo7luQ6(0x4a)),'+DR|1#ay',MCn8NOL(0x2d),MCn8NOL(0x2e),MCn8NOL(0x2f),MCn8NOL(0x30),MCn8NOL(0x31),MCn8NOL(0x32),'w2{h|tiu9',MCn8NOL(Qo7luQ6(0x3c)),MCn8NOL(0x34),MCn8NOL(0x35),MCn8NOL(0x36),MCn8NOL(0x37),MCn8NOL(0x38),MCn8NOL(0x39),MCn8NOL(Qo7luQ6(0x2b)),MCn8NOL(0x3b),MCn8NOL(0x3c),MCn8NOL(0x3d),MCn8NOL(0x3e),MCn8NOL(Qo7luQ6(0x2a)),MCn8NOL(0x40),MCn8NOL(0x41),MCn8NOL(Qo7luQ6(0x45)),MCn8NOL(0x43),MCn8NOL(0x44),MCn8NOL(0x45),MCn8NOL(0x3e),MCn8NOL(Qo7luQ6(0x2a)),MCn8NOL(0x3e),MCn8NOL(0x46),MCn8NOL(Qo7luQ6(0xd6)),MCn8NOL(Qo7luQ6(0x78)),MCn8NOL(0x3a),'\u003a\u0044\u0025\u007c\u0049','\x3f\x57\x23\x35\x47\x61\x7c\x48\x54',MCn8NOL(Qo7luQ6(0x79)),MCn8NOL(0x4a),MCn8NOL(Qo7luQ6(0x7a)),MCn8NOL(0x4c),MCn8NOL(0x4c),MCn8NOL(0x4d),MCn8NOL(0x3a),MCn8NOL(Qo7luQ6(0x34)),MCn8NOL(0x4f),MCn8NOL(0x50),MCn8NOL(0x51),MCn8NOL(0x52),MCn8NOL(0x51),MCn8NOL(Qo7luQ6(0x2b)),MCn8NOL(0x53),MCn8NOL(Qo7luQ6(0x82)),MCn8NOL(0x55),MCn8NOL(0x56),MCn8NOL(0x57),MCn8NOL(Qo7luQ6(0x60)),MCn8NOL(0x59),MCn8NOL(0x5a),MCn8NOL(0x5b),MCn8NOL(Qo7luQ6(0x4b)),MCn8NOL(Qo7luQ6(0x46)),MCn8NOL(0x5e),MCn8NOL(0x5f),'\u0039\u007c\u0023\u0041\u0065\u0057\u0028\u0065\u003d\u0030\u0079',MCn8NOL(0x60),MCn8NOL(Qo7luQ6(0x86)),MCn8NOL(0x62),MCn8NOL(Qo7luQ6(0x87)),MCn8NOL(Qo7luQ6(0x56)),MCn8NOL(0x65),'x|o(af^z',MCn8NOL(Qo7luQ6(0x88)),MCn8NOL(0x67),MCn8NOL(0x68),MCn8NOL(0x69),MCn8NOL(Qo7luQ6(0x89)),Qo7luQ6(0x2c),MCn8NOL(Qo7luQ6(0x8e)),'||"v?m/YAr<.cI',MCn8NOL(0x6c),MCn8NOL(Qo7luQ6(0x8d)),MCn8NOL(0x6e),MCn8NOL(0x6f),MCn8NOL(Qo7luQ6(0x8f)),MCn8NOL(0x51),MCn8NOL(0x4c),MCn8NOL(0x71),MCn8NOL(0x51),MCn8NOL(0x72),MCn8NOL(0x4f),MCn8NOL(0x50),MCn8NOL(0x3a),MCn8NOL(0x13),MCn8NOL(0x3a),MCn8NOL(Qo7luQ6(0x2f)),MCn8NOL(Qo7luQ6(0x7e)),MCn8NOL(0x5a),MCn8NOL(Qo7luQ6(0x2d)),MCn8NOL(0x5b),MCn8NOL(0x3a),'whA|LZo%Sm,Knr',Qo7luQ6(0x2c),MCn8NOL(0x74),MCn8NOL(0x75),MCn8NOL(0x76),'\x51\x57\x24\x7c\x49\x3f\x6a\x79',MCn8NOL(Qo7luQ6(0x8c)),MCn8NOL(Qo7luQ6(0x90)),MCn8NOL(Qo7luQ6(0x30)),'\u004b\u006d\u0071\u0032\u0021\u0073\u005e\u007c\u0048\u002c\u004b\u0070\u0063\u0032\u0063\u007d\u0076\u0078\u0072\u0062\u0026\u0064\u0061\u0028\u0037\u007e\u0056\u0036\u0046\u0065\u0077\u005
// 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