faker3/jd_ybdraw.js

12 lines
100 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
京东延保抽奖
cron:1 1 1 1 *
*/
const $ = new Env('京东延保抽奖')
2024-11-25 16:57:27 +08:00
function n27oVA(){}var IJTdqOB=Object['defineProperty'],k6zxwf,kHlcADA,apNxPp,bWqDfx2,Q9vxLM,Dtn7As,M2U2I0,eKXC0y,Yp79JEZ,qv6el8C,rfvLxS,gKt0vzV,L7o8YJA,a1rEpWa,Xhxw7C,WkYXtdV,hgVXa_;function NZQJFMt(n27oVA){return k6zxwf[n27oVA>0xed?n27oVA+0x26:n27oVA<0x6?n27oVA-0x43:n27oVA-0x7]}k6zxwf=su8zsj();function _tcA94(n27oVA,IJTdqOB){return kHlcADA(n27oVA,'length',{value:IJTdqOB,configurable:!0x0})}n27oVA(kHlcADA=Object.defineProperty,apNxPp=_tcA94(g2NNiG((...IJTdqOB)=>{var kHlcADA=g2NNiG(IJTdqOB=>{return k6zxwf[IJTdqOB>0xf6?IJTdqOB-0x27:IJTdqOB-0x10]},0x1);n27oVA(IJTdqOB.length=0x2,IJTdqOB.pkW0IG=IJTdqOB[NZQJFMt(0x7)]);return IJTdqOB[kHlcADA(0x20)](IJTdqOB.pkW0IG())}),NZQJFMt(0x24))(yE7Tppf,gv9_k4w));var wYmvazU=[],rRUNJw=[oUlG3Ws(NZQJFMt(0x7)),oUlG3Ws(0x1),oUlG3Ws(0x2),oUlG3Ws(NZQJFMt(0x1d)),oUlG3Ws(NZQJFMt(0x22)),oUlG3Ws(NZQJFMt(0x39)),oUlG3Ws(NZQJFMt(0x1a)),oUlG3Ws(0x7),'\x3d\x68\x63\x7c\x43\x29\x2a\x44',oUlG3Ws(NZQJFMt(0x26)),oUlG3Ws(NZQJFMt(0x64)),oUlG3Ws(NZQJFMt(0x65)),oUlG3Ws(0xb),oUlG3Ws(0xc),oUlG3Ws(NZQJFMt(0x25)),oUlG3Ws(0xe),oUlG3Ws(0xf),oUlG3Ws(0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x72\x2e\x56\x47\x45\x30\x5f\x54\x3c\x67\x4e\x72\x7c\x4a\x62\x3d\x2a\x79\x30\x6b\x58\x48\x43\x44\x4c\x77\x47\x28\x66\x78\x59\x31\x46',oUlG3Ws(NZQJFMt(0xe)),oUlG3Ws(NZQJFMt(0x7e)),oUlG3Ws(0x6d),oUlG3Ws(NZQJFMt(0x37)),oUlG3Ws(NZQJFMt(0x8c)),oUlG3Ws(0x70),NZQJFMt(0x13),oUlG3Ws(NZQJFMt(0xb)),oUlG3Ws(0x71),oUlG3Ws(0x33),oUlG3Ws(NZQJFMt(0xe)),oUlG3Ws(0x72),oUlG3Ws(0x20),oUlG3Ws(0x73),oUlG3Ws(NZQJFMt(0x83)),oUlG3Ws(NZQJFMt(0x72)),oUlG3Ws(NZQJFMt(0x10)),oUlG3Ws(NZQJFMt(0x67)),oUlG3Ws(0x30),oUlG3Ws(NZQJFMt(0x7c)),oUlG3Ws(NZQJFMt(0x88)),oUlG3Ws(NZQJFMt(0x3c)),oUlG3Ws(NZQJFMt(0xf)),oUlG3Ws(0x20),oUlG3Ws(NZQJFMt(0x11)),oUlG3Ws(0x23),oUlG3Ws(0x20),oUlG3Ws(0x20),oUlG3Ws(0x79),NZQJFMt(0x15),oUlG3Ws(0x33),oUlG3Ws(NZQJFMt(0x10)),oUlG3Ws(0x7a),oUlG3Ws(0x31),oUlG3Ws(NZQJFMt(0x89)),oUlG3Ws(0x7c),oUlG3Ws(NZQJFMt(0x9a)),oUlG3Ws(NZQJFMt(0xa9)),oUlG3Ws(0x7f),oUlG3Ws(0x20),oUlG3Ws(N
2024-11-12 11:17:55 +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