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-12 22:44:16 +00:00
const _0xad25=['xJKWWOuJWORdTmoobSoL','ouFdRbarsSkdWOHbeG','W7HuDd7dMa','W6mmyCozWPXN','WQv3WQZdTSk5k07dHG','xmkhWRCAxq','WQK0WQ5VW5m','uSknWOq5qSkuW4y','j8kyumkctmowdmkoW5pcQa','WQ/dGrC','ybtdOqVcUG','jeOPWP52','tmkLkCoqWQS','u8kgWOyXuSkcW5br','emomia8fw0hdLexcTW','W5ymzGyb','W7W7uJH5','zvxcQGLqu8ogWOacjW','Be4+W63dPXif','tmompuXYW7zerMG','pCo+shjZW5vwFa','rL3dPdFcOG','jfddKre','WQrFySk4W7S','6k+H57Yw5y256yETWQHoxSk+xCoE','dCk6h8kofCkWWRCDea','W5Xtfmky','W6RcTSkGW6z4W6q','DSkaW7yu','amkAAGioW5j4C0NcNq','8jM1QCkT5yAT5l+Y6i+05B6J77+4','WOxcV8o0W63cLa','5RwD6ksP5BIv6zkp5lIr5yMI5QY05AA15yMK5Pwb','W5RdGrtcLtCfWPjZW5W','owtcJYhcOSo9W7brWPpdPa','WP3dGmoQsSoi','zSkfxG','jKZdTHegxCkZWP1apW','WQT1W6BdQCoLlq','oMFdNWRcQSoipCktW63dJq','W7T5W5XsW6FdP8oGWQZdHmk1','W5XFsdhdGCkNWPFdGrmG','W7T2W7ldL8oJ','WQpdLXmq','gmkOdCki','WPi7W5WVhmoQW4jRW6f9','ESk5W6a0WRS','WQ/dLX4If0ZcK8kyg2m','W7jHW6FdHq','lSoedG','DIS9WRCw','vJBdG8kbWOO','eCoggConkq','fmormW','W4fybmkaweityG','zCoLewXPW4LHDvFcHq','W6b2W6JdLSo0CuvkW57dJa','WQjGWPNdSCk2luS','DXhcHmoKiG','Emo2BqKdW7VdU8oflcK','WRVcTwldNSo7WRVcTCkvdYK','WOyYW54xj8o0WRSuWQW2','44kP5O6j56AH44cM6k+/5ywT6i2q5y+nW6D7','DW4dWOKZ','W79KtrddOSkaWQm','j8kyWPdcQW','W4i2p8oLza','x1ZdVahcQCoMW6FdOCouW5u','a3CXgfy','WRVcPh/cMmk4W6hdTSocy3m','WOmHWRZcLa','y8oyW6DtWQ0M','wa4yWQax','W4vvW4NdUmod','kX7cJKtcG3j+WPL1W48','WQvHWOxdSCkKlwVcKJrn','WRi3WQRcKWJcPrFdI8ksuW','WO1DrmkfW6O','Cmo8uqqI','yu8aW6BdRWGNW6TrWPS','DSo/wqeh','n8o8x3nnW7zkyCk3W5G','W6dcIfi','yHGRWOC7','W7P8W6e','FmoUW7L9WOG','W6NdIZVcLSocumo+DYHR','BXLXWPtdOq','W45gyYBdOW','FmouW71C','CW3dUCkNWROMrCkxdIa','WR3dGq8hjvNcLSksj1u','WQn7W7xdJq','WRn1W7JdOCoa','W4/dMsBcKYeIWP15','ma3dHqZcJ3f/W5LOW7G','qH/dRW/cQq','W40QrGmqh8k4dwRdRG','W4uTEsemh8kmW48','uCk0W7O8WOi','W703qa','W5DzvchcJCkgWPldItqB','W7XWxaddOG','WOldVSohE8ox','W7W4vXa','g8ohiGuLx1FdHa/cTa','W5SOuCo6WRm','WRXGWOddRa','WRDOW6JdLSoYexBcLmoH','kmokyvru','W6tcLvBcGCosAGO0','kMVdGHVcKCov','Cd8NWOVcLmknW50','pCowDu7cHG','WOvRW5hcOG','W6n/W6pdVSo4Chi','W7ZdKXBcJdXIW5nDW5eD','eHhdMwZcHx15WOu','WPm+W4Wwhmo0W71u','j8oMu0JdKCoaW6lcHJbS','W6nIerZdT8kwWR4pW54o','WQy8WODiW5BdQmoQ','WQ1TWPddVmk1lKlcKZ5m','WP46W6GlpG','sYa0WOGrWO3dQCoo','wmk7hmo4WPC','wYnGWRddRSopw8ksvG','W4ykBrKx','W7y2srHBo8kX','gWmCW73dG1tcOHddUIu','nmoHqxbqW4T2ymk2W7S','omoIEIOsW7hcOCoklq','W6JdHY3cKG','vmklW7e2WP0','p1NdVrSVrSkdWOG','cmo1j8oteW','WQdcKKZdLmo8','xCo95yM46zgJ5zg/5ywP5OQP6kcH6iwV5P+k','WRrSW4ZdUCkZpgZcN2Ou','WQNdKqKgeKZdLSkBce4','W7yXW75pza','WRVdHWKab0VcIa','vXS5W6P1WOtdHG','W59eqxRdK8kEWOpdNJ43','xYaNWOW','W7H0WQJdK8oHCYHgW43dHa','W4BcT0/cNSoj','t8kQbmoW','W6BWUPc+a+AEKEAZVoEyI+AxPEwbPEI1UE+8Ka','a0WAd3ldItu','seqLW6ldRWm','kausW7NdGuS','Cs0KW4dcMCkfW5RcRJLj','W45CqHNdM8kAWPy','iCkKbSkYgmkhWQu','bSoHrNLr','Eu45W7ZdQHi','pmoxxKNcISkpW6hcIIW','W4JdGHtcLsCFWPPZW5W','WOWcW68jfa','W6f2W54','nKZdIXNcJG','WQ3cJepdHmkhtX83nXa','aK/dVreH','W7hdVcZcQZK','FW3dRG','W648W7L8yvhdIc7cTYm','W74lzSoDWO14','44g85OYD56we44oT6k6g5yAS6i255y67fSkj','WQzTW6ddNSoZdhlcL8oGW4G','wvFdKsVcSSo6','WRpLHkJOJkZLVQaO','rJtdMYy','l8o8BuVcHW','W5WskSol','6yga6l6N6iwL5P605yYi6i6x5y2znSo7kq','W5BdKWBcLdiSWPy','tmk5jSo/WPe','WQ/dLX4ha0ZcMG','zx/cMCksjgBdPZ4RW44','6k+T5yQC6zIc5OEh5z+aavVcMIeG','zCo3EZagW7W','FaRdJmkGWOa','WP8aWPH+W74','zCoZzIefW6u','W6vPW5qtW7VdPSoHWRFdMCk1','W7jYW7ldKW','E8ooW7zjWOSM','vmkpWOi4sCkbW59bB1W','W7VcU8kYW6fvW6q','W4JdKH7cT8oG','Bmotemozgmkoqa','lbddJLlcOxT/WPrNW64','aCooWOxcRd4','a1i2','W6TJyb/dPa','rmkrW6ynWQW','gSkSeSkjfmkRWQG','wfNdGG3cQa','WRtcJMBdUmo5','W6v+W63dNXddVvVcNmkqgW','cLmN','BaJcGmo5fW','h8kABXvdW5XtuhpcGq','raLaxsC','WQmWWQNdMclcOWldGmkdvW','m27dIYeZ','WQL3ev8n','y8o7zYSJW6ZcSSohoY8','a8ozr3bq','W7K3rbrTmCkSha','WQ7cINVcKCozgmo8qd9E','WPlcSCo8W6ZcThulWOi','umocbq','WO84WOzqW7RdOmoRWQFcJSk+','WQqSWQ7cHqRcUq','WOPZW7NdOSo+phW','w8oimwpdUW','WQLZW5hdNCoz','W7FcHc/cLSoEeSo9Ca9S','xZ1mWORdIa','W6G/Cr5C','e8omtwBcPG','W6a1AgG','h2GwaM0','vmoyw3uPW7VdQSozhs8','BtVdGa','xZP3','dmowWQNcSXbuemoXW7O','BqhcTmocdG','bCkfcCkPmW','WPy9W7yyBLFcIhxdSdS','WOuLW5ahjq','zuWSW6VdSq','WRxcIgVdNCka','iCkMzruRW5ldPmoe','W5XvuW','WObQW5JdH
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