jdpro/jd_hx_draw.js

7 lines
100 KiB
JavaScript
Raw Permalink Normal View History

2024-10-02 12:37:22 +00:00
/*
5 5 * * * jd_hx_draw.js
*/
const $ = new Env('惠寻抽奖');
2024-11-16 12:13:00 +00:00
function o3GICh(){}var FrCqlo=Object['defineProperty'],lhD2Ge,Z6LK782,zz9i18B,C5lMhiU,EG5gGx,c8g9c6Z,io67jei,HovJEm,wzL9VIh,vmJ2K8,q2qPKD,skURxW,eQNht8,QPPO5yf,yaFmGe,kmViIQE,Wj29_ga,VXu0uF,_xJVC6;function AFun06(o3GICh){return lhD2Ge[o3GICh>-0xd?o3GICh<-0xd?o3GICh+0x52:o3GICh<0xf8?o3GICh+0xc:o3GICh+0x6:o3GICh+0x17]}lhD2Ge=JwROXe();function DgbPkw(o3GICh,FrCqlo){Z6LK782(o3GICh,'length',{value:FrCqlo,configurable:!0x0});return o3GICh}o3GICh(Z6LK782=Object.defineProperty,zz9i18B=EnH3OV((o3GICh,FrCqlo)=>{return FrCqlo(o3GICh())},0x2)(RwQbux,RtFovq1));var _HxkcOW=[],DWcWdrx=[vJFOcZ(AFun06(0x1c)),vJFOcZ(0x1),vJFOcZ(0x2),vJFOcZ(0x3),'6|)AhuQ,',vJFOcZ(AFun06(0x16)),vJFOcZ(AFun06(0x1d)),vJFOcZ(0x6),vJFOcZ(AFun06(0x2b)),vJFOcZ(AFun06(0x30)),vJFOcZ(0x9),vJFOcZ(AFun06(0x65)),vJFOcZ(0xb),vJFOcZ(0xc),vJFOcZ(AFun06(0x33)),vJFOcZ(AFun06(0x2f)),vJFOcZ(AFun06(-0xc)),vJFOcZ(0x10),vJFOcZ(0x11),vJFOcZ(AFun06(-0xb)),vJFOcZ(0x13),vJFOcZ(0x14),vJFOcZ(AFun06(-0x9)),vJFOcZ(AFun06(-0xc)),vJFOcZ(AFun06(-0xb)),vJFOcZ(AFun06(-0xa)),vJFOcZ(0x15),vJFOcZ(AFun06(-0xa)),vJFOcZ(AFun06(-0x9)),vJFOcZ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0)),vJFOcZ(0x83),vJFOcZ(0x84),vJFOcZ(0x85),vJFOcZ(0x61),vJFOcZ(0x86),vJFOcZ(0x87),vJFOcZ(AFun06(0x6b)),vJFOcZ(0x89),vJFOcZ(0x8a),vJFOcZ(AFun06(0x6)),vJFOcZ(AFun06(0x1a)),AFun06(-0x4),vJFOcZ(0x8b),vJFOcZ(0x8c),vJFOcZ(AFun06(0xae)),vJFOcZ(0x6d),'7uKG*gh||X',vJFOcZ(0x8e),vJFOcZ(AFun06(0x6d)),vJFOcZ(0x90),vJFOcZ(AFun06(0xb)),vJFOcZ(AFun06(0x8)),vJFOcZ(0x1e),vJFOcZ(0x73),vJFOcZ(AFun06(-0x3)),vJFOcZ(AFun06(0x99)),vJFOcZ(0x55),vJFOcZ(AFun06(0x4f)),vJFOcZ(AFun06(0x3)),vJFOcZ(0x93),vJFOcZ(0x94),vJFOcZ(0x2e),vJFOcZ(0x82),vJFOcZ(0x95),vJFOcZ(0x96),vJFOcZ(AFun06(0x5)),vJFOcZ(AFun06(0x1)),vJFOcZ(0x98),vJFOcZ(0x99),vJFOcZ(0x9a),vJFOcZ(AFun06(0x72)),'5Y0^X8iJD?:P5I7#@RxG(vG|;',vJFOcZ(AFun06(0x12)),vJFOcZ(AFun06(0x13)),'7uKG=3y!|X(Q_',vJFOcZ(AFun06(-0x2)),vJFOcZ(0x15),vJFOcZ(AFun06(-0x1)),vJFOcZ
2024-10-02 12:37:22 +00:00
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