mirror of https://github.com/6dylan6/jdpro.git
7 lines
115 KiB
JavaScript
7 lines
115 KiB
JavaScript
|
/*
|
||
|
1 6 29 2 * jd_wmdou.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('无名小豆');
|
||
|
const _0x1330=['W659WRNcRSk9uSk/Bmk6uG','W5rMW7GIW4VdPM7dHCoswq','WOpdRLJcI8kdlcbmW55L','W4NcUgRcLmkeWORdR8oTW5pcNq','c8oawY8DuWFcK8kmFq','WPhcMMhdKCk0WPSpWRnIWQe','emkTe3m','w8oQngRdGa','WPpcPLVdISkG','W6tdO8kFgCkzjq3cTGDz','nUwkTUMtLowrG+wgT+AiHoIJGoIgOEAES8oo','i8o9WQLPW5DhWQm','W5feW4T0gG','55QF5lIb5lUZ56245yIZ6i+J5y+9','uvpcHCkujSomW5FdQSk8','trLFW7JdHh8+W6lcLSkw','WRZdSSkaW5xdUSkVerFcMCkA','W6ldOIueaa','AWjpW5VdKda4','W4GSWR/cV8oo','qmovnvVdNmkvsIKhbq','W5tdImo/W6BcH8kZWP4C','kmouWPLwedJcIH3dS8oK','t+AiM+IIOUs7UUwlRUw9QEw5LW','k8o8WOnBWR8','kSkpW7mjW4K','oZ7dGCkLdmk0W4GcAmkp','vSokgqPU','WQJdL3ddLhy','WQtdQuxcUq','jrVdTCkAWQ4My8kGW4X3','xCo6hNxcVMWXWQq','CmktW6fQWQ3dJ8oWWRmaqq','WO89WQHP','BCkhnCo4W6JdMbvS','W5RcLNWKW6VcKaBcN8kJW6G','W6TyomoZEW','hCosDSkKWPNcGqbNWQPia8k6','FguF','WQxdT0/dS20','W55oW4u','D8obj3xdRITGW6vzFa','amoxWPP6WQn2','mSolWQaVW47cMa','xSkJW7qTsKFdGW','WRxcH8omwCoEW6ldSCoSA8k7','W4JcJMm4W6pcKbpcGSk8W64','dmkGlMFcHmkibXBdS3y','qe3dGSkpnG','wSkqW4BcSCooW7hdJfy3W5y','l8kxW6jiqqSBWPZcTCkc','m8o9WOn+W4e','CmoegNtcUxWHWRqzDa','nclcRcWzWObLWQq5rq','W57cLh4NW7dcVGlcMmk5W6y','WO4nWPNdK8o8W4ddTZVdImol','W7ddLam4bSooW6bnb0K','amkLW4hcJga','W4RdH8oDESklwfpdPume','W5/cGwK8','aCkFW7fYoCkiB8oMW45z','jJFcG0Sv','WRtdI8ogrCovW6/dSCkRzCk2','C8ksW6ONWOhdICoPWRGtwG','emotWOTQWQnfW5xcGCogWO0','rSkQW6X/WPu','r8kIW5fkWRldPCofWOG','W4RdJmo4W7RcN8kY','WRhcMKLX','W5tdRwTyW4BcRSoMWRJdMCkC','g8oIWOfGWQfNWOJdMCk7W5K','x8o4WQX4hr/dLIddKSkZ','WObFWOVdK8o8W5dcKwdcMmkq','WO3dPt7dK8kjW4pdG8oaW6NcPa','W4vMWP3cQmkR','W5hdH8o/W6dcOCkJWOSmW77dOW','hSktFCkNW4xcT8o7WR9lDa','WOavW4JdI8kJ','uColW685t8oLsmknBGq','W4hdRexcOWrYWR4','nSoaWQ8VpeFdJYtdG8oH','WPW9WR94','W4DGkSoJwG','dGZcNG','b8kok3NcGmkarvBcUtK','h8koW7rth8ot','AvNdU8k7emoaW7q','o8kfW6j3fW','hCkzW65CfSoPwCosW60','muqmWRpcJ2D/WQNcQCk3','nmkZW61fjW','W65hbmk4hmk3WOGEF8oJ','cmoeWOvnWOO','WOq9WRHkWPlcTIK','nvNdJSkwWPO','lmkFW7D2WOhdHmoU','W4jaW5bXgG','dmkIW6aNsmkfW5vhW7ldRq','ldtcKGGsjSkXW6NdGea','dGZcNKGR','jCo5W4y+','c8kKp3NdMSoqbqG','smofjI9Feq','W6JcRCo0WP3cNCkmfKddJ8ov','k8kkW7nwrMDrW4hcP8kB','pCo7WODHW4C','WOpdJ2RdK3xdVCoI','uCoAAIuFDJNdHCoxtq','oZlcTJmCW5OY','6zEc6Ag+5BQ/6kY4776MWPVcUCo8Cu4','oYVdJrisb8kXW7tdKe4','a8oZWQn9','5Bwo5AAO5Pwx','aSotWPT8WQO','W7xdMbK0','o8o0WQ1AW5DxWPVdTHe1','qSoFnW','Emk8hCoqW4y','cmkKW6tcOmoIW5RdJuCdW4K','jCk2WQuJW5HrW77dVaP3','WR5WWQZdHmoHWOL8','W7ldMKzzW6u','uSkjW4pcPSos','FSkRW78JWOedW7dcTY5s','aCkeW6a','eSowWPTLW50','WOa9WQS','WRVdQmkZW4pdHSk7gLBcNSkg','fCkYWO/cV8oX','x8ouaf7dQmkvydG','WP/dJ30','x8ofWRyqsmonxmosW6LL','WOpcNshdV10','w0VdNJH6kd85W7pcRmog','W5NdShS','wmkpkmoZW5pcHSk5','WQFdRG3dRCkVfJncW4GF','avpcLIW4hbHwW5BcLW','W4z4W6yMW5tdVwtcVmkznq','aCk7W4u','wCoqW5a9yW','aSo4W6GLaSkdWOK','WQFdTMJdV08','W5tcVmk7oSomgXlcMtPA','n8kxW6HicG','iI7cJcq','f8kek3VcOa','qSkjm8oOW4tdHaPaWRb4','f2BcVrO','W5tdHSoS','lmkqWR5TxHPmWO3cJ8kX','W4/dLuHGW7G','WR7dM8kAW5pdKq','W4tdIJhcNG','BfpdQ8kG','fdlcNbep','u8odlJ8xiSoRW57dSCkW','WRiGW5ddVCklqu4TW5ddHG','WQDUWOVdL8o5','W6hcGMmGW5a','B8knWP3cKSoba8kv','vCoAW5C5xmkKe8oynv4','W55qdSk/na','FSorn1O','vabyW5hdRa','rmk5W7z8WQy','uCoPWRbcrHz+WQm','W4RdGmo4W6tcO8kNWOGyW7y','bCkFW5fdCa','pmo5chlcKCoabqhdRIm','AMtcGCoKA8oGWPKKBmkA','jmkxW6fsFdmyWOe','W6hdOCkCrmoCgG','WOxdKxVcTvtdVCoMkCoBWPO','Cguuna','W4XibCkthG','WPBdG8o4','y0NdRSk6fW','mSonW5HMAG','W6tdJH8veG','smkjWRHCWRJdUmoCWOTqrq','r8oEnfRdT8k/tW','s8k7xs4a','zrZcJSonW7PqF8oOWOrRB1m','nSkqW7Dk','vv7dNInJsq4sW5tdMG','W6z/WQ7cV8kuvCoWWR/dUHy','W5XodCoLqYpdMqVdJau','aSotWO5QWOXUW5NcLSoHWQK','vCkawZ4','WPqHW5xcOmogqwODWPFdQW','WPLaWPxdM8oNW5dcOgxcJW','FuNdRmk6gSoxW74','6ygt6l6b6iE65P2l5y+B6i+C5yYcW7NdNe4','l8o9WQW2WPjwWRJdVHDP','WRNdO0xcVSkhhYi','a8kHW7BcTf4','W5RdTxbhW4C','kCkrW65iyZGqWORcO8kz','W7zUW6PekW','W5/cHLxdICoyWP/dVmo6WO/dHG','WOxcN2xdLSksWPy1WPi','W6xdOCkEva','W6ddRCke','dmk3W4hcNeFcGW','x8o3W6nWhf3cMZNdLSo5','W6m6WRJcTCoYDSkLACk4jW','u8otWRW8FCowW5ieW5ZdSa','xCkiW5xcHSolW5xdJq','uCkIWRW/gCklWP9jW7ZdRa','5yYh5yI55yw6cmkyWQRdQq','CmoegNtcUxWHWRqzBW','W7JdMqm0aSocW6Dapx8','W6XghmoRFX3dJW/dLW','WP83WQjOWRdcUdRdV8ovrG','W4VdMCkhxmoi','DglcUSkolq','W6vQWO0Z
|
||
|
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
|