faker3/jd_ms_draw.js

12 lines
77 KiB
JavaScript
Raw Permalink Normal View History

2024-11-12 11:17:55 +08:00
/*
秒送抽奖
cron:1 1 1 1 *
*/
const $ = new Env('秒送抽奖')
function UkexdQ9(){}var eorbkb7=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],JZRo3eR,kDBdZS,zJ8PeQ,do3ydDo,QxnGVB,ppwvBGw,dau5pP,yK_uXn1,ZIfza8,uk6bHzg,nHnHhzt,QJZpJxZ,w4DII5,I3Rv89,FQruIIw,_ysKOi;function Ur72xEI(UkexdQ9){return JZRo3eR[UkexdQ9<-0x57?UkexdQ9+0x5d:UkexdQ9>-0x57?UkexdQ9+0x56:UkexdQ9+0x57]}JZRo3eR=j9pQUq();function NECasrw(UkexdQ9,eorbkb7){return kDBdZS(UkexdQ9,'\u006c\u0065\u006e\u0067\u0074\u0068',{value:eorbkb7,configurable:Ur72xEI(0x3f)})}UkexdQ9(kDBdZS=Object.defineProperty,zJ8PeQ=NECasrw(Mcsv1AZ((...eorbkb7)=>{UkexdQ9(eorbkb7.length=0x2,eorbkb7.AHB7Bsl=-Ur72xEI(-0x48));if(eorbkb7.AHB7Bsl>-Ur72xEI(-0x20)){var kDBdZS=Mcsv1AZ(eorbkb7=>{return JZRo3eR[eorbkb7<0x5?eorbkb7-0x41:eorbkb7>0x5?eorbkb7>0x5?eorbkb7-0x6:eorbkb7+0x56:eorbkb7-0xd]},0x1);return eorbkb7[-kDBdZS(0x12)]}else{var zJ8PeQ=Mcsv1AZ(eorbkb7=>{return JZRo3eR[eorbkb7>-0x19?eorbkb7>-0x19?eorbkb7+0x18:eorbkb7+0x42:eorbkb7-0x61]},0x1);return eorbkb7[zJ8PeQ(-0x18)](eorbkb7[0x0]())}}),Ur72xEI(-0x3e))(FoVq976,YWq8eh));var RAFMKo0=[],upyZqs=[YCzAKu(Ur72xEI(-0x40)),YCzAKu(Ur72xEI(-0x56)),'b+6|lt.V',YCzAKu(0x2),YCzAKu(Ur72xEI(-0x41)),YCzAKu(Ur72xEI(-0x3d)),YCzAKu(0x5),YCzAKu(Ur72xEI(-0x46)),YCzAKu(Ur72xEI(-0x4f)),YCzAKu(Ur72xEI(-0x2d)),'J`H7j)v?5n_+~jEu7L|?5#]~[Sz,!k)FizNe[',YCzAKu(0x9),YCzAKu(Ur72xEI(-0x53)),YCzAKu(0xb),YCzAKu(Ur72xEI(-0x45)),YCzAKu(0x8),YCzAKu(0xd),YCzAKu(0xe),'pi>S,wp$a|+',YCzAKu(0xf),'Ai>S,wp$a|Jebab(M8',YCzAKu(0x10),YCzAKu(0x11),YCzAKu(0x12),YCzAKu(0x13),YCzAKu(0x14),YCzAKu(Ur72xEI(-0x3a)),YCzAKu(0x16),YCzAKu(0x17),YCzAKu(Ur72xEI(-0x1a)),YCzAKu(0x19),YCzAKu(Ur72xEI(-0x1e)),YCzAKu(0x1b),YCzAKu(Ur72xEI(-0x21)),YCzAKu(0x1d),YCzAKu(0x1e),YCzAKu(0x1f),YCzAKu(0x20),YCzAKu(0x21),YCzAKu(Ur72xEI(-0x43)),YCzAKu(0x23),YCzAKu(0xa),YCzAKu(0x24),YCzAKu(Ur72xEI(-0x52)),YCzAKu(0x26),YCzAKu(0xa),YCzAKu(Ur72xEI(-0x50)),YCzAKu(0x28),'\x72\x66\x4f\x67\x56\x75\x59\x33\x73\x7c\x4e\x7b\x38',YCzAKu(0xd),YCzAKu(0x29),YCzAKu(0x2a),YCzAKu(0x2b),'\x57\x78\x55\x53\x73\x61\x72\x75\x61\x7c\x75\x34\x3f\x61\x5a',YCzAKu(Ur72xEI(-0xf)),YCzAKu(Ur72xEI(-0xe)),YCzAKu(0x2e),YCzAKu(0x2f),YCzAKu(0xa),YCzAKu(Ur72xEI(-0xd)),YCzAKu(Ur72xEI(-0x55)),YCzAKu(Ur72xEI(-0x54)),YCzAKu(0x32),YCzAKu(0x33),YCzAKu(Ur72xEI(-0x55)),YCzAKu(0x31),YCzAKu(Ur72xEI(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YCzAKu(0x59),YCzAKu(Ur72xEI(0x11)),YCzAKu(Ur72xEI(-0x4e)),YCzAKu(Ur72xEI(-0x4d)),YCzAKu(0x5b),YCzAKu(0xa),YCzAKu(Ur72xEI(-0x4c)),YCzAKu(0x5c),YCzAKu(0xa),YCzAKu(Ur72xEI(-0x4b)),YCzAKu(0x5d),YCzAKu(0xa),YCzAKu(0x25),YCzAKu(0x1a),YCzAKu(0x5e),YCzAKu(0x5f),YCzAKu(0x60),YCzAKu(0x61),YCzAKu(0x62),YCzAKu(Ur72xEI(0x12)),YCzAKu(Ur72xEI(0x13)),YCzAKu(0x65),'\x66\x71\x2f\x7a\x5b\x7e\x32\x6f\x2b\x7c\x62\x2e\x79\x78\x5a\x74\x70\x37\x73\x22\x43\x5d\x6d\x60',YCzAKu(Ur72xEI(-0x4a)),YCzAKu(0x67),YCzAKu(0x68),YCzAKu(0x69),YCzAKu(Ur72xEI(0x14)),YCzAKu(0x6b),YCzAKu(0x6c),YCzAKu(Ur72xEI(-0xa)),YCzAKu(0x6e),YCzAKu(0x6f),YCzAKu(Ur72xEI(-0x9)),YCzAKu(Ur72xEI(0x16)),YCzAKu(0x72),YCzAKu(Ur72xEI(-0x49)),YCzAKu(Ur72xEI(-0x1d)),YCzAK
// 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