jdpro/jd_dplhbshop.js

5 lines
151 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-09-16 14:33:45 +00:00
function _0xFEF91EF(){}var _0x4E1E353=Object['defineProperty'],_0xFC8D3B3,_0x0C4C78,_0x8FE6E4,_0x6734C31,_0x3365A8,_0xA06465,_0x509A013,_0x557694F,_0x2BBFA1,_0xDEBC3D8,_0x1907FD,_0xD074907,_0x62CF45,_0x77ED6F,_0xBC8782F,_0xCA9273,_0x0AAD52,_0xF9D8AF8,_0x962E97,_0x7764157,_0x2688EF,_0x15C84B;function _0x9C630C(_0xFEF91EF){return _0xFC8D3B3[_0xFEF91EF<0x27?_0xFEF91EF-0x15:_0xFEF91EF-0x28]}_0xFC8D3B3=_0xBB719C3();function _0x3154DB4(_0xFEF91EF,_0x4E1E353){return _0x0C4C78.call(null,_0xFEF91EF,'length',{value:_0x4E1E353,configurable:!0x0})}_0xFEF91EF(_0x0C4C78=Object.defineProperty,_0x8FE6E4=_0x22D81E((_0xFEF91EF,_0x4E1E353)=>{return _0x4E1E353(_0xFEF91EF())},0x2)(_0x5E7EAA,_0xD6F98F));var _0x68B85F1=[],_0x76193B=[_0x8E216CC(0x0),_0x8E216CC(0x1),_0x8E216CC(0x2),_0x8E216CC(_0x9C630C(0x51)),_0x8E216CC(_0x9C630C(0x59)),_0x8E216CC(0x5),_0x8E216CC(0x6),_0x8E216CC(_0x9C630C(0x74)),_0x8E216CC(0x8),_0x8E216CC(_0x9C630C(0x3a)),_0x8E216CC(0xa),_0x8E216CC(_0x9C630C(0x7b)),'t|PgV',_0x8E216CC(0xc),_0x8E216CC(_0x9C630C(0x72)),_0x8E216CC(_0x9C630C(0x7a)),'V|u#l]>Ni',_0x8E216CC(0xf),_0x8E216CC(0x10),_0x8E216CC(0x11),':|2m',_0x8E216CC(_0x9C630C(0x82)),_0x8E216CC(_0x9C630C(0x181)),_0x8E216CC(0x14),_0x8E216CC(_0x9C630C(0x5f)),_0x8E216CC(_0x9C630C(0x78)),'7|?q5W16',_0x8E216CC(0x17),_0x8E216CC(_0x9C630C(0x84)),_0x8E216CC(0x19),_0x8E216CC(0x11),_0x8E216CC(_0x9C630C(0x85)),_0x8E216CC(0x1b),_0x8E216CC(_0x9C630C(0x86)),_0x8E216CC(_0x9C630C(0x87)),_0x8E216CC(_0x9C630C(0xa2)),_0x8E216CC(0x1f),_0x8E216CC(0x20),_0x8E216CC(_0x9C630C(0x88)),_0x8E216CC(0x22),_0x8E216CC(0x23),_0x8E216CC(_0x9C630C(0x57)),_0x8E216CC(0x25),'l*kg>n/h72IjvC#Msfm`C4*as+U{7PUftV32O~;_QUw@8C)l@ieU#b52>+B@<<#Mu`FbSNmJa2z3x6AH,]I{>~@5|2Sz*4$<rmm~8XJH|RruL_$<K>Ap}Ma;>`88AMR>Crh7ISQJ>`q^76AHSFJ',_0x8E216CC(0x26),_0x8E216CC(_0x9C630C(0x7c)),_0x8E216CC(_0x9C630C(0x157)),_0x8E216CC(0x29),_0x8E216CC(_0x9C630C(0x76)),_0x8E216CC(0x2b),_0x8E216CC(_0x9C630C(0x154)),_0x8E216CC(0x2d),_0x8E216CC(0x2e),_0x8E216CC(0x2f),_0x8E216CC(0x30),'fricJ[|PDm2aZ6#LQQKc$S#5XUv^Jn|OWv37vxQJ',_0x8E216CC(_0x9C630C(0x8a)),_0x8E216CC(_0x9C630C(0x54)),_0x8E216CC(0x33),_0x8E216CC(0x34),_0x8E216CC(0x35),_0x8E216CC(0x36),_0x8E216CC(0x37),_0x8E216CC(_0x9C630C(0x53)),_0x8E216CC(_0x9C630C(0x75)),_0x8E216CC(_0x9C630C(0x8b)),_0x8E216CC(0x3b),_0x8E216CC(0x3c),_0x8E216CC(0x3d),_0x8E216CC(0x3e),_0x8E216CC(_0x9C630C(0x50)),_0x8E216CC(0x40),_0x9C630C(0x28),'Tsiwcc|x`[L`b8|n$5d',_0x8E216CC(0x41),_0x8E216CC(_0x9C630C(0x5b)),'q%&5%Z.@[z^IQ>1?D|,<HG#$T!pk5Q8kKwAg@(D',_0x8E216CC(0x43),_0x8E216CC(_0x9C630C(0x8d)),_0x8E216CC(0x45),_0x8E216CC(0x46),_0x8E216CC(0x47),_0x8E216CC(0x32),_0x8E216CC(0x48),_0x8E216CC(0x49),_0x8E216CC(_0x9C630C(0x29)),_0x8E216CC(_0x9C630C(0x91)),_0x8E216CC(0x4c),_0x8E216CC(0x4d),_0x8E216CC(0x4e),'NZE>p$?Saj31:Q/5u"Bmz.ba6nTS+P|}oiA',_0x8E216CC(0x4f),_0x8E216CC(0x50),_0x8E216CC(_0x9C630C(0x97)),_0x8E216CC(0x52),_0x8E216CC(0x53),_0x8E216CC(0x54),_0x8E216CC(_0x9C630C(0x5c)),_0x8E216CC(0x56),_0x8E216CC(0x57),_0x8E216CC(0x58),_0x8E216CC(_0x9C630C(0x77)),_0x8E216CC(0x5a),_0x8E216CC(_0x9C630C(0x6f)),_0x9C630C(0x3e),_0x8E216CC(0x5c),'(|H#_',_0x9C630C(0x2a),_0x9C630C(0x28),_0x8E216CC(0x5d),_0x8E216CC(0x5e),'6_)x(Pjc|_a8>FinLk=Y&2J',_0x8E216CC(_0x9C630C(0x39)),':|2m',_0x8E216CC(0x60),_0x8E216CC(_0x9C630C(0xb8)),_0x8E216CC(0x62),_0x8E216CC(0x63),_0x8E216CC(_0x9C630C(0x35)),_0x9C630C(0x2e),_0x8E216CC(0x65),_0x9C630C(0x28),_0x8E216CC(0x66),_0x8E216CC(_0x9C630C(0x34)),_0x8E216CC(0x68),'l|sg',_0x8E216CC(0xf),_0x8E216CC(_0x9C630C(0xa3)),_0x8E216CC(_0x9C630C(0x29)),'[jDtB;2|d~I`}h2np+A9%Mb[L(','ie#5kzNYMh@c"b,+T<H5[^{muhW@xB%*E0lSN~BbOhn@%|j@d^hl5Y)c?^DJ','^I[m4U>H|1','l|~c6[y&i','l|!cs](H;',_0x8E216CC(_0x9C630C(0x2b)),_0x8E216CC(_0x9C630C(0xa6)),_0x8E216CC(0x6c),')|[m!nqVI}ruJ',_0x8E216CC(_0x9C630C(0xa4)),_0x8E216CC(0x6e),_0x8E216CC(_0x9C630C(0xb1)),_0x8E216CC(_0x9C630C(0xa5)),_0x8E216CC(0x71),_0x8E216CC(_0x9C630C(0xa7)),')|[m!nRJ',_0x8E216CC(_0x9C630C(0xb3)),_0x8E216CC(_0x9C630C(0xa8)),_0x8E216CC(0x75),_0x8E216CC(0x6e),_0x8E216CC(_0x9C630C(0x63)),_0x8E216CC(_0x9C630C(0x9b)),_0x8E216CC(0x6e),_0x8E216CC(0x75),_0x9C630C(0x28),_0
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