faker3/jd_sx_draw.js

15 lines
143 KiB
JavaScript
Raw Permalink Normal View History

2024-12-18 11:15:27 +08:00
/*
活动名称抽生肖金币
活动地址https://pro.m.jd.com/mall/active/38fBeMPN3sLNzhvpxCZBbsteaLsv/index.html
活动变量jd_sx_task //是否做任务获取次数,默认开启
cron:1 1 1 1 *
*/
const $ = new Env('抽生肖金币')
2024-12-31 22:05:18 +08:00
function _Zud0IC(){}var XPsJva=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],CakgQ2,CQnShd,t7aqSW,Yo89X04,i7bfX6,nkhACC,UOYUMO,H2kPDa,jgCpSK,l4M1d07,tsTRwx,a3zs0Ai,y46wOxn,H89rtUR,hH1Fh1p,c8ffidO,TnNxuN,I8gOGF,frQMrWJ,tRC50X_,UB1uheO;function F4PHBE(_Zud0IC){return CakgQ2[_Zud0IC<-0x17?_Zud0IC-0x40:_Zud0IC>0xb8?_Zud0IC+0x45:_Zud0IC>0xb8?_Zud0IC-0x3a:_Zud0IC+0x16]}_Zud0IC(CakgQ2=eKDifnX(),CQnShd=eL_s_C3((_Zud0IC,XPsJva)=>{return XPsJva(_Zud0IC())},0x2)(_grjru,kMUfror));var XOt_On=[],Jq7Qxch=['\x6b\x7c\x6b\x72\x7c\x6f\x68\x57','\u003b\u0026\u006f\u0067\u005d\u0040\u0054\u0029\u0049',eIHyP77(0x0),eIHyP77(F4PHBE(0xa)),eIHyP77(F4PHBE(0xb)),'\x64\x24\x38\x5e\x5e\x6e\x67','\x3b\x72\x62\x22\x5b\x25\x26\x30\x2c\x62\x5e\x61\x6c\x42\x2c','II*V9.@eK#WN{}[O!F',eIHyP77(F4PHBE(0xe)),eIHyP77(0x4),eIHyP77(0x5),eIHyP77(F4PHBE(0x7)),eIHyP77(0x7),'\x3d\x6c\x26\x76\x47\x51\x23\x63\x44\x40\x4e\x66\x4b\x48\x49',eIHyP77(0x8),'\u003d\u006c\u0026\u0076\u0047\u0051\u0040\u0021\u0041\u0066\u0036\u0064\u0028\u0033\u004a\u0030\u004b\u0046',eIHyP77(F4PHBE(0x9)),'\x3d\x6c\x26\x76\x47\x51\x34\x29\x57\x23\x50\x2e\x69\x41\x48\x2b\x70\x46','\x3d\x6c\x26\x76\x47\x51\x34\x29\x72\x66\x46\x6d\x48\x51\x5a\x4f\x7a\x7c\x52\x3a\x21','\u003d\u006c\u0026\u0076\u0047\u0051\u0034\u0029\u0057\u0023\u0050\u002e\u0077\u007d\u007e\u0078\u006f\u0052\u007e\u004b','\x3d\x6c\x26\x76\x47\x51\x34\x29\x72\x66\x2e\x60\x42\x5d\x38\x4f\x21\x46','\x3d\x6c\x78\x6a\x49\x50\x3e\x5b\x42\x23\x29\x28\x23\x6e','\x73\x71\x6e\x2e\x56\x33\x31','\x23\x4d\x41\x21\x67\x35\x7c\x6d\x22\x6a\x22\x77\x3a\x3b\x57\x3d\x3e\x52\x78\x24\x77\x7a\x32\x6c\x4e\x7e\x52',eIHyP77(F4PHBE(0x2c)),'\x6c\x6c\x2a\x75\x43\x2e\x45\x65',eIHyP77(0xb),'Fn2M',eIHyP77(0xc),eIHyP77(F4PHBE(-0xc)),'\x65\x6e\x57\x3a\x70','\x69\x65\x23\x7c\x41\x57\x52\x42\x74\x75\x54\x43\x6f\x41\x33\x50\x7c\x66\x77\x42\x74\x48\x32\x6f\x70\x2e\x3a\x38\x7a\x4f\x57\x35\x49\x3a\x60\x56\x70','\u007c\u004e\u0029\u004d\u0024','x^jM','\x36\x46\x5e\x6e\x76',eIHyP77(F4PHBE(0x10)),eIHyP77(F4PHBE(0x14)),'\x34\x7d\x5f\x4b\x21\x33\x31',eIHyP77(0x10),'\u005d\u004f\u0021\u0056\u007e\u0051\u0031','\x6b\x4f\x2a\x55\x49\x67\x6b\x40\x70\x30\x43',eIHyP77(0x11),'\u0045\u0049\u004e\u002e\u0038\u0022\u0021\u0047\u005d\u0077\u0069\u0056\u007d\u005d\u007d\u0025\u004b\u0046','i|xjUy=e','\u0025\u004f\u006d\u006e\u004d\u003c\u006a','\u0073\u004f\u0048\u0055\u0064\u002a\u0065\u006b\u007b','eQIX3JT>',eIHyP77(0x12),eIHyP77(0x13),eIHyP77(0x14),eIHyP77(F4PHBE(-0xd)),'\u0045\u0049\u006b\u003a\u0038\u0033\u002b\u005a\u0062\u003e\u0068\u0058\u0046','\x63\x2a\x78\x3a\x44\x2e\x63\x5a\x52\x5a\x4e\x36\x3f\x33\x73\x4f','\u0075\u0067\u0062\u004b\u007d',eIHyP77(F4PHBE(0x18)),eIHyP77(0x17),'\x4f\x7d\x5a\x3a\x40\x59\x46\x2c\x63','\x61\x5e\x5a\x3a\x70','\u0024\u0049\u0038\u0068\u002b\u0073\u0074\u0032\u0039\u0072',F4PHBE(-0xe),'\x21\x5e\x3b\x4d\x5b\x7c\x4d\x5a\x59\x3e\x3b\x59\x5a\x3d\x45\x7a\x60\x54\x77\x59\x32\x50\x31','\u003b\u007c\u0052\u006a\u003a\u0033\u007d\u0032\u0039\u0072',eIHyP77(0x18),eIHyP77(0x19),F4PHBE(-0x7),'%$Z:LY;e','\x6b\x52\x63\x59\x3e\x2e\x23\x76\x53','\u0024\u0049\u0038\u0068\u002b\u0073\u0031','EI_Kp"&X=G46}]a%)F','\x70\x5e\x28\x4d\x21\x33\x26\x32\x53',eIHyP77(0x1a),eIHyP77(F4PHBE(0x1b)),eIHyP77(0x1c),eIHyP77(0x1d),eIHyP77(0x1a),'\x7c\x4e\x38\x68\x3b\x4e\x7a\x32\x46\x77\x68','\u007c\u004e\u0038\u0068\u003b\u004e\u0037\u0058\u0038\u0047\u007d\u0028\u0047\u0039\u0037\u003d',F4PHBE(-0x13),'\u0021\u005e\u003b\u004d\u004d\u003b\u0023\u0076\u003c\u005a\u0029\u0044\u0064\u006f\u0058\u004f\u0074\u0042\u0057\u003a\u0070','\u0035\u005e\u0078\u003a\u0052\u002e\u0044\u005b\u004f\u0044\u0075\u0028\u004b\u0048','h3x:p','\u0056\u0071\u0053\u0065\u0023\u0029\u0028\u0068\u0052\u002a\u0028\u0063\u0059','\u007c\u0033\u002b\u0041\u0041\u002b\u0062\u0042\u0063\u0076\u0056\u0056\u0062\u003b\u006b\u007e\u0037\u003c','\x21\x5e\x3b\x4d\x5b\x7c\x4d\x5a\x59\x3e\x3b\x59\x5a\x3d\x45\x7a\x60\x54\x71',eIHyP77(0x1e),eIHyP77(F4PHBE(0x12)),eIHyP77(0x20),'\x6a\x6e\x67\x2e\x4a\x39\x79\x29\x63\x47\x43','\u0050\u005f\u0021\u003e\u004a\u0036\u0024\u0073\u0067\u006d\u0063\u0047\u0070\u007
2024-12-18 11:15:27 +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