mirror of https://github.com/6dylan6/jdpro.git
7 lines
104 KiB
JavaScript
7 lines
104 KiB
JavaScript
|
/*
|
||
|
7 7 * * * jd_phonedraw.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('手机数码抽奖');
|
||
|
function Xsw6YuG(){}var LZ_x5jV=Object['defineProperty'],BIwyR7_,MspeEZq,UnJPFG,Ofb6R1o,aIMYT59,JahfPS,oQuiLw,OcJwY3,Op3jsj9,JG0eXXe,wOBiWq,bGYfCqn,l20FeI,fJ_RzB,mznxIy7,Ap0TFjB,oySgP8N;function osb49eK(Xsw6YuG){return BIwyR7_[Xsw6YuG<-0x22?Xsw6YuG+0x12:Xsw6YuG<0x100?Xsw6YuG>-0x22?Xsw6YuG+0x21:Xsw6YuG-0x5a:Xsw6YuG-0x36]}BIwyR7_=jr3tgob();function mgWPfak(Xsw6YuG,LZ_x5jV){var UnJPFG=Oe6B4w(Xsw6YuG=>{return BIwyR7_[Xsw6YuG>0x3a?Xsw6YuG>0x15c?Xsw6YuG+0x5a:Xsw6YuG<0x3a?Xsw6YuG-0x62:Xsw6YuG>0x3a?Xsw6YuG-0x3b:Xsw6YuG-0x2e:Xsw6YuG+0x45]},0x1);MspeEZq(Xsw6YuG,UnJPFG(0x5f),{value:LZ_x5jV,configurable:!0x0});return Xsw6YuG}Xsw6YuG(MspeEZq=Object.defineProperty,UnJPFG=Oe6B4w((Xsw6YuG,LZ_x5jV)=>{return LZ_x5jV(Xsw6YuG())},0x2)(CpsMVjL,QNFtd0L));var rBLUjL=[],G6BEdT=[sQKQsMo(osb49eK(-0x3)),sQKQsMo(osb49eK(-0x5)),sQKQsMo(osb49eK(0xb)),sQKQsMo(osb49eK(0x5)),sQKQsMo(0x4),sQKQsMo(0x5),sQKQsMo(0x6),sQKQsMo(0x7),sQKQsMo(osb49eK(0x1c)),sQKQsMo(0x9),sQKQsMo(osb49eK(0x50)),sQKQsMo(0xb),sQKQsMo(osb49eK(0x2)),sQKQsMo(0xd),sQKQsMo(osb49eK(0x15)),sQKQsMo(0xf),sQKQsMo(osb49eK(0x18)),sQKQsMo(osb49eK(0x1e)),sQKQsMo(osb49eK(0x1)),sQKQsMo(0x13),sQKQsMo(0x14),sQKQsMo(0x15),sQKQsMo(osb49eK(0x3f)),sQKQsMo(0x17),sQKQsMo(osb49eK(0x40)),sQKQsMo(osb49eK(0x42)),sQKQsMo(0x1a),sQKQsMo(0x1b),sQKQsMo(0x1c),sQKQsMo(osb49eK(-0x20)),sQKQsMo(0x1e),'+S0kY6|@!yMt2WXpMRrwS_tAu:oU:f7)aMWO$LGj#VXZ!9AGc!=cg',sQKQsMo(osb49eK(0x46)),sQKQsMo(0x20),sQKQsMo(0x21),sQKQsMo(0x22),sQKQsMo(osb49eK(0x74)),sQKQsMo(osb49eK(0x11)),sQKQsMo(osb49eK(0x43)),sQKQsMo(0x26),sQKQsMo(0x27),sQKQsMo(osb49eK(0x2a)),sQKQsMo(osb49eK(0xb1)),sQKQsMo(osb49eK(-0x13)),sQKQsMo(0x2b),'`Rr,|JB',sQKQsMo(osb49eK(0x2d)),sQKQsMo(osb49eK(0x2c)),sQKQsMo(0x2e),sQKQsMo(osb49eK(0x36)),sQKQsMo(0x1c),sQKQsMo(0x1d),sQKQsMo(osb49eK(0x2b)),'+S0kY6|@!yMt2WXpMRrwS_tAu:oU:f7)aMWO$LGj#VXZ!9AGc!=cg',sQKQsMo(0x31),sQKQsMo(osb49eK(-0x1b)),sQKQsMo(0x33),sQKQsMo(osb49eK(0x3c)),sQKQsMo(osb49eK(0xf)),sQKQsMo(0x36),sQKQsMo(osb49eK(0x55)),sQKQsMo(0x38),sQKQsMo(0x39),sQKQsMo(osb49eK(0x5e)),sQKQsMo(osb49eK(0x5d)),sQKQsMo(0x3c),sQKQsMo(0x3d),sQKQsMo(osb49eK(-0x21)),sQKQsMo(osb49eK(-0x1)),sQKQsMo(0x40),sQKQsMo(osb49eK(0x84)),sQKQsMo(osb49eK(-0x1f)),sQKQsMo(osb49eK(0x5f)),sQKQsMo(osb49eK(0x60)),sQKQsMo(0x3c),sQKQsMo(0x45),sQKQsMo(osb49eK(0x66)),sQKQsMo(0x47),sQKQsMo(osb49eK(0x61)),sQKQsMo(0x49),sQKQsMo(0x4a),sQKQsMo(osb49eK(0x8)),sQKQsMo(osb49eK(0x68)),sQKQsMo(osb49eK(0x69)),sQKQsMo(0x4d),sQKQsMo(osb49eK(0x6d)),sQKQsMo(0x3e),sQKQsMo(0x4e),sQKQsMo(osb49eK(-0x21)),sQKQsMo(osb49eK(0x6e)),sQKQsMo(0x1d),sQKQsMo(osb49eK(0x71)),sQKQsMo(0x27),sQKQsMo(osb49eK(-0x20)),sQKQsMo(0x51),sQKQsMo(osb49eK(0x8e)),sQKQsMo(osb49eK(-0x1e)),sQKQsMo(0x54),sQKQsMo(osb49eK(-0x1d)),sQKQsMo(osb49eK(0x90)),sQKQsMo(0x57),sQKQsMo(osb49eK(0x19)),sQKQsMo(0x59),',#^_}j|*',sQKQsMo(0x5a),sQKQsMo(0x5b),sQKQsMo(osb49eK(0x92)),sQKQsMo(0x5d),'q8mZ]HF{P~gB[GknVW.fpM_|',sQKQsMo(0x5e),sQKQsMo(0x5f),'TR4#OTP|',sQKQsMo(osb49eK(-0x1c)),sQKQsMo(osb49eK(-0x14)),sQKQsMo(0x2a),sQKQsMo(osb49eK(-0x1f)),sQKQsMo(0x62),sQKQsMo(osb49eK(0x97)),sQKQsMo(osb49eK(0x10)),sQKQsMo(osb49eK(-0x1a)),osb49eK(-0x19),sQKQsMo(0x66),sQKQsMo(0x4b),sQKQsMo(0x67),sQKQsMo(0x68),sQKQsMo(0x69),'mb@wK.S|',sQKQsMo(0x27),sQKQsMo(0x1c),sQKQsMo(0x6a),sQKQsMo(osb49eK(-0x1e)),sQKQsMo(0x54),sQKQsMo(osb49eK(-0x1d)),sQKQsMo(0x6b),sQKQsMo(0x57),sQKQsMo(0x58),sQKQsMo(osb49eK(0x13)),sQKQsMo(osb49eK(0x32)),sQKQsMo(0x6e),sQKQsMo(osb49eK(-0x17)),sQKQsMo(osb49eK(-0x16)),sQKQsMo(0x5e),sQKQsMo(0x5f),sQKQsMo(0x71),sQKQsMo(osb49eK(-0x1c)),sQKQsMo(0x61),sQKQsMo(osb49eK(-0x1b)),sQKQsMo(0x42),sQKQsMo(osb49eK(0x57)),sQKQsMo(0x73),sQKQsMo(0x74),sQKQsMo(osb49eK(0x99)),'|Lj6',sQKQsMo(0x76),sQKQsMo(0x77),sQKQsMo(0x78),sQKQsMo(0x79),sQKQsMo(osb49eK(0xc)),sQKQsMo(osb49eK(0x4f)),sQKQsMo(osb49eK(0x7e)),'|Lj6',sQKQsMo(0x1c),'|L`S$r%;',sQKQsMo(osb49eK(-0x9)),sQKQsMo(osb49eK(-0xc)),sQKQsMo(0x7c),sQKQsMo(osb49eK(-0x8)),sQKQsMo(0x7e),'oiKcWOKSFYl`m|9',sQKQsMo(osb49eK(0x9a)),'+S0kY6|@!yA{+2^)$HOM[nMzD','@3:w_WJePo$j>|(',sQKQsMo(osb49eK(-0x7)),sQKQsMo(0x81),sQKQsMo(0x82),sQKQsMo(0x73),sQKQsMo(osb49eK(-0x18)),sQKQsMo(0x83),sQKQsMo(osb49eK(-0x12)),sQKQsMo(
|
||
|
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
|