jdpro/jx_fcwb_help.js

18 lines
69 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
地址
https://bnzf.jd.com/?activityId=CmPJ1svf_qoTYXEwfOkKPg
环境变量
JD_FCWB_InviterId // 指定助力码 非必须,不填默认助力账号一 格式inviterId&inviterCode
JD_FCWB_NUM // 指定人数 非必须,不填默认跑全部账号
cron:1 1 1 1 *
*/
const $ = new Env('特价现金挖宝助力')
2024-09-07 10:37:42 +00:00
const _0x5459=['tmkUdG','5yIK5l2Y5Oc3','fMvn','W5BdRHXTfq','zmk4emo8ga','o8ovc2bU','W4zNWRrjWRirjaNdQLjWWRO','W78HW78uWQVcI8knWR1IiW','W7mNWRjdWQ0','WRhcRY/dUmkW','WOr8W67dKW','AmonW5TrsSofW4vwAmkT','EdHxW7BcQ8oMWRJcPmoq','wCoqFmoGC8kjjHxcUCk4W5O','emk7xJm','WR9YEmoFWO8','A8oAWQpcTZe','WPLoxCox','xSkUja','W7X6W77dSW','bmktj8kJlCkQpdlcNSkG','vGBdJmo9WQ0','WRlMJjNLR4dLIlxLIQhNOiZVV4tKU4NLO5/PU4q','i8kAAvGO','CGFcOSozW4y','WPNcQI/dNW','wZ9gW7tcIq','g8olW6b1aq','WOS5W4uZW7m','W7dcHCoz','vmoFESoDxW','WPhcVdldPJZdOSkEECkYWQu','umoyC8oQ','pmkebcVcTW','cmkCdWhcIa','ACo0vSoXqZC','5PA6772f6yg95ywY776m','WR1qWRSdWOzra8kM','WRRdP8kKW7z8','umkKg8owluhdJSk9iq','W4veW5/dIGa','5yU656o+77YM6ycX5yA85OIR6kkC77+K','EuNcKIGNWQG','WRT0Ea','aWq1W6CxW558W7i','mHyKW7q','W5JdIaTohW','FCo/WPy','4P6ZbUIhVoAERoI/JUIGVEMbKEwiPEs4IEMuGq','W7ldO1ZdMCkk','aSkzfbZcMZRcIhJcMSot','5AY95yUR5yM45lQ85PAR77+x6ykx5yAi772B','W5ddUdhdPW','W7tcNSokWPHKwmkhCSoyW5u','W4iWWPflWQJcVa','uSkKcmky','W5VdRNhdRCkR','WO1ZW7tcIrHuW4VdPeOY','C0xcIqeXWR3cLq','fSkscG','W4dcPSo5WO8NwhFcUb1SW7a2','Amk5dSoWcq','6ywr77YA6BMP6k2/5yst6l6H5yMD5yMq','W4JdQSkOFhtcR8o8CY/cNa','nmoRw8oXEbdcSW','4PYYW77MNiFLOkZLHAdMJ6BLRiNKUyJMLOdLJzG','tbhcJa7dKmk8WOJcGmkM','uwtcTYmxWPJcPgxdUmow','4P6zW4RLV63LIQxLIR7LI67LTixOVR7LIOFMJQO','5P6f5A+36kkCExVdLmouWOKSEW','e2Lxtq','eSkmW6rWva','W706W7CiWQ3cLmoEWR16jq','WOruWR8bWRG','yuJcTYyA','4PYEW43LT5ZOVk/LIkhMJRhLR7xLIAxLIlJKUyO','W7mMW74','WPyoWPb1WPNcKSow','u3xdICkAW4HEW4C','W4OwaSkhW4NdUuOSimkTuCkW','W4xdHJldSaS','gHBcKrNdHSoV','cmkrtLq+C8kXWOz4oa','adhcQCo+DGtdGmkdW4hdGG','WRJcLCo7WP/dJtBdS1VdTgq','l8ohdLfB','WOVcRdldJW','WOXcWQOq','xY9FxbKkW6uytSkT','W5FdSIJdSGBdICkyDCktWQu','n8kErfWR','WOxcN8oFWPVdHG','WOP0W7RdUqPd','lCk6bZ3cLW','mfZdN1TT','aSkREH3cSG','W7yaWQfbWO4','4P66WRpLI7hLIjNMIA/LIjldKuK','4P6TW6pLVjlLI7BMT7NLIPdcR1dVVjO','CaldR8oCWOy','4O2w77QOEow3IoADPowiUowkP+s4N+AxJU+/TG','W4ddQmohW7RdQSkgW7xdImo5WRi','W7PPgmoqsq','rvNcNXRdMSk8WRi','nNJcGSoqlX3cGSomWQNcHG','W7/dRbXxhW','F8o5uCo0FdRcS3GpWQq','W5BdGZfug8o4smoaW73cGW','qCkXamkllWhdQSkSyHi','rCkZg8oOmuG','rIJdPmkuW55e','wSoLb8k3W4S','W7pdP1O','WOJcGCo7WQ3dKG','dmkmtq','W4NdU8kUygJcPSk1oNq','yCkjW7NdRmkR','wXhcIG','W7LbW5FdVYi','4P+TpEwiQEwiR+AjQEwkU8kBW5m','W4RdQCoDW6BdJmkrW7hdNSoOWQ4','C8oxWQCTW4m','j8kFwCkEW5u','WRG0W6KlWRdcGSkwWR9TpG','WOpcPXFdQCkQ','a8kei8kY','juJdLxT3','F8otaG','WOq3W7iWW6q','b8kQFa','i8o/v8o+C24','ncCMW50W','5lYb6lA8776Y5Psi5Roc5zgA55EF5lUJ55kX','aNldPKXD','W4hdP8odW6xdGCkNW63dMSouWQq','CmkiW5G','yutcGqSIWQBcKL/dGW','cmosmwz9','nmoahwa','WQnOWQrgW6tdM8kwW6mZDW','t8krWQfVcW','WP5vqCo+WOJcQG','4O2v77MXEEI0T+wpUmo7WPxcP+IoTUwpNEwlQa','k8oaf2C','WR9WEeuO','WPLtWOJdO2OyExVdHNW','5A6O5yMO5yUy5lMD5PE677Yp6ykv5yA2776j','E8kcWQDCca','4P2KW5/LVBNLIBZLI6/LI5FLTklOVzVLIlZMJzy','WPpdT8k7','BSkyr8o1','WRb6W78oWRFcHCoFWRDHja','W457W6pdTaC','cCkEwKe/cmk5WOjepG','m8okaW','DCokWPjxsG','oMNcNCotiG','FCovWPO','oNJcHSob','5lUi5lUc6lsl5y6W','fbi5W7iw','DLpcJW','ACoYxW','W5lcIG8','WP4JW44vW7zw','CZldQSonWR8','C8oqfCkxW5u','bxddKh9K','ifddHW','WOTmWROu','pHyGW6uGW7T4W7dcSmkj','tWdcJbtdKCk1WQ/cK8kY','DCo1WPu','W658W6pdOW','umkUgSor','CCoTxCowza','w8o+WQjIFCo/W5HQr8kv','WQPGW4ayWR7cGmoIWQ0','W47cHa89nsVdVG','vmoJmSk5W6NcMXi','4P+sDEAES+IcHUAUUUEIIowMR+EtMc4','WR4IWR3cSMZcUCkGWRTEW7pcUW','W75Xpq','W7GYWO9NWQ/cVCo4adC','WRfWFK0LEmoBWP/dPq','W4ymWRGeWQztgSkQW5TD','yEkmV++4LmoR5yIw5yM/56kU772u','W6b6W6O','gSokax1w','kCkPxSkPW5C','WPL+AuGm','dsLWW4HYWPy6WR7dK8k3','W58Bk2jGW47dQSkpBa','WP48W6u','W7j5W5y','WOvaW4JdQNPFDxRdOJC','4P66WRpLViVLI4/LI5BLIjBLTipOVQZLI6VMJ4C','n8oefgnJvZlcMG3cSG','nCkVxSkIBG','WONcTI/dVSkSxa','nSo7W6zZkG','W57dNsVdUW0','wSoYf8kPW6q','fCkogG','WQlcKCo/WPRdHHZcUHpcNIe','ySkYoCk1W7i','W5rqW4VcUd8','WP7cKq/dQ8kY','W7aJW6aXWRy','cqJdIahcI8kUW7xcICo5W6G','yCovWO5q','W5ldQJhdRaNdPmkfD8kyWQ8','WQeSgmo4WQddTdz6tre','WQrYr0av','W48uW7uyWP8','iCkhhmkHbW','WRrLEfyZjSkKW5NdQta','CHD3W4lcTW','WP8YW7axW6bgnW3dPG','WRddHSkQW4XX','FCokWPih','aCkvaSk+n8k7','mSowaW','WOikuSouWP7cO1a','W4xdQCouW5ddISkr','xaFdHSoRWQhcRKRcL8oIya','pL7dNx8','o0RdMK5PWPK','fSkuhHNcOZlcKxG','WPFdT8o5W5KI','hxBcNmoumZFc
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