jdpro/jd_dplhbshop.js

5 lines
182 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-09-10 13:38:01 +00:00
const _0x1a34=['h8oArMpcUwLJfmkGia','dmkxW51nA8o0','WQbhuWJdKmo9lmkfb8kM','57Qd5A+p5OUn5yMf','W5L4WRvOWPddPH8xWQNdKa','W4jVWR/cOSkZ','fCklW58','W7KkWQTbWOG/nq','sZTWW4FdPG','A8ovv3BdJW','WPNdGCkjW4NcRq','WQ/cNmkzC1q','wbnVW53dTSkpW5FcJCoJAa','eCo0WPasWOy','WPPMmazUW4earKfn','iCknWQTB','WQ42pX43xSkaW5JcRwS','WO0BWQ13Ea82','WQZcMaq','Eu7cMmo0AW','W7asWP5x','W4rOWQ/cG8kn','WQuHwYpdIa','WQbMaGSp','kCk4WRb8W7i','E2CMBq3dRGDqh8o6','EM4RAeFcQvO','o8oujEw7SowVG2S','WQ4rfmoeeqKZW7SCwa','W7/dQmk7FSovja','xbTcW5hdJW','Cx9XW6HHWPK','W7ZdTSoBWOy','W6imdsz0ha','WQr7jh58lmoYbe7cHq','aXFcJXjB','qe0KzfG','WPBdRqO','a8kDW5pdRWXnW7aSWOC','W6e9WPbQ','WR8ZucpdTG','eCoFwLtdT+EAGUs6Jos4UUEVRUwiOG','W4L/WRddO8k1emkKWORcUSkK','emkkW45wvSo1aaBdMt0','W7NcQmkyq8oSa8o6W4BcQSkB','o3VcQIji','WQiNnmoriq','F25LnbVdTrLoc8oH','nrldLSksWOldNIFdSCoJW6K','emo9WOSPWP02W6y','huVdQmorpsDIWPbeW7i','se/dOuRdVa','kmkvWP5nW5ddJ8oj','lHNdJ8kwWPNdLqtdQSo5W5u','W6S7WPC','b8kZW64','hsdcMJ9cvIO','W5xdT8orWOaq','h1BdVW','WQzeqeJcLmo7kmkd','q1XVW6FcTSorWRtdUCk+W7y','W5DJW7VcJ8kAs8k/WPddPCkM','gCkbx3Wt','W4z4ohP6jSo3','uHnZW4ddPa','WPXdgdyV','WOePWRxcPmk1cCkRWP3cSSo1','WRW6nrqpv8kbW5JcRtW','WR/cMmkSuuRcNmoyW7ZcKmoi','pKVdP8oxdq','W5/cPdvVW6DjWP4Tm2m','mGxdLW','WPj6W5PLpW','6lYy5yEI5Qk35l+d5PAJ5yEV5AY3WQNLUjZORzW','W7xcJSkZev7cO8osW6hcL8kg','WOpdNCoLW708W782WQOXea','g8o3WPG4WOyP','gupdU8ovnsPKWOf9W7i','WQhcGaijpmkKFhmD','W4ddLSoV','WOuCWRPqEa09WOldKIC','WO1caW','WOFdUuGXWRi','fMZdOSoDyw9OWPXSW4i','FgbMW4fQ','W6BdH8oQxg0','WOlcQCk/DM0','W5ZdMmo6WQe/','xXbgW6FdVq','WQrDvLxdKmoHnmk7hCk6','W5GIxra6taldPSoxWQu','k2JdIHlcSvTwWR3dQCk8','rGFdKNSwfCkD','WQ1fzgFdGq','w8oGzKFdVG','uI9MW6pdJW','qaVcK8oZrglcTJBcOuK','c8kKDh8Ce8kq','c1mIyutcTa4lW6rF','vb1MW5W','WOewWR1ZEa','WRq2omoPgq','WQm5xcu','W5zYWOK','W6lcMJyZWQjlWRqNjcC','W6ilhd91mvdcV8kz','iddcRSkVWQfC','cSkCW6WvfSkZ','aSkYW785FCoPWQfaW4NcGa','WPxcMCk3DG7cGSouW6ZdJmoC','W7bpWR1fWQ4','ih3cKt5AWPVdHq','jSk4W4WZimknz8keW5/cLq','BCoOrwhdOa','aXhdImkuWR0','WRldNmk9W5BcJrG','oZDpp8kW','ofFcLZH0','pY/cUSkMq0hdHa','WP9nhcC','sqFcVSkklIfRWOrKW5y','W595WPfGWO3dOa','gKBdSSoClGDSWPz/','v8ozWPezWOy0W6RdH8owWQW','W7VdTSoTuNxdGmoxCW','bCkZW60eta','W69UDaS6emklW47cQ28','5Rw25yU95AsO54cz54UL77++6k+d56Uk5zcl5ywl','W6n1mf9w','t1TKW5FdUCkmWOlcGCoIia','bmk3W4NcPruQWRm','zSkFjWxdTc97yCkbzW','eSoGWPWvWPu1W6tdHSkWW7K','W6WYWObUku4t','amkdW5pdSWa','WO3dMrtcR2W','W4nlmxT5','kXJdNa','jJRcSmk/WR8','WQyVstBdOSoeWOtcKa','Fv3dSw/dKq','A0qKz0O','WQ3cNHaimCkfC0ObvG','WQVdHmkHEmk6a8oEW4VcICkC','bSk4W5hdRX0','qZRdTa','W4bOWP5ZWOZdUX8zWR/dKq','ibldJ8kYWP7dHb/dSCo4W4q','zCk8xsRdIW','efhcMZe','asRcIdzcwZW','jxLL','W6dcLc0','gYDwnCkV','cmoTCv/dVq','WQXgv0NdI8oenCkgcSkz','p3n4nsDs','istcMCkaWRG','yx84zuZcVeagrG','W51pWOhcR8kH','fSkxW41qza','kCkjW4S2pq','WQ/cNcuxoCkn','tXjdW5JdO8keW6ldLq','WQ47ubFdKW','WQtcRSoNxJW','WRpdO8kjW7pcMq','W57cNsbTW4S','W5HvW6fUCae6WRJdNZG','q03cG8oVqh3cTbdcOf8','cuqK','k8oorMldMgDnqW','5QYAW5rt5BEI6kc96zMw5yIw77YQ6k2N6l+v','pCktBcNdTcP5tCkxrG','WQ/cVSk8aY3cN8khjW','vSotW6hdLWneW4al','W4n/wGCW','W40rWRvEca','WRBcOCkCrmoInCoGW4RcHCkz','dmkTFfihcW','a8kOW70GESk2W4agW5NcGW','C8o3A0BdUq','WRlcLG0Fn8kh','WOO6WR9XCG','ruVcPCo9sa','mow+G+wNMs7cP8onWOy','W4vQWQxcJ8k7c8kPWP3cVCkJ','W7hdN8oEq0a','g8kbW78sea','WQ/dQsRcP2VdU8ofW5FcGuK','W7RdR8oeFMy','jSkoW7VdTZG','ceVdRbBdLW','WPBdRby','otXThmkQWPyjWQbGWRi','WONdNCoSWPK','WQZcHsKIlq','WPWgWQnxqW','WQNcQ8otxSoYbCo+W6RcGSoq','hYFcTSklqG','WRZcUmk7tK4','fmkSw1WCdSkNWOxcIuy','jbhcUmkoWOG','oYRcGtzn','W6TezCooceG','WQ7dLSkQW7FcPa','n3P6jGW','eConrN7dMM9tuG','vrnvW4BdTCkf','kaxdMSksWOi','cwRcLHXo','eSkPFW','WQChWQbeEaW','zhRcTSoVxghcISoVWOXL','zgZcQCoJs1dcL8k2W7K','bSkfW5ZdUa','5PUO5O2iW4Ti5zkk5yA25OIP6kkn6iAT5P+d','kSoiALVcRhCVuCoeaa','WOziv2KMW5bkkf5h','W6zqsaNdN8o8nCkbemoL','vCoZD2a','WQO6tty','W6ategn7deFcQmkyWPe','WQrhqG','WQ0BoSooacGw','rWHfWPJcTSkcW7u','zsZcHq','A0VdQ2W','W510sa0i','bmk4W6WCymo/WPTmW5JcMq','cCoBAuddPW','bmk3W488AmoR','rdHBW7pdKG','kgrNoYD0WQiuxSkb','WQm4WQD7Dq','reVcMCoYF3FcTdFcSf4','nCknWQ1jW5q','smoSz2ddVG','uG9qW63dPW','emkPFfy','pCkDzuZdVtf4ymkcgW','W7XWkua','rqrKW5hdRa','dmkxW51ByCo
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