faker3/jd_beanSign.js

15 lines
24 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-06-29 17:05:17 +08:00
活动名称领京豆签到
环境变量jd_beanSign_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_beanSign_notify // 是否推送通知true/false默认不推送
jd_beanSign_pinFilter // 账号pin过滤多个用@进行分割
2024-06-28 15:38:28 +08:00
cron:15 0,16 * * *
*/
const $ = new Env('领京豆签到')
2024-07-30 16:37:38 +08:00
function _0x5e75(){const _0x4da501=['WR7cSSoGjCkdC8k3buVdVx0','WO0HW752gc4','4PI8EUIfS+wTNEs4IUI8SEIGJ+MwMUMzREAxH+MwRoITVoE8J+MvK+IUMG','uSoHWOJdVxO','W6OlW7pdGGKaDCk2gZtdLCoeWRdcPrmoWP4I','W4vnW7ZdUSoWrfRcOSk4sCooW43cRmkuxCkQWRlcTSo9zmoo','WPjlW7ZdRSkIWQpdTIVdK1PIh3y','W6G7W6LqwYe+iwv+WRZcMmoGyKDAW4hcLCowd1NcSHZcMHORDmo3WPyDW7ueWOJdGmkan04GW6ddVComW6mwW5hdGCkJeConWOXUWOJdG1xdP3DjWP56AN3dO0PWeWBcImokySoHW4mgidJdG2BcSmkiW4/dP8kwW7JcLIxcNSk9h8olxCoefmkRWQD1x8o4W50xfSk5W6j2x8ozpSkwuSkto3ZdI17cQ3DPiI9jmmkYWPaLW5lcIa7cNrdcNYZcO09kt0aplSogbCkcELBcKSoJqCorhIPwh3JdVmkHASoFW4WJEaWYW6ddT8o6W5RdISoIW7qEt8kkfMuNWQhdHmodWQCeW51TWONcRq5hWOjiuCkXrSkBWR99WP5BWRBcU8octmoCeHbDeZddKCovW6GLE3hcSmoVAvvYWONcRJzJfSo5ACoFlNnEWPJdQ0BdLmoFfmoYW41xA8oJxmo8da8AnNadgIbmWRHbW6FdHSkPySo5vfCph8obW7uRWO0rgmkQWPKrWR/dSCkrv8kcWP7dUMe+W53cUmo0W7z2lX7dSSk4WR09WOZcMmkQbsilASkexSkmW7FcLCk+WOZcT8o1W7FdNrNcNMTNW7FcSYZcVv8nw0RdJaKciGxdU0P8x8kCW43dKSoVWR0uW5qZW6NdS8o4W6W6W5dcImoHmuCMW7iklCkOW47cJmkrW7bzWR0RySkMWOS6a8knvCkWWOhdJgD7Ab5KW6xdPMZcRNaGdx02W7/cOSowW5xcO8oKWQ1PW5m8W7hdS8kSW7mOWRxcNSk7W7FdQcnXaCoubhNcQhFdISofC1VcSIJdM8odWOKMW6xcQuVdMCkYz2RcSSkKcmkSeSkLaJFcKK/cOvHMaSobWOP4aaT2W5aUWOH7W79QWPxcQmk1r8kbW5BcLgz1W6/cHCk4W4u6W6GTitJcK10AW48acmkaECkYWPtdMwODfWddGmo4z0ldSGSCW78TW7lcNSkZWPJdVu5MWPxdTIqfbKdcNSo2hCokWO3cPayidxTXWRRdUSotW6pcPSoNW6CMWQZcPCk9dt7dPxztWR8CW4etWRNcIKvT','qwRdISkOWQi','W63dUSkxWRJdVITFW4NcQYf5W7PV','WRqjW4jEWOi','e8kzW4ldJG','WPODWQNcRG','BSkVF2xdHCogymodWPbvtIzSbMNcThldH1JcP1hdGHD3p2pdSG','WOOrdZi','b3RcV8keWQBdK8olWQhdLmotWOFcHCogbrSZgCoyWO4wW5C','gmkuWPq6W4e','aa49W4tdQ8kmqGDZW7pdKW','bv3cTmoLnSobqCoPWQ9sAeFdL8oKECo0WQe','W6WkW4ldHXGj','DCoMpa','W7eZW7C','WPtdJexcUs8h','W4DhW74','joIVSEAZTEwKI+I0Vmov4P2sfG','c3dcTCkmWPhdL8oi','W6tdOLOgW6/dQComWOFdRSkzWRhdUW','W59bW63dSSoh','WPNdKfe','8kUPN0S','eSkLfCoIAtFdNIJcIIldLCoAWPe','yvu/','W4WLn3y','dSoepCoVWOa','5lIR6lonW7tWMikg','W6NcVGhcReL2W7RdO8kmWOL9ESo0bCoVWOW','uCoyW7VdGCkGfK/cOG','amowlG','b8knW4xdHW','yCogwY8/itaYWQHjW6Po','W77cTWu8W67cQCo6','DSoTpSojWPNdMq','tCo/sW','WRq4xCoxuZddQ8ogmCoDsce','u1K3xWVdKmoLW4rgya','W64kW5VdTr8eACkKbtldICo/','gqvJfG','WO3cS8kevL5gWPa2xuxdPmkDWPFcLmoO','56sMWPlOVQBOOiJPLPZPMOJMLy7PLRm','6lwN5y6V5PEK5PAY','W7a/W7FcOdFcIq','WPlcTCke','W7ZcPhBcQmoe','hbNcHKO2q8kPta','buJcO8kzWQOK','W7S/W63cHcZcJIGhWPXNWRlcRHqV','cGv+aW','W43dIHS','W6tcVYRcH0j7W73dNSkaWQ18s8oPdSo1WP3cPWldKxm','x2FdOCkMWQjrWQ1NW4JcHHm3W7WAW4BdOXZcSIOAWQe','WQ/cPmojW6pcQa','evFcSCo8BG','6lE65yY/6l2N5RMKW7C4na','W74/W7JcQqlcLIiCWP0','WOBdILtcHceDnvG','W64oW4hdHq','m8o1AexdHCoEF8kj','5lIS6lcPWOZWT5gA','W4ytWR0','WO0RW7C','fCkLhSoJzdFdNW/cKZddRCogWOa','y2pdG3D8WOBcVvCNWOW','WP/dM2NcSI0in27cO21wW5eVdSoQsZqf','W5RdImossCk3y8kI','cGvJdK/cRmkVWPGjoq','W6FcTay','a8k7oeO','ECkmlSkZuqBdV8oJfSkC','W5BcRWTNW6T2aSovb8k3','W6RdM0hdGSk0','f8k8WQtdGvGHqqK','WPqrW6xcOa','ESkbnCkXwq','baqNW6FdSmkz','ASonxYy4rbSlWPvoW44','44gr6lw+5y+Z','WRufW4b/WQzR','5RAh5yU45ysH5y+97726W7jcnoMLHoMHUmof5lM05lIM56sR5P+QW43NR5hLI6u','WOyHW6rDdtiVW7OfWQ/dLCo1xHvqW4Dip8oH','W5NdJmomxW','rexdKH5Wfmo8tqnWWQjjW7K','jCo4y2u','mSoLENtdJCoE','WPxcI0S','4P+mB+AET+EFHEIVN+AXMte','dSkHzau','uSoYovfcWOVcKCoOcCkegCk5','DmkoB8oov8kyACop','W7iAW4ldPqif','lSoLB3xdVSopFSkdWRrvBYXVhL/cOL7dH1JcIg0','WQddTb/cGwr1W7ZdPSkaWQ8','z8kioCk2BHddLSoTfmkyl8k3qmoEWRRdGwuPyrVdQW','W4xdHaHI','WOpcRH8WphxdLCkP','grJcGG','cSoapCoaWOCTWPFcP8oJy3PrwZe','W6WaW4S','WQFINjFdTa','W581W7FcSYBcJZDdWQ1iWQpcPW','W4ZdRSkPx25nWOOd','wveYuqldNSkEWPWyebqF','WOmreJ0','cCoepCoT','W4v/WPi','sSoNWPS','W5/cRWH/W71Ga8o1f8kZW7xdNq','smo+x8k1l3e','A3CU','dGu6W6tdQ8kk','pa5SwqSkWQfkW7e','W4D1WOldQSktW61Qq8kjiGtcJW','W6nrpdFcGWFdMmkA','lmoLzhBdMmoc','W4HhW7FdQSolt0lcPmk6vComW5xcOSknua','5lID6lkmx/cvSRG','dKJcUG','WORcQmkwxq','W4T1WPtdKCkJW6DTBmkk','5lII6lkDvFggGje','f8k+W4VcPs9ujaxdTN/dQgvg','WOivW6dcTmkawta','WPhdKfJcTq','hXJcJeG','6ykA556Q5OY16ycHeJTk','W7pORPVMS67LPlROT6y54P6Gn+AwJ+wsUUw4MoAvHoAoGG','tCodW4tdKSkCfxNdJ8kLW6ddSmkwWOfvW4uRWQlcKLNdVMpcPxy','CmkbDa','W73ORldMSARLKA3LUP0f','aGu/','WPyvWQtcO8kFhaRdSmoZeq','W6BdUmkNDmoxta','tCkFW4C','D3pdLfL8WOBcVq','W4y4AvybW51HsCkrq8otWQKhW
2024-06-28 15:38:28 +08:00
// prettier-ignore
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