jdpro/jd_dplhbshop.js

5 lines
173 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-09-20 02:58:03 +00:00
function _0x73C8D0E(){}var _0x0D2B55F=Object['defineProperty'],_0xE177EE,_0xF8A597,_0xD9E48B,_0x2C61F4,_0x56F60CE,_0x3DB1BD,_0xC36937,_0x277693,_0xD758E8D,_0x414820,_0xC468A71,_0x3E5DA0,_0x9A1349,_0xCF6A82B,_0xD3D832,_0x790CFD5,_0xCE8F6D9,_0x1719D2,_0x6DAF318,_0x83A6321,_0x939CAF,_0xEC5E60C;function _0xA57C6C0(_0x73C8D0E){return _0xE177EE[_0x73C8D0E<-0x41?_0x73C8D0E-0x38:_0x73C8D0E+0x40]}_0xE177EE=_0xFDCBB1F();function _0xA2023C(_0x73C8D0E,_0x0D2B55F){var _0xD9E48B=_0x54300F(_0x73C8D0E=>{return _0xE177EE[_0x73C8D0E>0x1a6?_0x73C8D0E+0x11:_0x73C8D0E<0x1a6?_0x73C8D0E<0x1a6?_0x73C8D0E>0x2a?_0x73C8D0E-0x2b:_0x73C8D0E-0x4c:_0x73C8D0E+0x62:_0x73C8D0E+0x38]},0x1);_0xF8A597(_0x73C8D0E,_0xD9E48B(0x2b),{value:_0x0D2B55F,configurable:!0x0});return _0x73C8D0E}_0x73C8D0E(_0xF8A597=Object.defineProperty,_0xD9E48B=_0xA2023C(_0x54300F((..._0x0D2B55F)=>{var _0xF8A597=_0x54300F(_0x0D2B55F=>{return _0xE177EE[_0x0D2B55F<0x29?_0x0D2B55F+0x64:_0x0D2B55F>0x29?_0x0D2B55F-0x2a:_0x0D2B55F-0xc]},0x1);_0x73C8D0E(_0x0D2B55F[_0xF8A597(0x2a)]=_0xF8A597(0x5f),_0x0D2B55F[0x59]=_0x0D2B55F[_0xF8A597(0x48)]);return _0x0D2B55F[_0xF8A597(0x50)](_0x0D2B55F[0x59]())}),0x2)(_0xEEB34C,_0x34502A));var _0x70E12B=[],_0x31EC747=[_0xB62D64B(0x0),_0xB62D64B(0x1),_0xB62D64B(0x2),_0xB62D64B(_0xA57C6C0(-0x15)),_0xB62D64B(_0xA57C6C0(-0xc)),'])|4~.{>96ixM','7x}pw(A|',_0xB62D64B(0x5),_0xB62D64B(_0xA57C6C0(0x28)),_0xB62D64B(0x7),_0xB62D64B(0x8),_0xB62D64B(0x9),_0xB62D64B(0xa),_0xB62D64B(_0xA57C6C0(0x0)),_0xB62D64B(_0xA57C6C0(-0x1c)),_0xB62D64B(0xd),_0xB62D64B(_0xA57C6C0(-0x11)),_0xB62D64B(_0xA57C6C0(-0x24)),_0xB62D64B(_0xA57C6C0(-0x19)),_0xB62D64B(_0xA57C6C0(0x31)),_0xB62D64B(_0xA57C6C0(-0x1b)),_0xB62D64B(_0xA57C6C0(0x5)),_0xB62D64B(0x14),_0xB62D64B(_0xA57C6C0(0xc)),_0xB62D64B(_0xA57C6C0(0x6)),_0xB62D64B(0x17),_0xB62D64B(0x18),_0xB62D64B(0x19),_0xB62D64B(0x1a),_0xB62D64B(0x1b),_0xB62D64B(0x1c),_0xB62D64B(_0xA57C6C0(0x7)),_0xB62D64B(_0xA57C6C0(0xa)),_0xB62D64B(_0xA57C6C0(-0x1f)),_0xB62D64B(0x20),_0xB62D64B(0x21),_0xB62D64B(0x18),_0xB62D64B(_0xA57C6C0(0x9)),_0xB62D64B(0x23),_0xB62D64B(0x24),_0xB62D64B(0x25),_0xB62D64B(_0xA57C6C0(0xf)),'eyf!p<T,"AQ%U5uLN#BE5KykNZ;:"=;#vOGAs0>q8;hF^56eF@|;uHSApZtF99uLoE(HV{B`kARGi)/+4?Q:p0FSxAVRyKj9*BB0^n`+x$*o~qj9Mp/D1Lk>pE^^/L$p5*,"QV8`pEm&")/+V(`',_0xB62D64B(0x27),_0xB62D64B(_0xA57C6C0(0x10)),_0xB62D64B(0x29),_0xB62D64B(0x2a),_0xB62D64B(_0xA57C6C0(0x11)),_0xB62D64B(0x2c),_0xB62D64B(0x2d),_0xB62D64B(0x2e),'GE|;ho~)',_0xB62D64B(_0xA57C6C0(0x25)),_0xB62D64B(0x30),_0xB62D64B(0x31),_0xB62D64B(_0xA57C6C0(-0x2)),_0xB62D64B(0x33),_0xB62D64B(0x34),'=@f4/i{,^%L}|*B',_0xB62D64B(0x35),_0xB62D64B(0x7),_0xB62D64B(0x36),_0xB62D64B(0x37),_0xB62D64B(0x38),_0xB62D64B(0x39),_0xB62D64B(0x3a),_0xB62D64B(_0xA57C6C0(0x13)),_0xB62D64B(_0xA57C6C0(-0x3e)),']^lL88!Ds,$s}M!3:*}bEkIo"R&6<gm(k$;_)5W)dBDie2UT.6xm`VXqgaaM^$n|$(RT<DG',_0xB62D64B(0x3c),_0xB62D64B(_0xA57C6C0(-0x37)),_0xB62D64B(_0xA57C6C0(-0x18)),_0xB62D64B(_0xA57C6C0(-0x1e)),_0xB62D64B(_0xA57C6C0(0x14)),'O*l0_$kt6dOF*OB3J:%?*D|_t+d=rl',_0xB62D64B(0x41),_0xB62D64B(0x42),_0xB62D64B(0x43),_0xB62D64B(_0xA57C6C0(-0x3d)),_0xB62D64B(0x45),_0xB62D64B(0x46),'IE|;84S)',_0xB62D64B(0x47),_0xB62D64B(0x48),_0xB62D64B(0x49),_0xB62D64B(0x4a),_0xB62D64B(_0xA57C6C0(0x1c)),_0xB62D64B(_0xA57C6C0(0x1b)),'IE|;84qkkp',_0xB62D64B(0x4d),_0xB62D64B(_0xA57C6C0(-0x1)),_0xB62D64B(_0xA57C6C0(0x1a)),_0xB62D64B(_0xA57C6C0(0x18)),_0xB62D64B(0x51),'|Y>Jza4@%=eFx',_0xB62D64B(0x52),_0xB62D64B(0x53),_0xB62D64B(_0xA57C6C0(0x20)),_0xB62D64B(0x55),_0xB62D64B(0x56),_0xB62D64B(0x57),_0xB62D64B(_0xA57C6C0(-0x12)),_0xB62D64B(_0xA57C6C0(0x34)),_0xB62D64B(0x5a),_0xB62D64B(0x5b),_0xB62D64B(0x5c),_0xB62D64B(_0xA57C6C0(-0x7)),_0xB62D64B(0x5e),_0xB62D64B(0x5f),_0xB62D64B(0x60),_0xB62D64B(_0xA57C6C0(-0x16)),_0xB62D64B(0x46),_0xB62D64B(0x62),_0xB62D64B(_0xA57C6C0(-0x26)),_0xB62D64B(_0xA57C6C0(-0x3f)),_0xB62D64B(_0xA57C6C0(0x5d)),_0xB62D64B(0x65),_0xB62D64B(0x62),_0xB62D64B(_0xA57C6C0(-0x3f)),_0xB62D64B(_0xA57C6C0(-0x39)),_0xB62D64B(0x62),_0xB62D64B(0x67),_0xB62D64B(0x68),_0xB62D64B(0x69),_0xB62D64B(_0xA57C6C0(-0x3b)),_0xB62D64B(_0xA57C6C0(-0x3e)),_0xB62D64B(0x6
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