faker3/jd_opencard_1226.js

16 lines
106 KiB
JavaScript
Raw Permalink Normal View History

2024-12-27 17:25:38 +08:00
/*
环境变量
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:59 23 29 2 *
*/
const $ = new Env('1.4 赶个年味集 红运带回家')
function mJL1kMC(){}var yv0Eet=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],XgUylm,fbqLQUQ,InrwqYg,AimOL4J,nFHo8E,YAVTai,Hgel4n,SI8D5O,JBq1LmB,CO5I5Ef,gIiIoC,k6m6q6,Ka4f1Y,Tw5AZX,zG6vLNL;function nnfEezr(mJL1kMC){return XgUylm[mJL1kMC>0x4d?mJL1kMC+0x61:mJL1kMC+0x2d]}mJL1kMC(XgUylm=YJ7gRVQ(),fbqLQUQ=CN8Dap((mJL1kMC,yv0Eet)=>{return yv0Eet(mJL1kMC())},0x2)(HK6Qwok,ktqmFe));var FjyYuHq=[],ThL7_W=['\x7b\x3d\x6b\x70\x64\x6d\x40\x28\x75',ok32bz(nnfEezr(-0x1d)),'\u0073\u0067\u003d\u0068\u004c\u0059\u0043\u0050\u0041','\x29\x3d\x41\x7d\x26\x66\x6d\x70','}/[c>','\x40\x79\x69\x63','\u0028\u003f\u0038\u0024\u004c\u007d\u004b\u0058\u0022\u0062\u0071\u0064\u0066\u0029\u0047\u0028\u0022\u0056\u005f\u006e\u0023\u004e\u003b','\u0029\u0021\u0024\u002e\u005f','\x28\x3f\x38\x24\x4c\x7d\x4b\x58\x22\x62\x71\x64\x66\x29\x73\x7c\x4c\x42\x40\x63','\x69\x56\x2c\x63\x30\x65\x77\x4e\x43\x25\x7e\x38\x49\x66\x5a\x7a\x44\x69\x34\x3a\x72\x2e\x30\x7e\x24\x60\x45\x49\x2a\x29\x73\x7a\x22\x79\x2c\x3d\x26\x3d\x3b','\u0075\u0074\u0030\u0071\u005a','RBXY','\u0079\u0073\u002a\u0059\u002e\u0044\u0076\u0041',ok32bz(nnfEezr(-0x1e)),nnfEezr(-0x2d),ok32bz(0x2),'\x4d\x50\x3d\x7d\x68',nnfEezr(-0x2c),nnfEezr(-0x2d),ok32bz(nnfEezr(-0x19)),'\x69\x56\x2c\x63\x59\x7a\x48\x4e\x79\x62\x75\x21\x67\x44\x54\x30\x73\x6d\x2a\x43\x75\x79\x41\x76\x2e\x2c\x44\x46\x21\x43\x5d\x7b\x69\x6f\x6d\x6e\x22\x2e\x7e\x7e\x6e\x7e\x37','\u002a\u0044\u0079\u0047\u0056\u0064\u0035\u0032\u0056\u0060\u0037','\u0032\u006f\u002c\u0063\u002e\u0071\u007c\u007e\u0021\u007e\u006e\u0070\u0052','\u0068\u0074\u0060\u003a\u0071\u0065\u0073\u0041',nnfEezr(-0x26),ok32bz(nnfEezr(0x3a)),ok32bz(nnfEezr(-0xe)),'\u0077\u0079\u0044\u003d\u006f\u003a\u0051\u0052\u003d\u0030\u007a\u0063\u002f\u0064\u0078\u0033\u007a\u0021\u0053\u0043\u0043\u007c\u0071\u0023\u005a\u002c\u0065\u0072\u0036\u0074\u006b\u0043\u0048\u003e\u0057',ok32bz(0x6),ok32bz(0x7),'2o,c.q|~!~npR',ok32bz(nnfEezr(-0x13)),ok32bz(0x9),'\x68\x74\x60\x3a\x71\x65\x73\x41','\x49\x79\x33\x50\x77\x4a\x3b','\x33\x74\x4d\x3a\x75\x71\x33\x36\x49\x78\x34','\x7c\x6e\x4a\x25\x74\x37\x5f\x24\x24\x30',ok32bz(nnfEezr(-0x18)),'\u0040\u0056\u007c\u0053\u006b\u0045\u0028\u0041','\u004f\u0074\u007e\u002e\u003c\u0040\u003b','\u005e\u0074\u006f\u003a\u002a\u004d\u006a\u0033\u004c',ok32bz(nnfEezr(0x2c)),'\u002a\u0073\u0068\u003d\u0032\u0037\u005f\u0024\u0024\u0030','wy/.qe}Nn6hTzB',ok32bz(0xc),ok32bz(0xd),'\u004c\u0042\u0036\u0059\u0050\u0071\u006a\u0041',ok32bz(nnfEezr(-0x14)),'\x6c\x76\x7c\x2e\x54\x3a\x6c\x7e\x21\x7e\x4d\x47\x67\x44\x4e\x79','\u005a\u006f\u0032\u0063\u0073','\u0038\u0057\u004d\u003a\u0069\u0047\u003b','\x7c\x35\x6e\x50\x5d\x58\x76\x41',ok32bz(0xf),ok32bz(0x10),'\x40\x79\x24\x53\x6c\x45\x2a\x33\x4c',ok32bz(nnfEezr(-0x7)),'\u005b\u0035\u003c\u0050\u0054\u003a\u003b',nnfEezr(-0x2b),'\u007c\u0035\u0053\u0059','\u005a\u0065\u0029\u0028\u007c\u0023\u0033\u0050\u004d\u0071\u004b\u0072\u0025\u004f\u0036\u0058\u004f\u006c\u0064\u007b\u0074\u0023\u0044\u0039\u0051\u005e\u007c\u0051\u003e\u007e\u0039\u0031\u0048\u004f\u005e\u0032\u0056\u0047\u007e\u0042\u0038\u004e\u0055\u0030\u0041',ok32bz(nnfEezr(-0x27)),nnfEezr(-0x2a),ok32bz(0x13),'\x5b\x42\x5e\x59\x3e','\u004c\u0042\u0036\u0059\u0050\u0071\u006a\u0041',ok32bz(0x14),'\u0076\u0059\u0051\u002e\u005f\u0029\u0060\u0041','\u0033\u006f\u007e\u002e\u0034\u003a\u004f\u0041',ok32bz(0x15),'\x7c\x35\x53\x59','\u0076\u0059\u0051\u002e\u005f\u0029\u0046\u005e\u0031\u004f\u002a\u0062\u007a\u0042','\u002a\u0056\u0070\u0025\u0065\u0065\u0022\u0070\u0075\u0036\u0034','3?E%Hwb>>J','\x7c\x35\x53\x59','\x48\x35\x5f\x6e\x58\x65\x2a\x41','H5_nXeD2W',ok32bz(nnfEezr(-0x24)),'\u005d\u0035\u006b\u0050\u0048\u004d\u007b\u0041',ok32bz(0x17),'C5~._','\u0029\u0057\u0066\u005d\u0048\u004d\u0054\u0041',ok32bz(0x18),'\u0075\u0074\u0077\u0063',ok32bz(0x19),'\x5d\x35\x2f\x53',ok32bz(nnfEezr(-0x5)),'\u006a\u0073\u0036\u0059\u006a\u0031\u007c\u0032\u0077\u0062\u0059\u006d\u005e\u0029\u0032',ok32bz(nnfEezr(-0x8)),ok32bz(0x1c),'284S1MuC|',ok32bz(0x1d),ok32bz(nnfEezr(-0x9)),ok32bz(0x1f),'\u005d\u006c\u005
// 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