faker3/jd_3c_draw.js

15 lines
143 KiB
JavaScript
Raw Permalink Normal View History

2025-01-06 23:38:44 +08:00
/*
活动名称2.4 3c抽奖
活动链接https://prodev.m.jd.com/mall/active/3ABYwYuC87Dcx4gZYGKw6fqtE8WN/index.html
活动变量jd_3c_task //是否做任务获取次数,默认开启
cron:59 23 29 2 *
*/
const $ = new Env('2.4 3c抽奖')
function WYUFrm(){}var KcDP7G=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],AyFPMl,q8oUZja,wVpamjJ,wYcXya,XxDir8e,MOJ_7IJ,b4fmwHQ,S4IZe8,Dh80kh,lxD1Xf8,XIhMyzs,PXmcvk,o_i0Ae,m4k2STP,nlb89X,nrA9pE,PdpsRA,gCJrXlt,XRaOww,S7usCd;function ABy1TB(WYUFrm){return AyFPMl[WYUFrm>0x3a?WYUFrm>0x10b?WYUFrm+0x62:WYUFrm<0x10b?WYUFrm>0x10b?WYUFrm+0x3b:WYUFrm-0x3b:WYUFrm+0x3:WYUFrm-0x28]}WYUFrm(AyFPMl=zZA_zyX(),q8oUZja=BNHTo5x((WYUFrm,KcDP7G)=>{return KcDP7G(WYUFrm())},0x2)(YtS70zw,uSFFcx));var IjCmQy=[],QaUmo8=['\x3d\x4d\x75\x38\x26\x5d\x43\x77',jb7lLk(0x0),'bC,KY#Br1','\x6e\x46\x3e\x6c\x4e\x59\x23\x48','\x53\x4d\x5f\x55\x65','K@VU','\x23\x6d\x60\x32\x70\x70\x21\x51\x79\x24\x77\x7a\x4c\x3f\x3f','oy2BG','#m`2ppN.u3w67A','\u0023\u006d\u0060\u0032\u0070\u0070\u002c\u003a\u007a\u003e\u004c\u0033\u0055\u0072\u003f','\u0023\u006d\u0060\u0032\u0070\u0070\u0052\u002b\u0029\u0025\u0063\u0032\u0044\u0041',jb7lLk(0x1),jb7lLk(0x2),'\x23\x6d\x60\x32\x70\x70\x52\x2b\x5f\x2c\x6c\x38\x3d\x64\x7c\x4a\x6f\x79\x7c\x55',jb7lLk(0x3),'\x23\x6d\x60\x32\x70\x70\x52\x2b\x6a\x43\x55\x7c\x75','P*A8a"Y',jb7lLk(0x4),'\x40\x64\x73\x38\x63\x48\x24\x6c\x68',jb7lLk(ABy1TB(0x5a)),jb7lLk(ABy1TB(0xe3)),'\x75\x41\x51\x74','\u0040\u0064\u003c\u0074\u0042\u0022\u0031\u0034',jb7lLk(ABy1TB(0x47)),ABy1TB(0x3b),jb7lLk(0x8),'\x56\x33\x50\x5d\x36',ABy1TB(0x40),ABy1TB(0x3b),'\x2e\x3f\x25\x55\x71\x51\x78\x6e\x57\x33\x52\x44\x64\x39\x76\x78\x2b\x75','\x39\x78\x75\x30\x67\x63\x25\x56',jb7lLk(0x9),'\u0062\u003d\u0074\u007d\u002b\u0029\u0039\u0056',jb7lLk(ABy1TB(0x76)),ABy1TB(0x4a),'\u003d\u004e\u0061\u0040\u002e\u0069\u003d\u0042\u007b\u0079\u0063',jb7lLk(ABy1TB(0x64)),'\x64\x4e\x61\x40\x2e\x69\x3d\x42\x7b\x79\x2b\x60\x32\x7b\x32\x30\x47\x73','\u002b\u007c\u0049\u003c\u0034\u0078\u005f\u0066','\u0064\u004e\u0076\u0038\u0074\u002b\u0044','\u0025\u003d\u0071\u007d\u006e\u006b\u007c\u0064\u0045','\x6a\x32\x76\x5b\x7d\x29\x74\x56',jb7lLk(0xc),'\u0028\u002f\u005d\u0038\u0069\u0056\u0051\u0055\u0057\u0042\u0037\u0025\u0030\u003a',jb7lLk(ABy1TB(0x69)),'\u0067\u004d\u0025\u0057\u0058',jb7lLk(0xe),jb7lLk(ABy1TB(0x58)),'\u0077\u0073\u006a\u0055\u0064',jb7lLk(ABy1TB(0x67)),'\x4a\x7d\x52\x61\x57\x51\x31\x34','\u0040\u0064\u0024\u0042\u003e\u0049\u0075\u0037\u003a',jb7lLk(0x11),jb7lLk(0x12),jb7lLk(ABy1TB(0x43)),'\x39\x40\x6f\x42\x53\x6c\x58\x4a\x6e\x3d\x57\x36\x71\x6f\x32\x23\x4e\x63\x26\x61\x5f\x48\x33\x67\x57\x3d\x4c\x44\x75','\x3c\x5e\x79\x5b\x42\x22\x64\x51\x4d\x7b',jb7lLk(ABy1TB(0x46)),jb7lLk(0x15),'\u0046\u0068\u0024\u0042\u0058\u0049\u003c\u0034',jb7lLk(0x16),'\x30\x79\x3a\x49\x43\x38\x2c\x32\x68','\x65\x3f\x26\x7e\x56\x50\x59',jb7lLk(ABy1TB(0x5e)),jb7lLk(ABy1TB(0x62)),jb7lLk(ABy1TB(0x41)),'9@oBSlXJn=W6qo2#6cnI}Q%n5(z5u','\x5f\x41\x2b\x74\x65','\u0039\u0040\u006f\u0042\u0053\u006c\u0058\u004a\u006e\u003d\u0057\u0036\u0071\u006f\u0032\u0023\u0062\u0069\u005f\u0042\u0047',ABy1TB(0x4e),'\u0066\u0024\u0023\u006e\u005a\u0060\u0070\u0075','\u005b\u0041\u0073\u0038\u0057\u004d\u0048\u002b\u003a\u0028\u0045',jb7lLk(0x1a),'\x44\x37\x2a\x6e\x69\x72\x2a\x75\x56\x3b',jb7lLk(0x1b),'\x5b\x41\x73\x38\x55\x3c\x66\x2b\x3c\x3d\x7a\x35\x68\x72','\x44\x37\x2a\x6e\x34\x4b\x74\x28\x65\x7d\x48\x52\x60\x2a\x2a\x63\x68\x4f','\u005b\u0041\u0073\u0038\u006e\u0039\u003a\u006c\u0039\u003d\u006c\u005d\u0069\u0039\u006d',jb7lLk(ABy1TB(0x6e)),ABy1TB(0x51),'\x47\x59\x42\x4f\x50\x73\x49\x29\x4e\x36\x23\x5a\x7d\x51\x6b\x7c\x33\x2e','\u004d\u0042\u005a\u006b\u0061\u004d\u0032\u005a\u0063\u0075\u0061\u005a\u002e','\x26\x70\x6d\x46\x43\x4b\x74\x28\x65\x7d\x50\x66\x3e\x70\x57\x64\x5b\x62\x38',jb7lLk(0x1d),jb7lLk(0x1e),'\x3f\x22\x34\x44\x4b\x73\x76\x76\x70\x23','\u0057\u0079\u006b\u0048\u007e\u007a\u006f\u0050\u0072',jb7lLk(0x1f),'\x57\x53\x50\x3a\x66\x5a\x5b\x57\x33\x3c\x4b',ABy1TB(0x3c),jb7lLk(0x20),jb7lLk(ABy1TB(0x6c)),jb7lLk(0x22),'loe:0jQD6v4_(B0','\u0070\u003f\u0021\u0052\u0056\u0045\u0070\u0033',jb7lLk(0x23),'\x22\x70\x39\x46\x24\x60\x45\x60\x7c\x25\x3b\x77\x4f','#^#azy.4','\x52\x75\x6d\x50\x3f\x21\x5a\x6e\x60\x76\x78\x36\x38',jb7lLk(ABy1TB(0x3f)),ABy1TB(0x3c),jb7lLk(0x25),'\u003f\u0024\u0036\u0077',jb
// 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