jdpro/jd_wyw_yqdh.js

7 lines
154 KiB
JavaScript
Raw Permalink Normal View History

2024-11-19 16:14:02 +00:00
/*
1 1 1 1 * jd_wyw_yqdh.js
*/
const $ = new Env('玩一玩_邀请兑换');
2024-11-19 22:38:51 +00:00
function mgJJPG(){}var BQB7xZF=Object['defineProperty'],tO6vosO,W6deaT,Wf2hx3o,jLN_qq,faOYtQ,bmfwhTe,nBB5U4,QVR5V6,YAxZVxo,lozvQ2Z,_QZ0TK,qOwktF1,Ig5YRK9,grW8pm,CVfDyv,K8YvRz,O6hSq3,Q_P1eX,UjE77SI;function ksRpvw(mgJJPG){return tO6vosO[mgJJPG>0x2d6?mgJJPG-0x53:mgJJPG>0x2d6?mgJJPG+0x2b:mgJJPG<-0x2b?mgJJPG-0x3d:mgJJPG<0x2d6?mgJJPG+0x2a:mgJJPG-0x2e]}tO6vosO=dj6bqt();function sTZvX4D(mgJJPG,BQB7xZF){var Wf2hx3o=cl9NNe(mgJJPG=>{return tO6vosO[mgJJPG>0x352?mgJJPG+0x39:mgJJPG<0x352?mgJJPG-0x52:mgJJPG+0x28]},0x1);return W6deaT.call(null,mgJJPG,Wf2hx3o(0xc3),{value:BQB7xZF,configurable:ksRpvw(0xdc)})}mgJJPG(W6deaT=Object.defineProperty,Wf2hx3o=cl9NNe((mgJJPG,BQB7xZF)=>{return BQB7xZF(mgJJPG())},0x2)(Jb5j7A7,oOeCSnY));var C0CJox=[],vpWJHG_=[qzox_P(ksRpvw(0x45)),'b#|[.n_QN',qzox_P(ksRpvw(0x44)),qzox_P(ksRpvw(0x5a)),qzox_P(ksRpvw(0x4e)),qzox_P(ksRpvw(0x50)),qzox_P(ksRpvw(0x56)),qzox_P(ksRpvw(0x4a)),qzox_P(ksRpvw(0x4d)),qzox_P(ksRpvw(0x51)),'{%|U^OaBtbUGW[#fCN4.=;SR*<63Dy',qzox_P(ksRpvw(0x78)),qzox_P(ksRpvw(-0x2a)),qzox_P(ksRpvw(0x54)),qzox_P(ksRpvw(0x4b)),qzox_P(ksRpvw(-0x29)),qzox_P(ksRpvw(0x63)),qzox_P(ksRpvw(-0x28)),qzox_P(ksRpvw(0x7c)),qzox_P(ksRpvw(-0x27)),qzox_P(ksRpvw(-0x26)),'QfsjeNy=E,;l|Wp[Sj5G<qm6K6u4!hcYMXq8Vj@.tbAGL^0f}L2AdbGQ?]F%.cXW#9',qzox_P(ksRpvw(-0x2a)),qzox_P(ksRpvw(-0x29)),qzox_P(ksRpvw(-0x28)),qzox_P(ksRpvw(-0x27)),qzox_P(ksRpvw(-0x28)),qzox_P(ksRpvw(-0x27)),qzox_P(ksRpvw(0x5f)),qzox_P(ksRpvw(-0x29)),qzox_P(ksRpvw(0x7d)),qzox_P(ksRpvw(0x5d)),qzox_P(ksRpvw(0x59)),qzox_P(ksRpvw(0x5b)),qzox_P(ksRpvw(0x7e)),qzox_P(ksRpvw(0x58)),qzox_P(ksRpvw(0x7f)),qzox_P(ksRpvw(-0x25)),qzox_P(ksRpvw(-0x24)),'p2t,@|E_d2',qzox_P(ksRpvw(0x80)),qzox_P(ksRpvw(0x81)),qzox_P(ksRpvw(-0x26)),qzox_P(ksRpvw(0x49)),qzox_P(ksRpvw(0x1a)),qzox_P(ksRpvw(0x85)),qzox_P(ksRpvw(0x86)),qzox_P(ksRpvw(0x87)),qzox_P(ksRpvw(0x38)),qzox_P(ksRpvw(0x83)),qzox_P(ksRpvw(0x89)),qzox_P(ksRpvw(0x82)),qzox_P(ksRpvw(0x8c)),qzox_P(ksRpvw(0x84)),qzox_P(ksRpvw(0x8e)),qzox_P(ksRpvw(0x95)),qzox_P(ksRpvw(0x94)),qzox_P(ksRpvw(0x72)),qzox_P(ksRpvw(0x97)),qzox_P(ksRpvw(0x1f)),ksRpvw(0x20),'s>xT2|rJ;OkWV2hfTa~J;`&VmiNFTrxx88k2D,ajuc8q>',qzox_P(ksRpvw(0x98)),qzox_P(ksRpvw(0x9a)),qzox_P(ksRpvw(0x9b)),qzox_P(ksRpvw(0x9c)),qzox_P(ksRpvw(0x73)),qzox_P(ksRpvw(0x55)),qzox_P(ksRpvw(0x9d)),qzox_P(ksRpvw(0x9e)),qzox_P(ksRpvw(-0x26)),qzox_P(ksRpvw(0x9f)),qzox_P(ksRpvw(-0x1e)),qzox_P(ksRpvw(-0x1d)),'|}tN2(F{^',qzox_P(ksRpvw(0xa1)),qzox_P(ksRpvw(0xa2)),qzox_P(ksRpvw(-0x16)),qzox_P(ksRpvw(-0x23)),qzox_P(ksRpvw(-0x4)),qzox_P(ksRpvw(-0x25)),qzox_P(ksRpvw(0xa3)),qzox_P(ksRpvw(0x74)),qzox_P(ksRpvw(-0x8)),'Ly|Nm',qzox_P(ksRpvw(-0x24)),qzox_P(ksRpvw(-0x1f)),qzox_P(ksRpvw(-0x23)),qzox_P(ksRpvw(0xa0)),qzox_P(ksRpvw(0xa4)),qzox_P(ksRpvw(-0x7)),qzox_P(ksRpvw(-0x1b)),qzox_P(ksRpvw(0xab)),qzox_P(ksRpvw(0x66)),qzox_P(ksRpvw(-0x15)),ksRpvw(-0x22),ksRpvw(-0x21),qzox_P(ksRpvw(-0x20)),qzox_P(ksRpvw(0xac)),ksRpvw(-0x1c),qzox_P(ksRpvw(-0xb)),qzox_P(ksRpvw(-0xa)),qzox_P(ksRpvw(0xad)),qzox_P(ksRpvw(-0x9)),qzox_P(ksRpvw(-0xf)),qzox_P(ksRpvw(-0xe)),qzox_P(ksRpvw(-0xd)),qzox_P(ksRpvw(-0x1a)),qzox_P(ksRpvw(-0xc)),qzox_P(ksRpvw(0xb1)),ksRpvw(-0x22),ksRpvw(-0x21),qzox_P(ksRpvw(-0x20)),qzox_P(ksRpvw(-0x5)),qzox_P(ksRpvw(0x62)),qzox_P(ksRpvw(0xb2)),qzox_P(ksRpvw(0x3e)),qzox_P(ksRpvw(0x61)),qzox_P(ksRpvw(0xb3)),qzox_P(ksRpvw(0xc)),qzox_P(ksRpvw(0x8)),qzox_P(ksRpvw(0xd)),qzox_P(ksRpvw(-0x1f)),qzox_P(ksRpvw(-0x26)),qzox_P(ksRpvw(0xb5)),qzox_P(ksRpvw(0xb6)),qzox_P(ksRpvw(0xb7)),qzox_P(ksRpvw(0x5e)),qzox_P(ksRpvw(-0x1e)),qzox_P(ksRpvw(-0x1d)),qzox_P(ksRpvw(-0x19)),qzox_P(ksRpvw(0xba)),qzox_P(ksRpvw(-0x18)),qzox_P(ksRpvw(0xbb)),qzox_P(ksRpvw(0xbc)),qzox_P(ksRpvw(0xbd)),qzox_P(ksRpvw(0x9)),qzox_P(ksRpvw(0xe)),qzox_P(ksRpvw(0xc0)),qzox_P(ksRpvw(-0x2)),qzox_P(ksRpvw(0xb9)),qzox_P(ksRpvw(0xb8)),ksRpvw(-0x1c),qzox_P(ksRpvw(0x57)),qzox_P(ksRpvw(-0x6)),qzox_P(ksRpvw(0xc1)),qzox_P(ksRpvw(0x52)),qzox_P(ksRpvw(0xc5)),qzox_P(ksRpvw(0x53)),qzox_P(ksRpvw(-0x1b)),qzox_P(ksRpvw(0xc7)),qzox_P(ksRpvw(0xc8)),qzox_P(ksRpvw(-0x1a)),qzox_P(ksRpvw(0x6c)),qzox_P(ksRpvw(0xc9)),qzox_P(ksRpvw(0xcb)),qzox_P(ksRpvw(0xcc)),qzox_P(ksRpvw(0xcd)),qzox_P
2024-11-19 16:14:02 +00:00
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