jdpro/jd_phonedraw.js

7 lines
103 KiB
JavaScript
Raw Normal View History

2024-09-30 12:28:14 +00:00
/*
7 7 * * * jd_phonedraw.js
*/
const $ = new Env('手机数码抽奖');
2024-09-30 19:21:47 +00:00
function xLefsM(){}var qDTu7Cn=Object['defineProperty'],PuBURp,wQbbXg,uX1gDQ2,q25avhs,XH6P5t,qGcP4O,iLbiGm,QdhBq6,uqS4yov,MVTXGuB,cedY_DU,Qwz1Zk,FRYX9s,N3V4NKa,ugykO2N,Uy4G7p,hHlTvC_,J0AMah,ZzFMsro;function _QSl1n8(xLefsM){return PuBURp[xLefsM>0xdb?xLefsM+0x15:xLefsM+0x42]}PuBURp=PIq7dN();function zei4ISC(xLefsM,qDTu7Cn){return wQbbXg(xLefsM,'length',{value:qDTu7Cn,configurable:!0x0})}xLefsM(wQbbXg=Object.defineProperty,uX1gDQ2=w2_K9mL((xLefsM,qDTu7Cn)=>{return qDTu7Cn(xLefsM())},0x2)(oKEwB0,ct1Zj9n));var yrvAYtA=[],YqVGUa=[UbbLNrc(0x0),UbbLNrc(0x1),UbbLNrc(0x2),UbbLNrc(_QSl1n8(-0x1d)),UbbLNrc(_QSl1n8(-0x19)),UbbLNrc(_QSl1n8(-0x1a)),UbbLNrc(0x6),UbbLNrc(_QSl1n8(-0x1f)),UbbLNrc(_QSl1n8(-0x42)),UbbLNrc(_QSl1n8(0x6)),UbbLNrc(_QSl1n8(0x1c)),UbbLNrc(0xb),UbbLNrc(0xc),UbbLNrc(_QSl1n8(-0x12)),UbbLNrc(_QSl1n8(-0x11)),UbbLNrc(0xf),UbbLNrc(0x10),UbbLNrc(0x11),UbbLNrc(_QSl1n8(-0x1e)),UbbLNrc(0x13),UbbLNrc(0x14),UbbLNrc(0x15),'kj0+uS}|3u','kj0+uS}|3u7',UbbLNrc(0x16),UbbLNrc(_QSl1n8(0x76)),UbbLNrc(0x18),UbbLNrc(0x19),UbbLNrc(_QSl1n8(-0x2)),UbbLNrc(0x1b),UbbLNrc(0x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lh%FPa_',UbbLNrc(0x56),_QSl1n8(-0x2e),UbbLNrc(_QSl1n8(-0x2d)),UbbLNrc(0x6d),UbbLNrc(_QSl1n8(-0x38)),UbbLNrc(_QSl1n8(0x2e)),UbbLNrc(0x6f),UbbLNrc(0x70),UbbLNrc(0x71),UbbLNrc(_QSl1n8(0x2f)),'|sob',UbbLNrc(_QSl1n8(-0x34)),UbbLNrc(_QSl1n8(-0x33)),UbbLNrc(0x74),UbbLNrc(_QSl1n8(0xbf)),UbbLNrc(0x75),'|sob',UbbLNrc(0x76),UbbLNrc(_QSl1n8(-0x31)),UbbLNrc(0x78),UbbLNrc(_QSl1n8(-0x37)),UbbLNrc(0x79),UbbLNrc(_QSl1n8(-0x28)),UbbLNrc(0x7b),UbbLNrc(0x7c),UbbLNrc(0x7d),UbbLNrc(0x7e),'z`GHl6~kqBw?z%/_|0c{ZU{aA','kj2e)VDQpr|(#~u','rR(e]S!rxLMs4Pbj#Lng.:|woL6E9du_KWbc`?sQA',UbbLNrc(_QSl1n8(-0x27)),UbbLNrc(_QSl1n8(-0x25)),UbbLNrc(_QSl1n8(-0x35)),UbbLNrc(0x2f),UbbLNrc(0x14),UbbLNrc(0x81),UbbLNrc(_QSl1n8(-0x36)),UbbLNrc(0x60),UbbLNrc(0x5a),UbbLNrc(0x77),UbbLNrc(_QSl1n8(-0x35)),UbbLNrc(_QSl1n8(-0x2c)),UbbLNrc(_QSl1n8(-0x30)),UbbLN
2024-09-30 12:28:14 +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