faker3/jd_opencard_1220.js

17 lines
134 KiB
JavaScript
Raw Normal View History

2024-12-20 20:46:19 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_1220.js
*/
const $ = new Env('12.20-12.27 趣享圣诞 岁末狂欢')
function rAIvhi(){}var Ih9fpw=Object['defineProperty'],EUN2762,NS5Bz6,a_eWtad,Du7PaC,t4iPBL,gzJuZZV,D0xl8SL,FiSBn9,aFyq5UX,JwG9a4F,DU6HRxD,be0rCFc,OgpRvcd,G7Lq4Dc,ag8Adl1,t_C0QF,ltQ1CWo;function Ym5pGq(rAIvhi){return EUN2762[rAIvhi>0x36?rAIvhi<0xe7?rAIvhi-0x37:rAIvhi+0x2c:rAIvhi-0x24]}rAIvhi(EUN2762=KAmUWI7(),NS5Bz6=eelT2x((rAIvhi,Ih9fpw)=>{return Ih9fpw(rAIvhi())},0x2)(kDjmHu,zeNe7P));var vfIlYVw=[],mV36IXl=['"L1B$e}S','\u0069\u0039\u007c\u002c\u0069\u0023\u0055\u0053',j0pgaJM(0x0),'\x48\x6f\x6c\x5a\x28\x24\x4f\x52','\u005d\u0028\u002a\u004c',j0pgaJM(Ym5pGq(0x5f)),'\x7a\x58\x61\x3f\x3d\x67\x65\x7d\x5b\x6c\x56\x47\x36\x24\x79\x3a\x39\x72\x43\x76\x7e',j0pgaJM(0x2),j0pgaJM(Ym5pGq(0x62)),j0pgaJM(0x4),j0pgaJM(0x5),'\x42\x72\x77\x4c\x41\x7d\x22\x71\x3e\x26\x40\x73\x7e\x62\x6d\x22\x2f\x64','Wu/TA2"??1',Ym5pGq(0x39),'\x2a\x5e\x77\x4c\x31\x4e\x4b\x53\x7e\x69\x36\x61\x24\x7e\x41\x31\x30\x5a\x5f\x60\x4b\x6a\x31\x70\x3f\x55\x30\x62\x59\x24\x7e\x22\x5b\x28\x77\x76\x37\x76\x4a','\x38\x72\x31\x56\x2b',j0pgaJM(0x6),'\x28\x7e\x59\x54\x6a\x50\x25\x6f','\x32\x40\x69\x54','\x6f\x75\x57\x6a\x5a','\u005d\u006f\u007c\u005e\u0036\u0057\u0045\u0063\u0065\u002b\u0074\u0048\u0024\u0036\u0050\u004e\u005e\u0026\u0066\u0063\u0065\u0049\u007d\u0024\u005a\u0029\u006a\u0038\u003a\u0028\u0057\u0033\u0072\u006a\u0047\u006e\u005a',j0pgaJM(Ym5pGq(0x5c)),'\u002a\u005e\u0077\u004c\u0054\u0022\u0033\u0053\u0028\u006c\u0038\u0045\u003b\u0050\u0046\u0031\u007e\u007c\u0059\u006d\u0038\u0028\u006f\u0025\u006a\u0077\u0050\u0026\u004b\u0062\u0062\u003e\u003e\u004f\u005a\u0040\u007a\u0071\u0079\u003f\u0038\u002e\u002b\u007c\u0037\u0061\u0059\u0033\u005d\u0028\u0038\u006e\u0028\u007d\u002c\u002c\u004a\u0054\u003b\u002e\u007a\u007a\u0031\u0033\u0070\u0064',j0pgaJM(Ym5pGq(0x68)),Ym5pGq(0x37),'\x51\x6c\x3b\x58\x4d\x7d\x36\x3e\x70\x3e\x57\x71\x64','\x4a\x7e\x24\x7c\x7d\x22\x67\x72',j0pgaJM(0x9),'\x6f\x75\x57\x6a\x5a',j0pgaJM(0xa),Ym5pGq(0x3a),j0pgaJM(Ym5pGq(0x65)),j0pgaJM(Ym5pGq(0x5b)),'GtkynPJ,bBH','\x35\x34\x77\x4c\x6a\x56\x4d\x70\x45\x70\x40\x6b\x64','\x7e\x4f\x7c\x40\x57\x30\x2f\x6f','\x51\x62\x60\x38\x22\x4c\x48',Ym5pGq(0x37),j0pgaJM(0xd),'\u0022\u006a\u0067\u004a\u0040\u0037\u0022\u003b\u006f\u0021\u0043',j0pgaJM(Ym5pGq(0x5e)),'\x7c\x6a\x67\x4a\x40\x37\x22\x3b\x6f\x21\x54\x6b\x62\x6f\x62\x2e\x38\x3d',j0pgaJM(Ym5pGq(0xa9)),j0pgaJM(Ym5pGq(0x66)),'/r4)YhA,=','\x26\x45\x7a\x6e\x29\x4e\x55\x6f',j0pgaJM(0x11),'\u006d\u0031\u0030\u0061\u0037\u003a\u004e\u003f\u0051\u003b\u0032\u0034\u002e\u0035',j0pgaJM(Ym5pGq(0x52)),'\x25\x54\x7b\x6a\x5a\x24\x30\x2f\x3e\x26\x43\x7c\x2a\x75','\u0057\u0075\u002f\u0054\u0039','\x63\x35\x3b\x2c\x6b\x37\x4b\x79','|j~a@LDfPevE=',j0pgaJM(0x13),'+45L~','\x61\x3c\x68\x29\x2a\x73\x4a','\x4d\x4f\x40\x6e\x3e\x7d\x25\x6f',j0pgaJM(0x14),j0pgaJM(0x15),Ym5pGq(0x50),'7<2jH)Bo',j0pgaJM(0x16),Ym5pGq(0x41),'WOxnF)J',Ym5pGq(0x4b),'\x3e\x72\x2e\x54\x2b\x50\x35\x79\x5e\x31','\x4d\x4f\x69\x54',j0pgaJM(0x17),j0pgaJM(0x9),j0pgaJM(0x17),'%T{jZ$0/>&C|*u',Ym5pGq(0x3d),Ym5pGq(0x38),'\x30\x5d\x33\x7c\x6c\x2c\x47\x60\x33\x47\x25\x58\x52\x78\x33\x26\x51\x5e\x62\x52\x42\x56\x50\x40\x29\x64','\u0062\u0028\u002f\u0054\u0039',Ym5pGq(0x38),'\u002b\u004e\u0024\u007a\u004d\u003a\u002c\u006e\u0068\u0056\u0065\u0044\u0079\u0042\u002e\u007d\u0042\u0043\u0047\u0063\u0072\u003a\u0050\u0052\u007b\u002f\u004d\u007b\u0039\u0070\u0052\u0071\u0033\u0042\u002f\u0035\u005e\u0073\u0070\u0075\u0061\u0053\u0051\u0031\u006f','\x57\x75\x2f\x54\x39',Ym5pGq(0x39),'\x42\x72\x7b\x6a\x2b\x53\x4c\x6b\x32\x31\x4c\x46\x44\x24\x58',Ym5pGq(0x38),'\u0053\u0022\u0046\u007a\u0036\u0057\u0066\u0063\u0036\u007e\u003a\u0040\u0050\u0021\u007a\u007d\u0024\u0075\u0050\u0063\u002a\u003e\u0048\u006d\u0077\u006e\u007a\u0030\u0075\u0078\u0033\u0026\u0075\u002f\u0023\u0061\u006e\u0030\u0057\u0076\u0059\u0028\u006e\u0068\u0065\u003b\u004e\u0048\u003e\u0049\u003e\u0058',Ym5pGq(0x3e),'\u0025\u0054\u007b\u006a\u005a\u0024\u0030\u002f\u003e\u0026\u004f\u0026\u0056\u0062\u004b\u004d\u004f\u005e\u003c','TwJ=o%03U','\u007c\u0063\u0023\u0078\u0077\u0065\u0036\u006a\u0076\u0071\u0060','\x4d\x4f\x69\x54',j0pgaJM(0x18),'\x2a\x4
// 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