faker3/jd_opencard_0214.js

16 lines
126 KiB
JavaScript
Raw Normal View History

2025-02-15 15:13:26 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "59 23 29 2 *" script-path=jd_opencard_0214.js
*/
const $ = new Env('2.21 大牌狂欢 共享浪漫')
function CDCdH1g(){}var ZJ45jZ=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],uFjshc,JiRGED,l2NvYKN,wnjUw3,WudnB6,rysFh1,qicHOjQ,xMknZQ,Q9NQMy,iFFgyU,IGdJPmA,sWGgGXV,R4b6mar,j7qo2wI,CQJ2eC,jPZ7ahS,K76Ihgj;function gwb6qg(CDCdH1g){return uFjshc[CDCdH1g<-0x1a?CDCdH1g+0x4f:CDCdH1g<-0x1a?CDCdH1g-0x1d:CDCdH1g<0x85?CDCdH1g+0x19:CDCdH1g+0xc]}CDCdH1g(uFjshc=g_GjAXr(),JiRGED=qbEee9M((CDCdH1g,ZJ45jZ)=>{return ZJ45jZ(CDCdH1g())},0x2)(I1hg0v,R9AoOOx));var HguYXi6=[],SmWRQeN=[ZqJG_b(0x0),ZqJG_b(0x1),'\x26\x5d\x39\x43\x64\x55\x4b\x3b','\u0022\u003b\u005a\u0038\u0028\u006f\u0076\u0057','\u0059\u007e\u004d\u006e','\u0062\u0064\u005d\u003b\u0055\u003a\u0039\u0032\u0040\u0034\u007d\u0037\u003f\u0076\u0068\u0031\u0055\u0056\u0059\u006e','\u0062\u0064\u005d\u003b\u0055\u003a\u0039\u0032\u0040\u0034\u007d\u0037\u003f\u0076\u0042\u0035\u0074\u0048\u004c\u0021\u0068',ZqJG_b(gwb6qg(0x6c)),ZqJG_b(0x3),ZqJG_b(0x4),'\u0023\u007a\u0021\u0042\u006c\u0035\u0030\u0072\u0064\u0071\u0049\u005b\u004a\u0068\u004c\u004d\u004d\u0048\u004a',ZqJG_b(0x5),ZqJG_b(gwb6qg(-0x19)),ZqJG_b(gwb6qg(-0x19)),'\u004d\u006f\u0052\u006e\u0071\u0026\u0046\u0024\u0068\u0065\u003f\u005d\u0076\u0068\u0070\u0071\u007a\u005f\u0029\u0053\u0046\u0061\u0071\u002a\u003b\u004e\u007a\u0066\u002f\u0076\u0068\u0051\u0040\u007e\u0052\u0021\u003e\u0021\u0036','\x5e\x48\x71\x7d\x38',ZqJG_b(gwb6qg(0xc)),'\x7e\x68\x2f\x4f\x61\x63\x57\x50',ZqJG_b(0x8),ZqJG_b(0x9),'PVTa_',ZqJG_b(gwb6qg(0x1b)),'\x6f\x7c\x28\x4f\x74',ZqJG_b(0xb),ZqJG_b(gwb6qg(-0x18)),gwb6qg(-0x17),ZqJG_b(gwb6qg(-0x18)),gwb6qg(-0x17),ZqJG_b(0xd),ZqJG_b(0xe),'\x54\x56\x28\x4f\x70\x4b\x51\x3b\x3b\x71',ZqJG_b(gwb6qg(0xd)),ZqJG_b(gwb6qg(0x78)),'\u0057\u004f\u0069\u0061\u005f\u0076\u007a\u0028\u0073\u0041\u006c\u0037\u006d\u0056','\x37\x75\x5b\x42\x79\x63\x36\x23\x66\x72\x78',ZqJG_b(0xc),'\x66\x39\x77\x2e\x65\x32\x49\x41',ZqJG_b(0x11),'\x28\x5b\x29\x30\x38\x47\x66\x41','\x6b\x37\x68\x7d\x4e\x56\x4b','\u0023\u0048\u007c\u003c\u005e\u007d\u0023\u0047\u0066\u0049\u0078',ZqJG_b(0x12),ZqJG_b(0x13),'\x59\x6f\x31\x65\x29\x7a\x62\x50',ZqJG_b(0x14),'\u0029\u0055\u0041\u007c\u0070\u002b\u0066\u0050\u005d','\u0069\u0033\u0064\u007d\u0030\u0047\u0029\u0041','/hu!CS_;;q','\x46\x7e\x4b\x61\x7d\x26\x3a\x24\x22\x47\x75\x25\x51\x56','\x67\x73\x2f\x4d\x5a\x2b\x5d\x76\x44',ZqJG_b(0x15),ZqJG_b(gwb6qg(0x6f)),'\x55\x56\x47\x4f\x79\x7d\x70\x50','\u0072\u0048\u0069\u0061\u005e\u0063\u004d\u002a\u0043\u0034\u0053\u005b\u0058','\u006f\u0024\u007c\u0050\u006d\u0030\u006f\u0051\u0033\u0051\u002a\u003e\u004f\u006c\u0059\u0037',ZqJG_b(gwb6qg(-0x6)),']J|<M,6','\u0031\u006a\u0022\u0079\u0073\u0032\u0057\u0050','\x7e\x68\x2a\x61\x4e\x21\x58\x42\x4c',ZqJG_b(0x18),'\u002a\u0061\u0028\u004f\u0077\u006f\u0079\u0026\u0055',ZqJG_b(0x19),'\x69\x6b\x4c\x21\x49\x25\x2e\x2e\x6d\x2a',ZqJG_b(0x1a),ZqJG_b(0x1b),ZqJG_b(0x1c),'\u004d\u005d\u006e\u0025\u004c\u0030\u0028\u005b\u0058\u0059',ZqJG_b(0x1d),'\x4c\x2b\x7b\x22\x40\x3a\x67\x52\x77\x26\x3b\x37\x5b\x62\x6e\x54\x62\x49\x74\x65\x5d\x3a\x30\x32\x53\x76\x40\x53\x31\x41\x32\x43\x70\x62\x76\x28\x58\x6c\x41\x4a\x34\x3e\x51\x59\x6f',ZqJG_b(gwb6qg(-0x14)),'\u0038\u0026\u0076\u0062\u0031\u0035\u0023\u0079\u007c\u007d\u0039\u002b\u0042\u0072\u0047\u0032\u0072\u004c\u0037\u0033\u0048\u0035\u0063\u006c\u0069\u0028\u0031\u0069\u0074\u002a\u006c\u003d\u0045\u0072\u0028\u0043\u006f\u002c\u002a\u0056\u005d\u0024\u006d\u0071\u0050',gwb6qg(-0x4),'\x44\x7b\x5e\x53\x43\x21\x3d\x51\x55','@Ba%',ZqJG_b(gwb6qg(0x12)),ZqJG_b(0x1f),'\u0031\u006a\u0065\u004f','\u004c\u002b\u007b\u0022\u0040\u003a\u0067\u0052\u0077\u0026\u003b\u0037\u005b\u0062\u006e\u0054\u0062\u0049\u0074\u0065\u005d\u003a\u0030\u0032\u0053\u0076\u0040\u0053\u0031\u0041\u0032\u0043\u0070\u0062\u0076\u0028\u0058\u006c\u0041\u004a\u0034\u003e\u0051\u0059\u006f','\x54\x56\x28\x4f\x74',ZqJG_b(0x20),gwb6qg(-0x11),'\u0031\u006a\u0065\u004f','\x24\x51\x25\x62\x3f\x54\x49\x33\x3f\x68\x35\x22\x63\x60\x62\x32\x76\x56\x63\x33\x4d\x73\x78\x44\x52\x79\x62\x7a\x56\x2e\x45\x41\x56\x28\x77\x5d\x79\x7a\x54\x21\x2f\x7e\x79\x7c\x39\x30\x26\x78\x73\x67\x73\x64','\u0057\u004f\u005e\u0079
// 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