faker3/jd_xdly_jpdraw.js

16 lines
128 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
东东心动乐园奖票抽奖
链接https://pro.m.jd.com/mall/active/2kxGJF9NdMDjyCfvVXMVZrwfXdpT/index.html
变量jd_xdly_drawnum //奖票抽奖次数默认10次
2024-11-14 15:32:25 +08:00
2024-11-12 11:17:55 +08:00
cron:1 1 1 1 *
*/
const $ = new Env('东东心动乐园奖票抽奖')
2024-11-14 15:32:25 +08:00
function IB7kep(){}var YR701l=Object['defineProperty'],zftfe3,RSkDcAh,puJt9Gb,pziiXB,OsC51m,H55kC3O,PWIytN,F9GzQLg,a6FdN3,C98Lsr,hjZkc0,pSKO1R,WWBKMN,PPxv72V,oeVfJc,AT1reY;function eF_TBF(IB7kep){return zftfe3[IB7kep<0x13d?IB7kep-0x1a:IB7kep+0x16]}zftfe3=c0taSu();function Wv9islS(IB7kep,YR701l){return RSkDcAh(IB7kep,eF_TBF(0x34),{value:YR701l,configurable:!0x0})}IB7kep(RSkDcAh=Object.defineProperty,puJt9Gb=YKYJdw((IB7kep,YR701l)=>{return YR701l(IB7kep())},0x2)(k52uFJZ,aD1rIse));var QQ7V7J=[],_y_luJ=[BL87jc(0x0),BL87jc(eF_TBF(0x38)),BL87jc(0x2),BL87jc(0x3),BL87jc(eF_TBF(0x44)),BL87jc(eF_TBF(0x35)),BL87jc(eF_TBF(0x3e)),BL87jc(0x7),BL87jc(0x8),BL87jc(eF_TBF(0x42)),BL87jc(eF_TBF(0x5b)),BL87jc(0xb),BL87jc(eF_TBF(0x40)),BL87jc(0xd),BL87jc(0xe),BL87jc(0xf),BL87jc(eF_TBF(0x86)),BL87jc(0x11),BL87jc(0x12),BL87jc(eF_TBF(0x62)),BL87jc(eF_TBF(0xd4)),BL87jc(eF_TBF(0xc1)),BL87jc(0x16),'nc|NVxS4',BL87jc(0x17),BL87jc(0x18),BL87jc(0x19),BL87jc(eF_TBF(0x41)),BL87jc(0x1b),BL87jc(0x1c),BL87jc(0x1d),BL87jc(0x1e),BL87jc(0x1f),BL87jc(eF_TBF(0x65)),BL87jc(eF_TBF(0x66)),BL87jc(0x22),BL87jc(eF_TBF(0x1c)),BL87jc(0x20),BL87jc(eF_TBF(0x6a)),BL87jc(0x25),BL87jc(0x26),BL87jc(0xf),'It?N|_&',BL87jc(0x27),BL87jc(0x28),BL87jc(0x29),BL87jc(0x2a),BL87jc(eF_TBF(0x70)),BL87jc(0x2c),BL87jc(0x2d),BL87jc(eF_TBF(0x72)),BL87jc(eF_TBF(0x73)),BL87jc(eF_TBF(0x5a)),'*9J~0[@<x1S|eW',BL87jc(0x31),BL87jc(0x32),BL87jc(0x33),BL87jc(0x34),BL87jc(eF_TBF(0xd5)),BL87jc(0x36),BL87jc(eF_TBF(0xb8)),BL87jc(0x38),BL87jc(0x39),BL87jc(eF_TBF(0x90)),BL87jc(0x3b),BL87jc(0x3c),BL87jc(eF_TBF(0x77)),BL87jc(0x3e),BL87jc(eF_TBF(0x1e)),BL87jc(eF_TBF(0x57)),BL87jc(eF_TBF(0x26)),BL87jc(0x42),BL87jc(eF_TBF(0x7a)),BL87jc(eF_TBF(0x46)),BL87jc(0x45),BL87jc(0x23),BL87jc(0x46),BL87jc(0x47),BL87jc(eF_TBF(0x1a)),BL87jc(eF_TBF(0x4e)),BL87jc(0x4a),BL87jc(0x4b),BL87jc(0x23),BL87jc(eF_TBF(0x23)),BL87jc(eF_TBF(0x24)),BL87jc(0x4e),BL87jc(0x4f),BL87jc(0x50),BL87jc(0x51),BL87jc(0x52),BL87jc(0x53),BL87jc(0x54),BL87jc(0x55),BL87jc(0x23),BL87jc(0x56),BL87jc(0x57),BL87jc(0x58),BL87jc(0x23),BL87jc(eF_TBF(0x7c)),BL87jc(0x5a),BL87jc(eF_TBF(0x1d)),BL87jc(0x5b),BL87jc(eF_TBF(0x6d)),BL87jc(eF_TBF(0x1a)),BL87jc(eF_TBF(0x1b)),BL87jc(eF_TBF(0x1b)),BL87jc(eF_TBF(0x1f)),BL87jc(0x23),BL87jc(eF_TBF(0x21)),BL87jc(eF_TBF(0x20)),BL87jc(0x61),BL87jc(eF_TBF(0x28)),BL87jc(eF_TBF(0x1c)),BL87jc(eF_TBF(0x2c)),BL87jc(eF_TBF(0x1c)),BL87jc(eF_TBF(0x1c)),BL87jc(eF_TBF(0x27)),'}Z|j',BL87jc(eF_TBF(0x1d)),BL87jc(0x5b),BL87jc(0x5c),BL87jc(eF_TBF(0x1a)),BL87jc(eF_TBF(0x85)),BL87jc(0x5d),'a5kbgLAgMOlw"|A',BL87jc(0x64),BL87jc(eF_TBF(0x89)),BL87jc(eF_TBF(0x30)),BL87jc(0x47),BL87jc(0x51),BL87jc(0x66),BL87jc(eF_TBF(0x43)),BL87jc(0x68),BL87jc(0x69),BL87jc(0x6a),BL87jc(0x6b),BL87jc(0x6c),BL87jc(eF_TBF(0x8b)),BL87jc(eF_TBF(0x1e)),BL87jc(0x6e),BL87jc(0x6f),BL87jc(eF_TBF(0x1c)),BL87jc(eF_TBF(0x25)),BL87jc(0x71),BL87jc(eF_TBF(0x8c)),BL87jc(0x73),BL87jc(0x61),BL87jc(eF_TBF(0x13b)),BL87jc(0x75),BL87jc(eF_TBF(0x9f)),BL87jc(0x77),BL87jc(eF_TBF(0x8f)),BL87jc(eF_TBF(0x79)),BL87jc(0x23),BL87jc(0x5d),BL87jc(eF_TBF(0x1f)),BL87jc(0x23),BL87jc(0x5f),BL87jc(eF_TBF(0x20)),BL87jc(eF_TBF(0x33)),BL87jc(0x3e),BL87jc(eF_TBF(0x1c)),BL87jc(0x1f),BL87jc(0x23),BL87jc(0x23),BL87jc(0x62),'}Z|j',BL87jc(0x63),BL87jc(eF_TBF(0x3b)),BL87jc(eF_TBF(0x31)),BL87jc(0x5d),BL87jc(eF_TBF(0x1c)),BL87jc(0x7c),BL87jc(0x7d),BL87jc(0x7e),BL87jc(0x7f),BL87jc(0x70),BL87jc(0x80),BL87jc(0x71),BL87jc(eF_TBF(0x8d)),BL87jc(0x6f),BL87jc(eF_TBF(0x21)),BL87jc(eF_TBF(0x51)),BL87jc(eF_TBF(0x1c)),BL87jc(0x82),BL87jc(0x7c),BL87jc(eF_TBF(0x22)),BL87jc(0x83),BL87jc(0x84),'\u0056\u002a\u0038\u0032\u007e\u0053\u006c\u004e\u007c\u0061\u0078\u006d\u0059\u0060\u0037\u0054\u0026\u007c\u0055',BL87jc(eF_TBF(0x1c)),BL87jc(0x23),BL87jc(eF_TBF(0x98)),BL87jc(eF_TBF(0x22)),BL87jc(0x85),BL87jc(0x86),BL87jc(0x61),BL87jc(eF_TBF(0x29)),BL87jc(eF_TBF(0x2a)),BL87jc(0x5d),BL87jc(0x88),BL87jc(eF_TBF(0x92)),BL87jc(0x8a),BL87jc(0x23),BL87jc(0x8b),BL87jc(eF_TBF(0x2e)),BL87jc(eF_TBF(0x2f)),BL87jc(eF_TBF(0x23)),BL87jc(eF_TBF(0x24)),BL87jc(eF_TBF(0x25)),BL87jc(0x8c),BL87jc(0x8d),BL87jc(eF_TBF(0x32)),BL87jc(0x8f),BL87jc(0x90),BL87jc(0x91)
2024-11-12 11:17:55 +08:00
// 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