faker3/jd_sjsb_draw.js

14 lines
143 KiB
JavaScript
Raw Normal View History

2025-01-13 17:06:36 +08:00
/*
活动名称1.23 手机升杯抽奖
活动变量jd_sjsb_task //是否做任务获取次数,默认开启
cron:59 23 29 2 *
*/
const $ = new Env('1.23 手机升杯抽奖')
function HnQMSe(){}var KudQos=Object['defineProperty'],xr3Jy1,ns0PRv,N8n3lP,eIeL8u,Ar_SD60,YIDUbh,yl3Rua,jKLR3m,VWDRfI,L1kmkG,Ovxct0,F_pKwCJ,g6RIQz,uzGLmr,ba67ko,aRxwYe;function fJH5hZL(HnQMSe){return xr3Jy1[HnQMSe>0xd?HnQMSe<0xcc?HnQMSe<0xcc?HnQMSe<0xcc?HnQMSe-0xe:HnQMSe+0x2c:HnQMSe-0x2b:HnQMSe-0x42:HnQMSe+0x7]}HnQMSe(xr3Jy1=XbEC7MK(),ns0PRv=g1BIVa((HnQMSe,KudQos)=>{return KudQos(HnQMSe())},0x2)(RPd_0D,iIEZJlt));var DTAzGmW=[],i15DkX=['\u0076\u0065\u006a\u0030\u006d\u0066\u004e\u0021',s0nn1J(0x0),'\x68\x57\x72\x5d\x35',s0nn1J(fJH5hZL(0x31)),s0nn1J(fJH5hZL(0x3a)),s0nn1J(fJH5hZL(0x2a)),s0nn1J(0x4),'\x26\x46\x5e\x29\x3f\x24\x70\x52\x70\x44\x69\x29\x2e\x40\x25\x5b\x35\x2c','\x26\x46\x5e\x29\x3f\x24\x70\x52\x43\x67\x4f\x68\x5d\x44\x39\x26','\x26\x46\x5e\x29\x3f\x24\x70\x52\x70\x44\x35\x68\x6b\x71\x6d\x4a\x5e\x76\x40\x55','\x26\x46\x5e\x29\x3f\x24\x70\x52\x43\x67\x2e\x43\x71\x40\x61\x4e\x62\x59\x6a\x5d',s0nn1J(0x5),s0nn1J(0x6),'\u0026\u0046\u005e\u0029\u003f\u0024\u0070\u0052\u0043\u0067\u004c\u007b\u0029\u0026\u0052',s0nn1J(0x7),'\x64\x4b\x6d\x51\x31\x32\x57\x6d\x2a\x76\x49\x65\x54\x43\x66\x49\x60\x2f\x78\x59\x7e\x5b\x34\x5f\x6e\x63\x57','\x5b\x59\x6c\x36\x34\x24\x49\x7c\x75','\x46\x46\x54\x51\x42\x36\x74\x5a','\u007e\u002f\u0041\u003f\u0051','\x2c\x71\x2e\x66',s0nn1J(fJH5hZL(0x2b)),'\x57\x77\x55\x66',s0nn1J(0x9),'\u007a\u005a\u0022\u0031\u0067\u0072\u006f\u004e\u0073\u0051\u006d\u0042\u0040\u0067\u0070\u007c\u0031\u0045\u0023\u004e\u0073\u004c\u002e\u0040\u002b\u0036\u0028\u007e\u004a\u005b\u0072\u003b\u002f\u0028\u0043\u0056\u002b',s0nn1J(0xa),'\x62\x48\x55\x66','\x3e\x37\x4b\x69\x7c','/L!Mv%8$]W4I5^s81+',s0nn1J(fJH5hZL(0x3b)),'\u0034\u0035\u0021\u004d\u0043\u0066\u005b',s0nn1J(0xc),'\x21\x5b\x3a\x56\x44\x78\x61',s0nn1J(0xd),'\u0048\u0034\u0040\u0072\u004c\u0058\u007c\u003b\u003b\u003d',s0nn1J(0xe),s0nn1J(fJH5hZL(0x26)),'/Lxi)R[','\u0031\u004c\u003f\u007d\u006b\u003c\u0076\u0043\u0077',s0nn1J(0x10),'\x4a\x66\x7e\x40\x63\x28\x5d\x61\x61\x75','\x44\x5b\x57\x28\x3f\x7c\x68\x25\x77\x63\x6d\x5f\x3d\x71','\x43\x3f\x78\x69\x4e\x7d\x2f\x3e',s0nn1J(fJH5hZL(0x3f)),'/Lailf#xnqXE+','\u002a\u0050\u0048\u0069\u0068\u007d\u002a\u0078\u005f\u0078\u003c\u0049\u0046\u0066\u006d\u0033','b?nM5',s0nn1J(fJH5hZL(0x28)),'\x62\x48\x77\x56\x6b\x2e\x54\x5a','\x5b\x59\x49\x28\x76\x64\x2c\x32\x69',s0nn1J(0x13),s0nn1J(0x14),'MW0Gp;z',fJH5hZL(0x19),s0nn1J(fJH5hZL(0x3d)),'\x4c\x48\x6a\x24\x37\x65\x69\x7c\x75','\x59\x24\x4f\x44\x68\x61\x30\x4f\x72\x28','\x43\x75\x49\x28\x2a\x64\x47\x5a',s0nn1J(0x16),'R<lG?nKSe',s0nn1J(0x17),s0nn1J(0x18),'\x2b\x48\x65\x66\x3a\x70\x5e\x2e\x75',s0nn1J(0x19),fJH5hZL(0x14),s0nn1J(0x1a),'f!P]k;ojm0=MVPS8FX@]_',s0nn1J(0x1b),'\u006d\u002f\u0076\u0036\u003f\u007c\u0059\u005a','\u0078\u002b\u0061\u006e\u003d\u0072\u0079\u0055\u006c\u005b\u0062','\x69\x54\x78\x35\x52\x7c\x68\x4d\x7b\x23\x43\x3e\x5f\x21\x46','x+an=ra|GZ','\u0055\u0071\u006c\u0036\u006c\u005f\u006e\u003a\u0046\u0022\u0032\u006e\u006d\u0059\u0046\u0026','\x55\x71\x6c\x36\x5d\x47\x7d\x38\x47\x23\x5f\x6e\x75\x4c','\x78\x2b\x61\x6e\x52\x75\x5e\x53\x60\x36\x68\x4a\x3b\x61\x61\x6a\x55\x31','\x6d\x4a\x7c\x60\x77\x39\x46\x28\x39\x2f\x28\x7b\x41\x39\x59','\x59\x24\x5b\x4e\x3d\x70\x6d\x5e\x6d\x77\x65\x6d\x24\x62\x3c\x67\x35\x42\x24','\x6d\x4a\x7c\x60\x7c\x7a\x30\x75\x3b\x65\x59\x7a\x51\x21\x7c\x74',s0nn1J(0x1c),'\x43\x22\x6e\x32\x5f\x43\x39\x6e\x4e\x76\x5f\x6e\x2c','\u005e\u004d\u0051\u0066\u002b\u0023\u0053\u005d\u0026\u006b\u0068\u0045\u0033\u004d\u0046\u0072\u006e\u0059\u0052',fJH5hZL(0x23),'\u003d\u003c\u002f\u0079\u003a\u0032\u0050\u0073\u002c',fJH5hZL(0xe),s0nn1J(0x1d),'\x73\x6e\x4c\x25\x40\x38\x69\x74','\u0079\u003a\u0068\u004e\u003e\u0077\u0038\u0041\u0025\u005b\u0077\u006b\u0035\u0077\u0041\u004b\u003a\u0070\u0065','\x67\x4d\x58\x66\x4e\x28\x42\x6a\x3e\x6f','\x74\x6e\x6d\x70','\u006c\u0023\u0022\u0063\u004f\u003b\u0035\u0055\u0054\u005a\u002c\u006d\u0032\u0066\u004f','&?)m_:&L','\x5a\x4a\x3d\x70\x69\x40\x57\x4c',fJH5hZL(0xf),'gMXfN(d(}0o)G',s0nn1J(0x1e),'\x6d\x4a\x7c\x60\x3f\x29\x44\x58\x2a\x6f\x22\x32\x47','\x6c\x23\x4f\x44\x37\x35\x41\x6c\x67\x4b\x75',s0nn1J(0x1f),f
// 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