mirror of https://github.com/6dylan6/jdpro.git
9 lines
151 KiB
JavaScript
9 lines
151 KiB
JavaScript
|
|
||
|
/*
|
||
|
抽奖
|
||
|
cron:1 1 1 1
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('心动乐园_抽奖');
|
||
|
function gV8KBYx(){}var AuGnen6=Object['defineProperty'],aGL3fa,G1Fsb4,wDkJHHV,nMENMBV,cMBEp1l,dOeC9h,Y75Sv9H,sn70NoY,OhRi3r,dfYApyx,SVXbD3o,DxIO9k,iqt1kyL,w7D5nKK,srovsH,I71ZHPO,CQW1Cui,Mo5f8nl,cYTbNd,THqVKHH,C8uvDo,QNWOlTe,bCK_1n,p8pKvC;function U4mfNRf(gV8KBYx){return aGL3fa[gV8KBYx>0x47?gV8KBYx>0x204?gV8KBYx+0x32:gV8KBYx<0x204?gV8KBYx<0x47?gV8KBYx-0x5d:gV8KBYx-0x48:gV8KBYx-0x3a:gV8KBYx-0x7]}aGL3fa=NkAzmru();function So784mV(gV8KBYx,AuGnen6){return G1Fsb4(gV8KBYx,U4mfNRf(0x48),{value:AuGnen6,configurable:U4mfNRf(0xb7)})}gV8KBYx(G1Fsb4=Object.defineProperty,wDkJHHV=So784mV(zRt2Eh((...AuGnen6)=>{var G1Fsb4=zRt2Eh(AuGnen6=>{return aGL3fa[AuGnen6<-0x34?AuGnen6+0x24:AuGnen6<0x189?AuGnen6<-0x34?AuGnen6+0x41:AuGnen6<-0x34?AuGnen6-0x3b:AuGnen6+0x33:AuGnen6-0x46]},0x1);gV8KBYx(AuGnen6[U4mfNRf(0x48)]=0x2,AuGnen6[0x2d]=-0x82);if(AuGnen6[G1Fsb4(0x56)]>-0x47){return AuGnen6[-0x21]}else{var wDkJHHV=zRt2Eh(AuGnen6=>{return aGL3fa[AuGnen6<0x1d7?AuGnen6>0x1a?AuGnen6-0x1b:AuGnen6+0x18:AuGnen6+0xa]},0x1);return AuGnen6[0x1](AuGnen6[wDkJHHV(0x1c)]())}}),U4mfNRf(0x4a))(c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mfNRf(0xf9)),TZo3Jc(U4mfNRf(0x4f)),TZo3Jc(0x63),TZo3Jc(0x64),TZo3Jc(U4mfNRf(0xb1)),TZo3Jc(U4mfNRf(0x148)),TZo3Jc(U4mfNRf(0xfa)),TZo3Jc(U4mfNRf(0x51)),TZo3Jc(0x69),TZo3Jc(U4mfNRf(0x4e)),TZo3Jc(0x6b),TZo3Jc(U4mfNRf(0x4e)),TZo3Jc(U4mfNRf(0x9c)),TZo3Jc(0x6d),TZo3Jc(U4mfNRf(0xe1)),TZo3Jc(0x6f),TZo3Jc(U4mfNRf(0x74)),TZo3Jc(U4mfNRf(0x80)),TZo3Jc(0x72),TZo3Jc(U4mfNRf(0xa4)),TZo3Jc(0x74),TZo3Jc(U4mfNRf(0xed)),TZo3Jc(U4mfNRf(0x4d)),TZo3Jc(0x2a),'6M|>X}Q_L','q4|>Z',TZo3Jc(0x76),TZo3Jc(0x77),TZo3Jc(0x78),TZo3Jc(U4mfNRf(0x53)),TZo3Jc(0x7a),TZo3Jc(0x7b),TZo3Jc(U4mfNRf(0xec)),TZo3Jc(U4mfNRf(0x5b)),TZo3Jc(0x7e),'|ng##}Ev',TZo3Jc(0x7f),TZo3Jc(U4mfNRf(0xd3)),TZo3Jc(0x81),TZo3Jc(0x82),TZo3Jc(0x83),TZo3Jc(0x84),TZo3Jc(0x85),TZo3Jc(0x86),TZo3Jc(U4mfNRf(0x64)),TZo3Jc(0x88),TZo3Jc(0x89),TZo3Jc(0x8a),TZo3Jc(0x8b),TZo3Jc(0x8c),TZo3Jc(U4mfNRf(0x55)),TZo3Jc(0x8e),TZo3Jc(U4mfNRf(0x8b)),TZo3Jc(0x90),TZo3Jc(0x62),TZo3Jc(U4mfNRf(0x50))
|
||
|
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
|