jdpro/jd_dplhbshop.js

5 lines
170 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-11-20 11:06:06 +00:00
function zCXIBjw(){}var WQJKBor=Object['defineProperty'],cZt9kl,ZrTwnNN,OKL310_,z_Y8qc,S6Huw2,dqcPFE,GuE5NX,vvWSIL,D48jkF,YMzDra,DQzl_ty,uwB5fUk,y3Y8YL,EBeRwjW,qiTcYCy,WuKZGKO,IO4HIk9,okP6HRo,YyBALgw,DYrQui1,TgjPkbx,tDnI8T;function CEFGlj_(zCXIBjw){return cZt9kl[zCXIBjw<0xb?zCXIBjw-0x3:zCXIBjw-0xc]}cZt9kl=cgEIs4();function n2Oye8h(zCXIBjw,WQJKBor){var OKL310_=avRo0U(zCXIBjw=>{return cZt9kl[zCXIBjw<-0x37?zCXIBjw-0x53:zCXIBjw<0x2ed?zCXIBjw<-0x37?zCXIBjw+0x2:zCXIBjw>-0x37?zCXIBjw+0x36:zCXIBjw+0x5b:zCXIBjw+0x15]},0x1);return ZrTwnNN(zCXIBjw,OKL310_(0x2a),{value:WQJKBor,configurable:OKL310_(0xaf)})}zCXIBjw(ZrTwnNN=Object.defineProperty,OKL310_=avRo0U((zCXIBjw,WQJKBor)=>{return WQJKBor(zCXIBjw())},0x2)(fTnBIb,mzTz1mf));var qr6GA8p=[],wNaKR8=['h|OkJ+IPL',g3T4ta(CEFGlj_(0x72)),g3T4ta(CEFGlj_(0x73)),g3T4ta(CEFGlj_(0x71)),g3T4ta(CEFGlj_(0x6f)),'mYJ|4M>R',g3T4ta(CEFGlj_(0x8f)),g3T4ta(CEFGlj_(0x6d)),g3T4ta(CEFGlj_(0x7e)),g3T4ta(CEFGlj_(0x5a)),g3T4ta(CEFGlj_(0x8b)),g3T4ta(CEFGlj_(0xa8)),g3T4ta(CEFGlj_(0xa7)),g3T4ta(CEFGlj_(0x1f)),g3T4ta(CEFGlj_(0x81)),g3T4ta(CEFGlj_(0x9a)),g3T4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Glj_(0xd)),'fC~$xhpKdim|kT2',g3T4ta(CEFGlj_(0xfe)),g3T4ta(CEFGlj_(0x20)),g3T4ta(CEFGlj_(0x98)),g3T4ta(CEFGlj_(0x17)),g3T4ta(CEFGlj_(0x24)),g3T4ta(CEFGlj_(0xf3)),g3T4ta(CEFGlj_(0xd)),g3T4ta(CEFGlj_(0x11a)),g3T4ta(CEFGlj_(0x3c)),g3T4ta(CEFGlj_(0x11b)),g3T4ta(CEFGlj_(0x43)),g3T4ta(CEFGlj_(0x10)),'N9Z|+#O',CEFGlj_(0x11),g3T4ta(CEFGlj_(0x11d)),'fC~$xhpKdim|,#5!<@u$_ba2Yi7mo/=9n`DJpe/#riMm=PAmtbiD$K+|;bOG',g3T4ta(CEFGlj_(0xb4)),'DPe|R_F}f','DPv|B3.uS',g3T4ta(CEFGlj_(0x1a)),CEFGlj_(0x1b),g3T4ta(CEFGlj_(0x121)),g3T4ta(CEFGlj_(0x84)),g3T4ta(CEFGlj_(0xf7)),g3T4ta(CEFGlj_(0x12)),g3T4ta(CEFGlj_(0x13)),g3T4ta(CEFGlj_(0x14)),g3T4ta(CEFGlj_(0x122)),CEFGlj_(0x15),g3T4ta(CEFGlj_(0x1e)),g3T4ta(CEFGlj_(0x123)),g3T4ta(CEFGlj_(0x2f)),g3T4ta(CEFGlj_(0x12)),g3T4ta(CEFGlj_(0x13)),g3T4ta(CEFGlj_(0x14)),g3T4ta(CEFGlj_(0x16)),CEFGlj_(0x15),g3T4ta(CEFGlj_(0x16)),CEFGlj_(0x15
2024-06-28 07:47:44 +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