jdpro/jd_dplhbshop.js

5 lines
130 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-11-14 05:11:31 +00:00
function WJbYPd(){}var RYuaFBm=Object['defineProperty'],eOUIX1,Lo8117,KYZ0M3T,uoT2KH,VcZQCR,qrNu1m0,zMLaPMe,C3ukJm,AFh9io,Ci44wD,mcVvcU,HB3PKzK,tMJpzXu,uYfVXlz,HE125_,Q_6V5LG,U1aPNS,jtW6qZ,ytVUIc,SJyuKA,ibf97Zr,VsDgILY;function NP7cPS(WJbYPd){return eOUIX1[WJbYPd>-0x5a?WJbYPd<-0x5a?WJbYPd+0x3:WJbYPd+0x59:WJbYPd+0x2b]}eOUIX1=LXET2l();function pPR9Yk(WJbYPd,RYuaFBm){var KYZ0M3T=x_ZTS60(WJbYPd=>{return eOUIX1[WJbYPd>0x18?WJbYPd>0x145?WJbYPd-0x20:WJbYPd>0x18?WJbYPd>0x18?WJbYPd-0x19:WJbYPd-0x14:WJbYPd-0x15:WJbYPd-0x5c]},0x1);return Lo8117(WJbYPd,KYZ0M3T(0x36),{value:RYuaFBm,configurable:!0x0})}WJbYPd(Lo8117=Object.defineProperty,KYZ0M3T=x_ZTS60((WJbYPd,RYuaFBm)=>{return RYuaFBm(WJbYPd())},0x2)(mjR3bv,w8YqRK));var sxZ__mm=[],y370nCy=[haxWPz(0x0),haxWPz(0x1),haxWPz(NP7cPS(-0x3a)),haxWPz(0x3),haxWPz(0x4),haxWPz(0x5),haxWPz(NP7cPS(-0x36)),haxWPz(0x7),'t^R|#fad',haxWPz(0x8),haxWPz(NP7cPS(-0x2b)),haxWPz(0xa),haxWPz(0xb),haxWPz(0xc),haxWPz(NP7cPS(-0x25)),haxWPz(0xe),haxWPz(NP7cPS(-0x2f)),haxWPz(NP7cPS(-0x58)),haxWPz(0x11),haxWPz(0x12),haxWPz(0x13),haxWPz(0x14),'M,(]5|eNu5','M,(]5|eNu5V','M,(]5|L9p7@',haxWPz(0x15),haxWPz(0x16),haxWPz(0x17),haxWPz(0x18),haxWPz(0x12),haxWPz(0x19),'!0[|O$KF',haxWPz(0x1a),haxWPz(0x1b),haxWPz(0x1c),haxWPz(NP7cPS(0xcf)),haxWPz(0x1e),haxWPz(NP7cPS(-0x30)),'8$ID3*oS$C?2,V!r|_"xH?sUr20<d*T/m5RP5',haxWPz(0x20),haxWPz(NP7cPS(-0x29)),haxWPz(0x22),haxWPz(0x23),haxWPz(0x24),haxWPz(0x25),haxWPz(0x26),haxWPz(NP7cPS(-0xc)),haxWPz(0x28),'|_41O?)F',haxWPz(NP7cPS(-0x4)),haxWPz(0x2a),haxWPz(NP7cPS(-0x6)),haxWPz(0x2c),haxWPz(NP7cPS(-0xa)),haxWPz(0x2e),haxWPz(0x2f),haxWPz(0x30),'.^=Lr*,&eCK|BYpRJq>K)*}S[^8ckb2R"#E^s[6@@l_6pr{Ux:06m|;/jLdz>HJ(7sJtm@SM&N[(TYL',haxWPz(NP7cPS(-0x11)),haxWPz(0x32),haxWPz(0x33),'5|TP,REF`',haxWPz(0x34),'I$BsF{|/O5@',haxWPz(0x35),'$/4pm|YV`',haxWPz(0x13),haxWPz(NP7cPS(0x1a)),'rp<{p&)sK"Slw879zT%UQGWC|g`j{w}j^H@1sVz',haxWPz(0x37),haxWPz(0x38),haxWPz(0x39),haxWPz(0x3a),haxWPz(NP7cPS(-0x9)),haxWPz(NP7cPS(-0x22)),haxWPz(NP7cPS(-0x2c)),haxWPz(NP7cPS(-0x8)),haxWPz(NP7cPS(-0x2e)),haxWPz(NP7cPS(0x14)),haxWPz(NP7cPS(-0x1)),haxWPz(NP7cPS(-0x27)),haxWPz(0x43),haxWPz(0x44),haxWPz(0x45),haxWPz(0x46),haxWPz(0x47),haxWPz(0x48),haxWPz(0x49),haxWPz(0x4a),haxWPz(0x4b),haxWPz(0x4c),'|Av:(',haxWPz(0x4d),':OpZ@3d+dJ:!K0|5HwA]?',haxWPz(0x4e),haxWPz(0x4f),haxWPz(0x37),haxWPz(0x50),haxWPz(NP7cPS(-0x3)),haxWPz(NP7cPS(-0x1f)),haxWPz(NP7cPS(-0x48)),haxWPz(0x54),haxWPz(0x55),haxWPz(0x56),haxWPz(NP7cPS(-0x59)),haxWPz(NP7cPS(0x0)),haxWPz(NP7cPS(-0x59)),haxWPz(NP7cPS(-0x26)),'O0Q.!VAw|6H',haxWPz(0x2a),haxWPz(NP7cPS(0x1)),haxWPz(0x5a),NP7cPS(-0x40),haxWPz(NP7cPS(0x8)),'$/4p`|wzs',haxWPz(0x13),haxWPz(0x5c),haxWPz(0x5d),haxWPz(0x5e),haxWPz(0x5f),haxWPz(NP7cPS(-0x58)),haxWPz(NP7cPS(-0xf)),haxWPz(NP7cPS(0x6)),haxWPz(NP7cPS(0x7)),haxWPz(0x63),'+Ph|#vgw',haxWPz(0x64),haxWPz(0x65),haxWPz(0x66),haxWPz(0x67),'S1G]0|/d',haxWPz(0x68),haxWPz(0x69),haxWPz(0x6a),haxWPz(NP7cPS(-0x57)),'g|Nu6p}V~',haxWPz(0x6c),'Re|YD<_G',haxWPz(NP7cPS(-0x57)),haxWPz(0x6d),haxWPz(NP7cPS(0xc)),'Re|YD<_G',haxWPz(0x6e),haxWPz(NP7cPS(0x4b)),haxWPz(0x13),haxWPz(NP7cPS(-0x46)),haxWPz(NP7cPS(0x19)),')1^tm|sBs',')1^tm|sB1a',haxWPz(NP7cPS(0xe)),'*5M|P4;cs',haxWPz(0x56),haxWPz(0x73),haxWPz(NP7cPS(-0x1a)),haxWPz(0x75),haxWPz(NP7cPS(0x87)),'b(68=i`Oi_if*xd[zY{p)|J8v:f2SA%@LF',haxWPz(0x77),haxWPz(0x78),haxWPz(0x79),haxWPz(0x7a),haxWPz(0x7b),haxWPz(0x7c),haxWPz(NP7cPS(0x11)),haxWPz(0x7e),haxWPz(0x7f),haxWPz(0x80),haxWPz(0x81),haxWPz(0x82),haxWPz(NP7cPS(0x13)),haxWPz(0x84),haxWPz(NP7cPS(-0x47)),haxWPz(0x65),'fk5]iEH!R9j2yx01x1a][jFV,ay2_G^/vvkhncyZR9.N@yg(~@Zp)|9O0_kjgEP?R5RPI6.SErVNk*^J',haxWPz(NP7cPS(0x18)),haxWPz(0x87),haxWPz(0x88),'fk5]iEH!R9j2yx01x1a][jFV,ay2Dr8/81K^h?&!J9qC,xyQ)1G]0|9O0_kjgEP?R5RPI6.SErVNk*^J','S1G]0|9O]brjnD','S1G]0|/d',haxWPz(NP7cPS(0x15)),haxWPz(NP7cPS(-0x10)),haxWPz(0x8b),haxWPz(0x8c),haxWPz(NP7cPS(0x1b)),haxWPz(0x8e),haxWPz(0x8f),NP7cPS(-0x54),haxWPz(NP7cPS(0x1c)),'jx|qs2dlT7},u8G?8?{q@}SEW{u,|YZC}cU3qF=@qXFtE5KiUe[q1s$^*(>Pu[CQv?Nsfq>7F&^',haxWPz(0x91),haxWPz(NP7cPS(0x1d)),'{^Ap9PV44o<|KD',haxWPz(0x93),haxWPz(NP7cPS(0x1f)),haxWPz(NP7cPS(0x26)),ha
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