jdpro/jd_fcwb_help.js

15 lines
64 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 07:47:44 +00:00
/*
2024-08-19 16:24:03 +00:00
欢乐挖宝助力
2024-06-28 07:47:44 +00:00
环境变量
JD_FCWB_InviterId // 指定助力码 非必须,不填默认助力账号一 格式inviterId&inviterCode
JD_FCWB_NUM // 指定人数 非必须,不填默认跑全部账号
cron:1 1 1 1 *
*/
2024-08-19 16:24:03 +00:00
const $ = new Env('欢乐挖宝助力')
2024-09-07 10:37:42 +00:00
const _0x7c2f=['emkciCkVeWyuEY3dSW','WOvOFLW','x8oKWOLAW4a','uqFdHHW','WOldSG0LyW','BmoPWRbDW6eKWR4','W7tdHSk2yNfSW5CQWQ3cNq','vsvGW5f1','BZO+WRW','zIXWW4bXW7qKjYG5','eczaWQ/dVW','W48boSkyWOnzfmoPwSo2','yaqIW4Tnuq','dbpdRmkJAa','WOftW7/dNSotiCkQ','rSofWOa','qa7dMJFdNW','W7BcTCk+W6JcGW','xL9QWQ7dISkxWQhcPbtdQa','FSkLimkfW73cIfmahCov','xmo+WP8DmsXbW4mKWPi','W6epWRHphmkDAq','sHSBW6Xp','4P61c+w1OoI8RowkQEAnTUwTOos5U+AwKo+9VW','WQNcSSo/W5yErw4g','WOpdNdVdKmoXW5Gn','Dmkhu1O','W5tcLHD+zG','BxBcSmomWRK','FfNdNCoAWR0oWOfsW4La','rCktu1ZdIGaKya','6ysf776v6BQL6k+G5yw+6lYK5yMo5yQX','WOOgpCovdSkOWOaSlmkR','xX3cGCocW6y','W4hdKmoyzCkxm8kkecJcPG','ymkImSkrW40','AuhcNmogWQC3WQDbW40','4PY9l+IfKEACIUI9G+IIKUMaUUwlJUs6HUMwGq','WRK7n8otuW','W5FcL8kcW7JcTG','WQTdn2uubh/dPCowsG','W5z8z0HwswNcRCkEzq','W4nBW77dU8oT','p2eNxSoK','ud/cNmoSW4JcJCoQrxC','ESk3fmkdW4W','WQdcTCofW4hdJq','kWzxWO3dJW','W41lWPCTW7bp','WQj/q35+','W5SbnmkWWOj3','W5OhkSky','WQ5sW6S','W4rwWOi','rmodWOr0W6ORWRFdLq','n8kJmSkCyW','WRpdOSouWPjcg2azfCkb','dJHcWQddPa','WQ3dMZNdLCoz','D8kNWR/cVsW','uYddHHhdHmo5W4yqEwW','svPZ','s8o6W5dcVCkg','AbDIW6rhg27cTrjj','W65Oa8k2kq','W6BdU8kqW7xcKsad','WOTBFCoiW4KPjCkBgmkHWQRcGa','W6LccSkayW','W5hMNiVNNOdLIzhLIOdNI7lMG6qzo8kG','hwaS','W7NdMCodvCoK','zK3cLmoxWRe','xa1DW7vDW40OdqW','kdldJNXW','WPXYCa','W4hdU8oLEa','v09XWQNdKSkzWRZcPY4','6yEX77YI5BYd5AAx5yQ45yMv6lwN5yYOBce','4P6YpEw8G+wkIEwlKowiH+w2Q+I/MEwjHUAoRq','DKTxWPRdUa','fSkmW6tdRmkR','W4L2sGRcMgK','W7adWRG','rCo5f8kGDY/cKg8','WOLAEvzQ','W7VcRt8ctYpcT1O','5y6I6ysX6k235PQ1W44fqsrpW5m','amkjW4RdKmkK','W6jecCkiDthcIa','tsxdJtjT','rKpcPa','DSk6W5tcQ38','WQddTHqQ','CrtdGHldOq','W5xcVmoCFCo0oCoJz0BdMa','D8kfqNVdHq','vddcMmoUW5NcJmo5q33dOa','vhdcG8kPW4FcJCkut3BdQa','WQ3dRSooWOX5eq','cZldMW','uwNcMmozWRG','D8k4W4NcLxJdPG','g8koW6RcLCkEfHz9xmkn','DCksrgpdTWy','W74iWRPFiCkCfZRcU1y','jdpdGgvQt0ee','l2JdVKKeCWDjASoX','fSoIWPe','WQ3dVXC','WP/dK3VdM8o5WPOxsY4','vmkfW77cLfW','kSkJdmkApZ8yuq4','WRimomoevSoUWOS7jW','fSkKo8kc','WPxIJkZVU77cSUwjNEwlLEEHTU+9HW','DHa4W68','WPRcP8onW6BdUq','W4DkW7VdPG','5O+c56EW57MO5P6hnSk8zCkkWPSH','ESkRnW','W45TqGRcMgK','zCkdWRxcRt8','W57dRCkEg33cVfbRW7a','W598imk0amoymaa+W48','hHRdKSkLCW','eeXpWQBdJYmw','WOetm8oGumo6','Ag7cVSkpW6a','WPxcKCowW7VdQW','WOpcOSomW6hdKq','tmkPmCoFgW','zSokW6NcOmk1','wUITUUAYTowsTow6McO','W7fEb8kgpmoYpq','g8o9WOyvzwLvW5KsWPW','W5rYnmkH','pMHK','WQtdTGO','amkAW6RdLCkfuqH8aa','zCk2W74CWPRcH8ovWOxdUSkp','p29+ob4','W5xdQCkDcLy','W6ZcO8ksW7hcKt0e','xu1SjgK','iCkek8o7','CSovFCk/pCkxW5CGyGlcUG','AJddHcFdVW','W7RdVSodBmou','WPBdHtNdMmoP','W4NdTCkepva','W5fiWPuvW7S','44cX5O+256EQ44oP6k225ywT6i+A5y6NFIu','W58NWR9CfW','WPzjW73dTSoGta','W6NdPmofySkh','lCkcpSo/C8keW7GptYe','WOBdHsBdHCoV','W4XyWPeb','hSk7bSkotq','u11K','u8kFWPxcJaq','cSoOWOqky2r6W5Gw','qqLBW6vA','oMjVW7hdKcGq','W7ekh8krWR4','BSk5W6De','jeDzmHO','4P6PWPxMNB/OGyZMR77NO5RLPBdNKkjJ','W5BdOSkyaNhcVxm','W53dOmoOECoo','WQZdTmoh','WOtdLq0JzG','W7Huc8k9Dsa','FmoLW5hcQ2tdR3tcL8osEq','oMzZW7hdHXKuWRNcNmok','WQXcdCkzDsRcGcG8WOW','WPZdNGGMEq','bttdKSkV','6ycK5yEb77Yc','bSkIlCkFaY/cP3RcKSok','W7hdSmoSv8k+','sItdVq9Z','W5CYW6WmWQy','nMHTW6q','W5qrj8ktWOD5bmkSnSk2','tY/cISonW7S','r8oRW4pcNmkp','WQtdOGjkESkq','W5xcNHf5','uby1W4jg','jhP+iqtcLt8','y8k0W6neWPxcG8oZWOZdRCoA','lCk9kSkArCotcc5XW5K','jh5IirpcPdT7WQ3cIa','dYldMSo7WP4','W74iWRHzb8kCjsdcUKa','Av7cT8ogWROx','vGNdNbW','EmkbrL7dVsuGySoAzW','htNdLCkLumo/WRRdQSk9','WPpdNchdLmoVW70q','F8kRpSoi','W5/dHCkjwv8','bqHaWQRdOYK','W75+b8kopq','W5VdUmkyagVdOI8TW7/dLG','AuhcNa','gCkBWRxdMmob','WOr+qc4','WQxdOmofWPm','BwXiWRddTq','WO3cUCovW6G','WOJcLmoBW73dMG','W5agoSksWQn1aCk8emkQ','umklW7nKWOG','W4hdOSkHju8','sqNdHrHqDb89W7bW','W4rTW4pdKCo3','r+IUQUAZVUwqHUw6SSk2','W5hdOSkoWRtdQISehdrD','W4ClW6mDWPvHC8oclSki','W5LpBmkrg8k8WQeEk8k3fve','WQC6fSo8Aq','qmkMW7tcIKq','W5f3hstcHq','ir7dQ8kjy8o4WQO','W7xdKmkaqeK','W40rW6O','hCkbcSkaEW','W7mMW4OOWO0','amkIbSksxa','xXXDW69CW4qphHG','sfrK','WQNdTHm3yJdcKKKPpa','dg7dL8kWWPxdMSkdE37dRZ9IvW','Amk5W7PrWOlcS8omWO7dL8om','W5ejpSknWOHugCkUpCk2','W4NdJSk2ofy','nSkxpmoMzmkNW7GoFG','W6fXWOSxW6i','W40feCkjWPrIhCo0u8kS','4P2wW7JLTBJLOyRLHAlMJ7
2024-06-28 07:47:44 +00:00
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } 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.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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) 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(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d