faker3/jd_nzyq_draw.js

14 lines
127 KiB
JavaScript
Raw Normal View History

2025-01-06 23:28:08 +08:00
/*
活动名称2.28 年在一起抽奖
活动链接https://pro.m.jd.com/mall/active/2SPD9SANqEbYq9zMfivnHsSjgpBR/index.html
活动变量jd_nzyq_task //是否做任务获取次数,默认开启
cron:59 23 29 2 *
*/
const $ = new Env('2.28 年在一起抽奖')
2025-01-07 10:51:05 +08:00
function UIpwat5(){}var Btc14t=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],FoHO2EC,xj9l1W,eurGs1,A5WaOz_,eZkUjP5,rHy5MDi,pWiRlLL,kMh3UgC,ga9XFKj,uTuyBl,_sJ0tP,dFUbxie,dRifRo,LTMkUSF,SjBhoZ5,elVvxZS;function Eb9cwQ(UIpwat5){return FoHO2EC[UIpwat5>0x10d?UIpwat5-0x39:UIpwat5>0x3f?UIpwat5<0x10d?UIpwat5-0x40:UIpwat5+0x1e:UIpwat5-0x51]}UIpwat5(FoHO2EC=W_nrQrn(),xj9l1W=BE9kki((UIpwat5,Btc14t)=>{return Btc14t(UIpwat5())},0x2)(cjSfZ9,gINlnft));var DJdmkW=[],_nzgj1y=['\u0040\u0051\u0076\u007a\u005f\u0036\u006d\u007e','\u006e\u002c\u0038\u006b\u0077\u0041\u0026\u007d','54C`09+~','\x6d\x78\x2f\x67\x66\x3b\x54\x4c','@:Slt','\u0045\u004a\u004f\u006c','\u002c\u002a\u0076\u007c\u003f\u0078\u0062\u0044\u0071\u0037\u003d\u0068\u006d\u0037\u005a\u0076\u0042\u005a','\x35\x64\x63\x73\x7e','\u002c\u002a\u0076\u007c\u003f\u0078\u0062\u0044\u0049\u0034\u007b\u004e\u0022\u002c\u0068\u0076',',*v|?xbDI4icY5yJtZ','\u002c\u002a\u0076\u007c\u003f\u0078\u0062\u0044\u0071\u0037\u004f\u0040\u006c\u0034\u0065\u002c','\x2c\x2a\x76\x7c\x3f\x78\x62\x44\x49\x34\x74\x40\x6d\x3b\x3e\x75\x24\x55\x35\x44','\x2c\x2a\x76\x7c\x3f\x78\x62\x44\x71\x37\x59\x43\x3b\x35\x47\x23\x22\x62\x5e\x6c','\x2c\x2a\x76\x7c\x3f\x78\x62\x44\x71\x37\x59\x43\x3b\x35\x64\x6d\x74\x4b\x50\x67\x4f\x79\x47',GScjLUt(Eb9cwQ(0x61)),'\u002c\u002a\u0076\u007c\u003f\u0078\u0062\u0044\u0071\u0037\u007d\u0048\u0063\u002c\u0066','\x79\x21\x3b\x4e\x33\x71\x47','\x22\x6e\x31\x26\x2f\x58\x32\x29\x5a\x68\x2e\x43\x6c\x52\x70\x4f\x26\x72\x24\x63\x4e\x33\x54\x42\x73\x68\x4a','\x4a\x62\x38\x4e\x3c\x4d\x6b\x2f\x7a',GScjLUt(Eb9cwQ(0x6b)),'\u0050\u004b\u0072\u0028\u005d','\u005a\u003b\u0059\u003f','\x4a\x62\x56\x3f\x73\x71\x57\x70',GScjLUt(Eb9cwQ(0x6a)),GScjLUt(Eb9cwQ(0xc1)),'EpQL7Sd#{]>R57q/Lh2#{}Y5~NsPuJSAKsC3~','\x4c\x77\x39\x3f\x74',GScjLUt(Eb9cwQ(0x4b)),'p;Ss~','\u0060\u004b\u005e\u006c\u0076\u0059\u0029\u0048\u006d\u0068\u006e\u0026\u0062\u003d\u0025\u0029\u0039\u005a',GScjLUt(0x5),'\u006e\u0062\u005e\u006c\u0042\u0071\u0047',GScjLUt(Eb9cwQ(0x45)),'=JB34.G','\x42\x4b\x77\x4e\x50\x28\x42\x54\x3d\x32\x52',Eb9cwQ(0x50),'\x60\x4b\x77\x4e\x50\x28\x42\x54\x3d\x32\x45\x33\x62\x3d\x62\x29\x6c\x5a','EL"D<M,p',GScjLUt(0x7),GScjLUt(Eb9cwQ(0x6d)),'\x68\x64\x2c\x33\x4e\x2f\x55\x70','Vb>Xfg~ccr','\u0034\u004a\u003a\u0073\u0028\u002f\u0040\u0079\u006e\u0054\u003e\u006f\u0029\u003b',GScjLUt(Eb9cwQ(0x74)),GScjLUt(Eb9cwQ(0x75)),GScjLUt(Eb9cwQ(0x66)),GScjLUt(Eb9cwQ(0x64)),'\u005d\u0038\u0066\u006c\u0062','\u0024\u0021\u0077\u004e\u004f\u0026\u0047','\u0022\u0046\u006e\u0033\u006d\u0059\u0057\u0070','\u004a\u0062\u006b\u0073\u0055\u0058\u005a\u007c\u0069',GScjLUt(0xd),GScjLUt(Eb9cwQ(0x77)),Eb9cwQ(0x43),'=J5s@/6"H2mIv5c,1<P3SMhBm2w&Z',GScjLUt(0xf),'\u007d\u0046\u005e\u004d\u0061\u0049\u0069\u002f\u007a','\u0024\u0021\u0066\u006c\u0043\u0038\u0032\u0066\u003a\u003c','Czks6XVp',Eb9cwQ(0x4f),Eb9cwQ(0x53),'\x74\x4b\x50\x67\x4f\x79\x47',GScjLUt(0x10),'\u004d\u0033\u006b\u006e\u0067\u0038\u002f\u0037\u0073',Eb9cwQ(0x46),GScjLUt(Eb9cwQ(0x49)),'\x53\x3b\x39\x3f\x74','\u003d\u004a\u0035\u0073\u0040\u002f\u0036\u0022\u0048\u0032\u006d\u0049\u0076\u0035\u0063\u002c\u007b\u0023\u0053\u0073\u007e','\u0054\u0030\u007b\u0042\u004e\u0057\u0024\u0023\u0077\u0066\u0046\u0061\u0048','>KUN(/bp','\x34\x7e\x3b\x35\x29\x6f\x63\x7d\x79\x4d\x2c',GScjLUt(0x12),GScjLUt(0x13),'\x34\x7e\x3b\x35\x3b\x22\x71\x50\x40\x7a\x30\x71\x73\x25\x40\x28','4~;5KXp}X="qwx','\x44\x3b\x38\x4e\x61\x7c\x29\x63\x56\x60\x43\x5d\x2f\x38\x38\x22\x39\x5a','\u0068\u0047\u002a\u005b\u0077\u003b\u0054\u0057\u003b\u0066\u0057\u0049\u0056\u003b\u0041','\x24\x21\x54\x3f\x6d\x59\x48\x29\x48\x6a\x7a\x48\x21\x52\x64\x25\x28\x4f\x21','\x34\x7e\x3b\x35\x3b\x22\x44\x70\x46\x48\x40\x22\x4f\x2c\x3b\x42',GScjLUt(Eb9cwQ(0x7a)),'\x52\x7a\x71\x30\x22\x52\x57\x71\x6b\x48\x22\x71\x33','\x35\x55\x53\x71\x3e\x2c\x34\x5d\x65\x36\x4e\x7d\x58\x55\x54\x6f\x33\x41\x44','\u003b\u003a\u007a\u0068\u002c\u002f\u0067\u0067\u0055\u0040',GScjLUt(0x15),GScjLUt(Eb9cwQ(0x7b)),Eb9cwQ(0x40),'\x77\x7e\x4d\x2b\x3e\x69\x49\x2f','\x79\x60\x4e\x2e\x55\x6e\x69\x7d\x2b
2025-01-06 23:28:08 +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