jdpro/jd_dygetbeans_.js

7 lines
92 KiB
JavaScript
Raw Normal View History

2024-07-18 01:15:17 +00:00
/*
2024-08-31 01:21:50 +00:00
35 0,7 * * * jd_dygetbeans_.js
2024-07-18 01:15:17 +00:00
*/
const $ = new Env('每日抽豆');
2024-08-31 01:21:50 +00:00
const _0x2ae6=['6k2K5yMy6zUq5Osx5zY/W648BwBdRG','W7ZcR8oqWOxdVSkQWRC','W6hdGIH5zCoihMzl','WQpdSSkqW5dcQmoUWP3cR8oTzmo5WOK','BmoLWPpcMWa','FSksWOxdJHJdSfddMSoFjW','zCkzyH8','Dmo+WPVcGte','WO3dTmkGW7/dGSoLWR7cQComla','tCkYimkQlSoXEq','ESkqWQ0SW4yP','ymoXWP7cMJe','WOGOBmkAWOmAW6K','iCooW7q','iZSOF8kB','BCokWOtdN8oX','WQLyySkFDrut','kNXtWRm+','A0JcStuz','eMDlWOOhC8ouW6hcICkG','W7/dIdG','W7ZcR8oq','ftKjW7Hrga0MFmoj','5BAo5AwM5Ps1','W4LkrX4JWOFdNG','WOhdUba','p8oWW6ZcTeakkNKPWQG','WOTfebZcJq','E8kPn8o6asm/pW','smksfCkQp8oXxSkyyrm','WPFcN8oGW5ZdTmoHWOlcM8olEW','mSktWQ8T','WQXiiW','WRSxtCoi','cbBcVe/dNCoLWQC','fx1GWP4BgSksWQNcHq','lSoeWQpdUIpcTHhdMmkFzG','e3rrWPCrj8kpWOFcJW','rw7cLJ0g','W7RdGdf1CSocj1Xi','WR5DB8kVBG','fXKfrSkGiaiTtCoF','W6qNBvG','WQTEj8oaWPqB','lWm9W5mRWP8','WPZcKCkXiN0','W4zerXiQWOxdK8oFyq','WPRcL8k9ymo6','WOtcLSk7ASogW6ddH8k7ASkR','WQPcC8kO','cMLEWOm2','WONdTGnf','5B2c5yMU54Q85P2w772lcmk7EmkBWOm','aaK8W582WPi','fNDNzSkiCmocA8kzsq','hxzlWP4vpCkA','WOyTC8kXWOm','dZitW7nneGG6F8od','n8kGWQtdGSoQFuxcKKHN','oSklsxJcGxKIWP7dKd4','WQ/cRSo2f8kM','WRayq8oFWPasWODis8kf','y8o+WQhcQZq','5l2W6lEb77275PEe5RkQ5zo555sl5lI555kr','CbvgvZhdSW','WOHvimorWQvrEmkaW5xcTa','WOr9m8k3W4Ltjq','dCkTbSo7fG','WPbGgSk2WP5SpgG','nCkeW4bTCKxcKCkvE3C','5l2Q6lwE772C5Ps05Rg55zcp55w+5lU655kB','esqA','FComW7NcUmkZt8o8WQBdPSkE','q8k5n8kIoSoHFCk9','n05HW7qGWR5hW7xdPSky','WOZcSCkOfemWWQLlWP8q','WQuxuSoEWOW','WOJcR8k7d14','kSkuoSoDc308','W4zqzXaRWO4','zSkbEbS','WODNi8knW5W','A8ktWPxdIa','v8ohWRxcQrRdGCkZW6FcImo0','smkIj8kNiCoGA8k9hbm','ldioW7hdVa','qY4+oW','WOhcJCk7dK8','qCo2WOddLmot','WPNcSmk4eG','WQtcQqqd','6zsh6Agh5yYg6AEU77YGkmkPB8kDda','AWDkuJa','De3cGG','oZyi','vhBcSXKL','WOafrCoFW4qJWPr9v8kE','W4pdOsH5Dq','DutcKq4','gCk6s3q','nwrLlWC','W4XAEbmS','g8oMkSkAWQm','sCojWPpdJSoi','xfrB','W4HIr0rFbmkHrCoHWOa','W4tdOuldPr5z','f2z+iYldSmomW7q','r8kYimkMimoHvSkVnrC','DKDJqhuRWR3dRG','6ygn6l2d6iAc5P+O5y6i6i6h5y+tnstcOG','cCoOdmk6WOLO','WQdcNSo/g8kwW4z9W4ZcLa0','g8o5zCo7B8kTu8kgdd8','kLTUl8oKv0tdUCkkbW','6ycl6l+K6iEU5P2w5y+Q6i6n5y2DkCoaW5W','W65+mSkDEbyNWQCPnG','AmkZWQKgW5XbcWpcUM4','W5Sczx7dQG0wxCkdkG','WR1iDa','W6ykj8otWRNdR8k7W6e','maldSfKc','n8ktWPaQW7m','o+IVKoMhSEAvQEEzNUw9OoIpOowoTCkeWOi','puWKrdpcVuSFWR3dUq','WQ3cSmo1gSkl','FCkoWONdKq','ASoAW4WXjrRdKSo+mW','mNraamo0','rcKXlmo4ma','FmokW7NcRW','AXngxJVdSmk3z8ka','WQy3C8kWWRC','WOuQW40BvXmeWQWkWOK','W4VdRmk4WRVcLSkIWQC','W5HPimk9','W5qqkmojWQJdQmk7WRxdU1W','f8oJj8kzWRyDE8k0W4ldMG','o8kxWRy','mSoMW5pcRuCFm2z+W6m','WPCaq8kDsa','ESoqW7Cxla','WRvfzmovWQZdQmkRW7tdIMC','er7cOq','FGJdUeK','AmktWPpdJGldPwFdTmoimq','kLTPiSo3ufi','tbu5m8oC','awTJpZu','WQ/dVX98fW','ySkglSkAgq','jmkcaG','wmohWQC','5lMD6lcyW4u','E1nNwuaQWQBdN8kbW7y','W7hdVLrpj8kADNhdOG','WPBdK8owAeXvW4BdHM/cNa','WQtcK8o5','kCkgWQrW','W4jZh1vbaCk7ySkJW4y','EetcMHC0vmo/a8ol','WOddRmktjqKuWPf0','W6pdIcXS','WP0qgHG5WR/dGmoxAq','W5VcR8o2W4ZdQq','nWJdOuWyW7jbgCk/W40','nmkJWOyNW6K','W6yptSo/WR00WQvmymkq','BcD0s0i','WQT9g8kmFa','W6W3wgpdNq','WQuFW61Bjxr5W7LyW5W','hensWP8T','gcCsW6r3','W53cOCo6W6dcISoHWR3cNmoqnW','hxzl','W4dcMCo6W7RcLmk1WO4','WO9es8o+WPPwWQPDsmoE','W5NdRfddUvbmzuVcRCor','WPJcISkOoCkJW752W6BcILC','WQVdUbzdmq','WRdcUmo6dqGRWP91WQu5','WOxdUanIe8k3ra','W7ZcImoxWQZdUW','toAiI+IGNUs5G+wlO+w/Uow4RG','W5/cNSoR','W7emCSoXW6PolSkNWPNdRq','bqiMW5CqWP9NW6JdL8kV','t8k2Bg7cGNXIWP3dPJu','adugrCkR','BSocW6xcUmkI','fmoPmSkgWPrdy8krW4/dHG','WPu/W4Kj','WRPynbBcII/cQW','W5GCEh7dQG','W7jCn33dSsSwdSk3lG','yuZcHW4','aYyzW5q3','W5TcwHqdWOldLmoI','W6SdCMpdLIeEsW','gdayW6m','p1nhcahdU8o9W6xdNSoW','y0b6zgK','WPKpW7KhoW','W5zOvW','WQpdGYq','WRxcLSkVAmoW','W7uqiSoe','WPf/imkTCG','DfVcGcOWsmoQjW','W4/dS0FdSWK','vCoTW7pcP8kx','WO7cUSk/','CmkvWOm','D8onW6pcPmkvwmo4WRddT8kc','WQrAkSo9WRmzDSorWPtdPa','ySonW5iWkrFdH8odpJO','wSk4j8kxpW','fbdcPwZdNSoXWRq','WQ03ESoeWQW','W73dGh0Ij8kaCxLnW6K','WPqUCCkZWQu','W7BdIsS','nbhdVhaRW6vxfq','ymoxW4Ctdq','W6vNDJSkWQNdSSor','rSk4mW','WQ3cSSk8t8oe','W5arENq','BCouW77cUW','WQTsiaRcPZ/cHCkcW6qo','W4Tcxr4','WQPfbtBcTa','e8k4fthdUHrRW73cKKy','oXSptCkDoW','6lA15y2q5lMFE3JdGZH8sCkx','WPhcUrytEa','ANKCWOqohhXkWQxcSq','gbecta','C8kiWPldJblcUGVcT
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