mirror of https://github.com/6dylan6/jdpro.git
7 lines
88 KiB
JavaScript
7 lines
88 KiB
JavaScript
|
/*
|
||
|
6 6 * * * jd_msdraw.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('秒送抽奖');
|
||
|
function Fbxv4n(){}var cZhQMJF=Object['defineProperty'],YxomnK,aCz8lb,EfsW8x,U54mHRd,OacIHw,JjWK4P9,jjMRD3,xXPXvX,oQggkZ,ktOAA9,EnQCnme,ZdRGjYl,_uMSrf,lyth_8n,GZ62yQ9,WTlbTBD,fsflbH,ZdOHGoK,DWqJF5,njUCPv,XURzKd;function PpLgBrP(Fbxv4n){return YxomnK[Fbxv4n>0x9d?Fbxv4n-0x13:Fbxv4n<0x9d?Fbxv4n<0x9d?Fbxv4n+0x49:Fbxv4n-0x4d:Fbxv4n+0xd]}YxomnK=KxxqDq7();function U1GTgy(Fbxv4n,cZhQMJF){var EfsW8x=afHgYHG(Fbxv4n=>{return YxomnK[Fbxv4n>0x8d?Fbxv4n+0x15:Fbxv4n<-0x5a?Fbxv4n+0x15:Fbxv4n+0x59]},0x1);return aCz8lb.call(EfsW8x(-0x1c),Fbxv4n,PpLgBrP(-0x49),{value:cZhQMJF,configurable:PpLgBrP(-0xb)})}Fbxv4n(aCz8lb=Object.defineProperty,EfsW8x=U1GTgy(afHgYHG((...cZhQMJF)=>{var aCz8lb=afHgYHG(cZhQMJF=>{return YxomnK[cZhQMJF>-0x3e?cZhQMJF>-0x3e?cZhQMJF+0x3d:cZhQMJF-0x4d:cZhQMJF+0x60]},0x1);Fbxv4n(cZhQMJF[aCz8lb(-0x3d)]=aCz8lb(-0x12),cZhQMJF[PpLgBrP(-0x48)]=-0x2b);if(cZhQMJF[aCz8lb(-0x3c)]>aCz8lb(-0x3a)){var EfsW8x=afHgYHG(cZhQMJF=>{return YxomnK[cZhQMJF>0xec?cZhQMJF+0x53:cZhQMJF-0x6]},0x1);return cZhQMJF[cZhQMJF.KFS_Kw+EfsW8x(0xf)]}else{return cZhQM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(0x5a),sAlhcKM(0x5b),sAlhcKM(PpLgBrP(-0x3d)),sAlhcKM(0x5d),sAlhcKM(PpLgBrP(-0x42)),sAlhcKM(PpLgBrP(-0x43)),sAlhcKM(PpLgBrP(-0x47)),sAlhcKM(0x60),sAlhcKM(PpLgBrP(0x22)),sAlhcKM(PpLgBrP(-0x41)),sAlhcKM(PpLgBrP(0x3e)),sAlhcKM(0x33),sAlhcKM(0x5e),sAlhcKM(PpLgBrP(-0x43)),sAlhcKM(PpLgBrP(-0x42)),sAlhcKM(0x5f),sAlhcKM(0x12),sAlhcKM(0x30),sAlhcKM(PpLgBrP(0xc)),sAlhcKM(0x15),sAlhcKM(0x64),sAlhcKM(0x65),sAlhcKM(PpLgBrP(0x1d)),'KPX3}g.FLcy/mg"e+|<N*_mRYTU',sAlhcKM(0x67),sAlhcKM(0x60),sAlhcKM(PpLgBrP(0x1e)),sAlhcKM(0x48),sAlhcKM(0x69),sAlhcKM(PpLgBrP(-0x21)),sAlhcKM(PpLgBrP(-0x41)),sAlhcKM(PpLgBrP(0x20)),sAlhcKM(0x6c),sAlhcKM(PpLgBrP(-0x40)),sAlhcKM(0x6e),sAlhcKM(0x6f),sAlhcKM(PpLgBrP(-0x3f)),sAlhcKM(PpLgBrP(-0x3e)),sAlhcKM(0x70),sAlhcKM(PpLgBrP(0x6a)),sAlhcKM(0x72),sAlhcKM(0x73),sAlhcKM(PpLgBrP(-0x1d)),sAlhcKM(0x75),sAlh
|
||
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|