jdpro/jd_dplhbshop.js

5 lines
129 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-11-08 03:56:03 +00:00
function qXClYg1(){}var URV7bF=Object['defineProperty'],l_SruV,yAO7vGd,ervmphC,DZfhmsz,V1MVuf,QoR_vT,gWWyTX,NVDEcsV,TtF8j5V,nn8Beo,K0WLue,unGHs3t,WTAf2R,VDfWCI,WYvvEP,iQinOAJ,WCj_N5,ckZBm8X,Jn8_5h,sEFzoT,A3wt9e,Fx0Y6CQ,zmpuF1;function i_QOXr(qXClYg1){return l_SruV[qXClYg1<0x2c?qXClYg1+0x21:qXClYg1>0x2c?qXClYg1-0x2d:qXClYg1+0x1c]}l_SruV=yGV9dg();function uJzsCH(qXClYg1,URV7bF){var ervmphC=IOuZGYu(qXClYg1=>{return l_SruV[qXClYg1>0x168?qXClYg1-0x46:qXClYg1-0x32]},0x1);return yAO7vGd(qXClYg1,ervmphC(0x32),{value:URV7bF,configurable:!0x0})}qXClYg1(yAO7vGd=Object.defineProperty,ervmphC=uJzsCH(IOuZGYu((...URV7bF)=>{qXClYg1(URV7bF[i_QOXr(0x2d)]=0x2,URV7bF.lU9uQnd=i_QOXr(0x2f));return URV7bF.lU9uQnd>0xa4?URV7bF[0x72]:URV7bF[i_QOXr(0x2e)](URV7bF[0x0]())}),0x2)(C7goBVD,ic5ey74));var GfgwCH=[],TAJ6TYB=[uBLgGwY(i_QOXr(0x4e)),uBLgGwY(i_QOXr(0x2e)),uBLgGwY(i_QOXr(0x61)),uBLgGwY(0x3),'<_m|ur"hL',uBLgGwY(0x4),uBLgGwY(i_QOXr(0x5e)),uBLgGwY(0x6),uBLgGwY(0x7),uBLgGwY(0x8),uBLgGwY(i_QOXr(0x5a)),uBLgGwY(0xa),uBLgGwY(i_QOXr(0x7f)),uBLgGwY(0xc),uBLgGwY(0xd),uBLgGwY(i_QOXr(0x69)),uBLgGwY(i_QOXr(0x8f)),uBLgGwY(0x10),u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uBLgGwY(i_QOXr(0x50)),uBLgGwY(i_QOXr(0x78)),uBLgGwY(0x77),'BD6$flT|G',uBLgGwY(0x78),uBLgGwY(0x79),uBLgGwY(0x7a),uBLgGwY(0x7b),uBLgGwY(0x7c),uBLgGwY(0x7d),uBLgGwY(0x7e),uBLgGwY(i_QOXr(0x9e)),uBLgGwY(0x80),uBLgGwY(0x81),uBLgGwY(0x82),uBLgGwY(i_QOXr(0x9f)),uBLgGwY(0x7d),uBLgGwY(i_QOXr(0x9d)),uBLgGwY(0x7f),uBLgGwY(i_QOXr(0x4f)),uBLgGwY(0x81),uBLgGwY(0x80),uBLgGwY(i_QOXr(0x3f)),uBLgGwY(0x14),uBLgGwY(0x84),uBLgGwY(0x85),uBLgGwY(0x86),uBLgGwY(0x87),uBLgGwY(0x88),uBLgGwY(i_QOXr(0x38)),uBLgGwY(i_QOXr(0xa0)),uBLgGwY(0x6c),uBLgGwY(0x8b),'=>>w"|jf',uBLgGwY(i_QOXr(0xa7)),'JVYp@(T|G',uBLgGwY(0x67),uBLgGwY(0x8d),uBLgGwY(0x8e),uBLgGwY(i_QOXr(0xa3)),'_DiSO}T|}A|~hWV',uBLgGwY(0x90),uBLgGwY(0x91),uBLgGwY(0x71),uBLgGwY(0x92),uBLgGwY(0x93),uBLgGwY(i_QOXr(0xa5)),
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