mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
12 lines
89 KiB
JavaScript
12 lines
89 KiB
JavaScript
|
/*
|
||
|
京东延保抽奖
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
|
||
|
*/
|
||
|
const $ = new Env('京东延保抽奖')
|
||
|
function qZWY37(){}var gHR4nq=Object['defineProperty'],TSw9Gu,VU7rBI,aT5FXv,KRAUYHI,lBP29tP,rSne1X,rh_LD_,qztSL2e,vo5BFJ,JMuFS8j,w5mKBJ5,qmo7Ax,jfnGaBB,kOdXirO,B7zpcA,_ZZ_nv;function rR7Xg_J(qZWY37){return TSw9Gu[qZWY37<0xc5?qZWY37>0xc5?qZWY37+0x19:qZWY37>0xc5?qZWY37+0x4c:qZWY37-0x3:qZWY37-0x39]}TSw9Gu=UtmTbZ();function c0gxpfc(qZWY37,gHR4nq){var aT5FXv=uUkFw1(qZWY37=>{return TSw9Gu[qZWY37>0xdf?qZWY37+0x37:qZWY37<0x1c?qZWY37+0x49:qZWY37-0x1d]},0x1);return VU7rBI.call(null,qZWY37,aT5FXv(0x1d),{value:gHR4nq,configurable:aT5FXv(0x76)})}qZWY37(VU7rBI=Object.defineProperty,aT5FXv=c0gxpfc(uUkFw1((...gHR4nq)=>{var VU7rBI=uUkFw1(gHR4nq=>{return TSw9Gu[gHR4nq>-0x49?gHR4nq+0x48:gHR4nq+0x40]},0x1);qZWY37(gHR4nq[VU7rBI(-0x48)]=VU7rBI(-0x47),gHR4nq[0xf4]=-0x41);return gHR4nq[VU7rBI(-0x3d)]>0x36?gHR4nq[-0x77]:gHR4nq[VU7rBI(-0x38)](gHR4nq[VU7rBI(-0x3c)]())}),rR7Xg_J(0x4))(T5M75u,pAB0Nx));var DsBOv_=[],R9w0pRD=[iiXDz_p(0x0),iiXDz_p(0x1),iiXDz_p(rR7Xg_J(0x4)),iiXDz_p(0x3),iiXDz_p(rR7Xg_J(0x10)),iiXDz_p(0x5),iiXDz_p(0x6),iiXDz_p(rR7Xg_J(0x1c)),iiXDz_p(0x8),iiXDz_p(0x9),iiXDz_p(0xa),'kD1_Ep.;{n`F8E!%_?v;{Q:8G|V2+0pUqV#OG',iiXDz_p(0xb),iiXDz_p(0xc),iiXDz_p(rR7Xg_J(0x2c)),iiXDz_p(rR7Xg_J(0x5)),'`qh|u%iD',iiXDz_p(rR7Xg_J(0x25)),'\x62\x71\x6a\x7c\x32\x75\x62\x5a\x58\x76\x46',iiXDz_p(rR7Xg_J(0x37)),'\u0043\u0071\u006a\u007c\u0032\u0075\u0062\u005a\u0058\u0076\u006b\u004f\u0069\u0058\u0069\u0077\u0073\u004b',iiXDz_p(0x10),iiXDz_p(rR7Xg_J(0x3b)),iiXDz_p(rR7Xg_J(0x1d)),'NqY|HjIbg','\x3f\x2e\x4c\x4f\x7c\x25\x68\x44',iiXDz_p(0x13),iiXDz_p(rR7Xg_J(0x8)),iiXDz_p(0x15),iiXDz_p(rR7Xg_J(0x68)),'bYMVF|CD',iiXDz_p(0x17),iiXDz_p(rR7Xg_J(0x50)),iiXDz_p(0x19),'T7@VW|TM.Mj^"!<0',iiXDz_p(rR7Xg_J(0x3d)),'\x33\x78\x6a\x7c\x7a\x5e\x6f',iiXDz_p(0x1b),iiXDz_p(rR7Xg_J(0xc1)),iiXDz_p(0x1d),iiXDz_p(rR7Xg_J(0x38)),iiXDz_p(0x1f),iiXDz_p(0x14),iiXDz_p(0x20),iiXDz_p(0x21),iiXDz_p(rR7Xg_J(0x47)),iiXDz_p(0x23),iiXDz_p(0x24),rR7Xg_J(0xd),iiXDz_p(0xe),rR7Xg_J(0x9),rR7Xg_J(0x6),iiXDz_p(0x25),iiXDz_p(rR7Xg_J(0x45)),iiXDz_p(0x14),iiXDz_p(rR7Xg_J(0x5)),iiXDz_p(0x27),rR7Xg_J(0x6),'tPY|$f}NTZF','tPY|$fnD',iiXDz_p(rR7Xg_J(0x48)),iiXDz_p(0x29),'tPY|$fYD6a','tPY|$fYD','tPY|YW&br14&`irL','tPY|YW0D',iiXDz_p(rR7Xg_J(0x21)),'\u0058\u0043\u005e\u003a\u0055\u0062\u007c\u0049',iiXDz_p(0x2b),iiXDz_p(rR7Xg_J(0x2f)),iiXDz_p(0x2d),iiXDz_p(rR7Xg_J(0x20)),'\x74\x50\x59\x7c\x39\x58\x54\x25\x58\x76\x25\x63\x3b\x58\x72','tPY|YW)({hrWpFY@','g|wXf*aaRL',iiXDz_p(rR7Xg_J(0x4b)),iiXDz_p(0x30),iiXDz_p(rR7Xg_J(0x61)),iiXDz_p(0x32),iiXDz_p(rR7Xg_J(0x7)),iiXDz_p(rR7Xg_J(0x4c)),iiXDz_p(0x34),iiXDz_p(rR7Xg_J(0x4e)),iiXDz_p(0x36),iiXDz_p(rR7Xg_J(0x4f)),iiXDz_p(0x38),iiXDz_p(rR7Xg_J(0x29)),iiXDz_p(0x3a),iiXDz_p(rR7Xg_J(0x56)),iiXDz_p(0x3c),iiXDz_p(rR7Xg_J(0x57)),iiXDz_p(0x3e),iiXDz_p(0x32),iiXDz_p(rR7Xg_J(0x7)),'81E}^j_+E?YpQ7Sx&6V0,if~DS"La7Ko0Nht?2>v6|BcObX',iiXDz_p(0x3f),iiXDz_p(0x30),'\x74\x50\x59\x7c\x59\x57\x69\x44',iiXDz_p(0x40),iiXDz_p(rR7Xg_J(0x58)),iiXDz_p(0x32),iiXDz_p(0x33),'g|wXf*HI',iiXDz_p(0x41),iiXDz_p(0x30),iiXDz_p(0x42),'tPY|_.FD',iiXDz_p(rR7Xg_J(0x59)),iiXDz_p(0x39),'|RQFN=T=?_D$>',iiXDz_p(0x44),'\x74\x50\x59\x7c\x5f\x2e\x79\x4d\x36\x61\x23\x5e\x4b','T7Rs`u|K','cK|m',iiXDz_p(0x32),iiXDz_p(rR7Xg_J(0x7)),iiXDz_p(0x45),iiXDz_p(0x14),'#R7zBsJOe[c.?[h~[@S5XTwms*~Rq^qSerx~X!,tt(9(u"6)kur@/V|IgN3?FME',iiXDz_p(rR7Xg_J(0x54)),iiXDz_p(0x17),iiXDz_p(rR7Xg_J(0x42)),iiXDz_p(rR7Xg_J(0x8)),iiXDz_p(0x48),iiXDz_p(0x14),iiXDz_p(rR7Xg_J(0x5a)),rR7Xg_J(0x9),iiXDz_p(rR7Xg_J(0xa)),iiXDz_p(0x22),iiXDz_p(rR7Xg_J(0x15)),iiXDz_p(0x4c),iiXDz_p(0x14),iiXDz_p(rR7Xg_J(0xb)),'bYMVF|CD',iiXDz_p(0x14),iiXDz_p(0x14),iiXDz_p(0x9),iiXDz_p(0x24),iiXDz_p(rR7Xg_J(0xa)),'=.G>$!|K',iiXDz_p(rR7Xg_J(0x5d)),iiXDz_p(0x23),iiXDz_p(0x1a),iiXDz_p(0x4e),'WzyV)|FD',iiXDz_p(0x4f),iiXDz_p(0x50),'(!s;t|uk',iiXDz_p(rR7Xg_J(0x60)),iiXDz_p(rR7Xg_J(0xb5)),iiXDz_p(rR7Xg_J(0x8)),iiXDz_p(0x9),iiXDz_p(0x14),iiXDz_p(rR7Xg_J(0xb)),iiXDz_p(0x53),iiXDz_p(0x54),iiXDz_p(rR7Xg_J(0xbc)),'|QD@QS[Y',iiXDz_p(0x56),iiXDz_p(0x57),iiXDz_p(0x27),iiXDz_p(rR7Xg_J(0xa)),iiXDz_p(0x14),iiXDz_p(0x58),iiXDz_p(rR7Xg_J(0x8)),iiXDz_p(0x58),iiXDz_p(0x59),iiXDz_p(rR7Xg_J(0x62)),ii
|
||
|
|
||
|
// 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
|