faker3/jd_redRain.js

11 lines
98 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
红包雨
cron "7 7 7 7 *" jd_redRain.js
*/
const $ = new Env('红包雨');
const _0x5d42=['w6nDphQ7LA==','w5wqM8ORwq8=','w4LDu8ODWwo=','WsKQLAnCh1Q9VsOb','w6BxHHAW','wr40w4hoJw==','w7vCgMOcCxk=','w7ZLecKJSw==','w6sCScKpw6U=','FWvDlcOqw4Y=','wpZqKAMD','BMOKL8ORw4c=','WmXDqcOpw7M=','BmLDp8Osw7U=','wpNhwoLCq8OQw4k=','w6jCrMOuMiI=','TxXDiiJT','E0LDi8O/w7A=','w659w4rDv00=','w7wQWcKGw50=','w6zDuMOAGz0=','w6/Di8O0IDs=','NnTDlMOHw5Q=','w7RGwpo=','NmV+w6TCqQ==','w6IODMOzwrs=','T3rDnk3Dmg==','wpnCvMKFKsOb','w7tCFFMq','DXPDpMOjw6g=','w4bCnQpJMg==','LcKKIMKZwpg=','w7bDvcOXBCM=','wqTCg8K4L8Ol','GsKjwr7CssOWY3Q=','wpHDgsK3fT4=','wrF3woHCgsOW','w7vDi8OjYDs=','HsKDwqLCssOG','MsKfwoLDp8OA','wp7CiAZ5Xw==','LcKrwqzDvMOT','w51WMmAP','KcOPVFDDvg==','U2zDl8OWw7Y=','6K+Z5Yqf6Ziq5oax5Z+awrJAw4Ifeei8rOWHt+ajvuS9rOaVl+WGg+Wug1TluororLHpgLfovZrohajmnpnljZnoj53ljK3CqsOLLcKNUyU=','TTVD','WkHDqFfDkQ==','KFV+w7nCoA==','wpt5w6PDgcOk','LsOAwoVhw4A=','NcO3D8Odw7U=','BV/Dn8O1w7k=','FH9Uw4zCsQ==','NHNd','wrLClMKvDcOI','D01zw63ChA==','w5tyw6HDlE0=','wrRXUsOGVw==','w5M5UsKrw4s=','wovDs8K3QcKr','TDdVwpJs','NMK3w5sow6o=','GsKWwp7DgMOH','OcOuT0DDnQ==','GcKBwr7DpcOU','csKLHcKM','w7TDqsOlbDo=','wo7CjiNxeQ==','w6DCssKtwoXDhg==','OV5tw7LCrQ==','MMO5wpVHw7g=','wq8UOcKY','w6UYM8ORwpw=','EWPDjMOy','wp9xwp7CoMO0','wotlcMOJXw==','wpDChUQ=','CE51w4PCs1sHw6s4w44Qw5rDpQ==','XyHDpWfCqA==','MiBTNMKV','woYFTWvDmQ==','wqLCksKpNsOu','ZQbDjcOXwrQ=','wqYyw7lTFTMsw4bCp8O2QGEYFMKRFUjDkMK6wrLCnxfDkzVww7/Dr8KBwr4JPBVZw4HCrsKew65LwpHDmMOYRjg=','44Ki5o6p56WM44Kt6KyB5YaP6IyY5Y6J5Lqf5Lq56La05Y6R5LmCZl0rw5XDscOgXuebheaPpuS/pueWm8OmfMOmJBTDo+ebseS5kuS5j+etnuWLvuiMhuWPnQ==','YA3CucKgYg==','wpjCmCVNX8K7','wobClixsQsKk','McOcBMOvw44=','awfCosKDQw==','HMOVYQ==','w7JIFHQHbsOMw4dORyQhV8KSw4dc','wpzCnh9qYw==','ZMK3YxnCsA==','wozCk8O8AiHCnhZIEB7CuUxxAcOpbypgOMOuw6FkTxrvvJvorLfmorPmn5znvLfotKnphILorYA=','w5xqwoIZwrw=','w7V2wqTDtw==','w5vCisKvwqrDpQ==','fgN7','SyR2wqlb','wpwkwr5VdQ==','Rw7DjMOK','w5LCvcKlwpLDrw==','w5rDuMOOdj4=','b8KKXgfCqw==','GcOMdXrDgw==','wplMw7TDhcOq','F3hgw7DCtg==','BF3DtcOlw7M=','wp/Cp8K3CMO5','44CZ5o6856aw44Cn6Kyw5Yex6I+z5YyB5LqW5Lif6LaG5Y+b5LmsSiRZESbDomPnmp7mj6/kv4jnl54Rw6vChcOYw4/CnuebguS7puS7ruevheWJh+iPneWPiw==','SxzDiUfCkA==','wqnCgSdoWA==','dMK/cDrCvg==','I8K/BMKhwrY=','EMKqwrw=','dsKwI8KEwpI=','wokfRW7DkA==','K8KLNMK7wq8=','wq3Dj8KBaQE=','L8OowoVow6g=','w7YbVsKbw55j','wp7CnDhd','TmbDq8OPw5o=','VChI','w4M7IcOowo4=','XRTDl8OXwpzCl0bDnCw=','wqV8wonCjU4=','w5/DhTQ=','M8K1wqHDocO6','WxvCocOdw7U=','w4AANMOWwrw=','wohZXMOUYw==','wo8PBMKpwos=','FjdGJsKl','YghOwooW','PMKWOcKm','dnXDicOJw5M=','cXHDjw==','VXvDmA7CrQ==','ZyJMw4d4','acK8Sw7Cvg==','w5TCjcOICSQ=','w5rDgBccNg==','w5DDsDskHQ==','NcKBNw==','wq8yBMKwwoE=','wqEUQGLDug==','wqk6wpV1Tg==','dCzDosOXwrs=','w5NhwqLDqMOpGVzCmMK5','fQ57wrtR','wpocw5psAA==','CQ9xF8Ky','wqXDrMKsdTo=','w55qwo4DwrA=','FsKMH8KKwpY=','wq0YwoBcWw==','w5Viw5jDp2I=','SMKnDsKNwr0=','w6tUNXc5','fQd2wpUf','wp7CoVxScQ==','FlXDlcO/w5I=','wr8EwqVQeg==','w5EXAcO2wr4=','wox2wpvCpg==','OsKWJ8KRwp4=','wrXDhsKuXQw=','McKowq3DnsO6','w7Fvwp0CwpQ=','wrTDjsKuZMK6woLDvsOQw4ApwpI=','ZQnDpFHCs8OR','w5FRwoclwpo=','wqvCrUZ+cA==','ehDDjsOUwoM=','w4cJe8KIw4k=','csO/wrFWw5gnwq/CtsOOJWvDqsOJU8OhFBMtNHMBcsKPw6TCj8O+DsKGcEpbw6cdw5jDgngWw55LJmrCsGAdwpk/w4Q6w67DtMKKCMO3wrNddMKYw4Egw7DDj8Oowr1owrl9fcO3B8OeE8OLwozDh8OYwr3Dn2nCulnCg3zDnxfCrRzDu8KWY3Aaw73Cv8OFw4pdw70Ywq5dw6/CpmnCgSXDi8KhBMKzw6t5JcK5w7QywoTCusK5w4E0wpJ3EipZW8O/AcOAw6JNwosOwoMJw7TDu8O3wofCqcOxwqxxwptDZcKvw5s7w7PCqADCscK7wpUVesOqPMKxJcKPCGFnw5LDksOrCgfCgUEawrLCu8OJwo/Dm2bDqlhKwqJSZMKaYsK2X8O0wo5UEFxMWwTCmMOkw4pZw43DvcKeMcKzcsKEOcOabcOyN3s=','wqzDjMK6VcKm','fg/CssKf','ZsKCWgvChw==','wotjdcO5YQ==','w4XDpcOzCz8=','wrXDkMKIQyQ=','wooSw59BFA==','ZMKoNsKJwpE=','w7fDt8OmWAo=','w5nCmcKEwoXDizU=','wqFmw53Dg8OP','L8OeK8OPw4w=','cMKcXxLCrA==','JcOHL8Otw7s=','BHTDlsOy','OMKkw5Mbw5E=','w45/wpcgwq4=','w6pdClUr','dDZAwp0n','c2XDigjCnQ==','UmbDmA7CpA==','wq87FcKrwq4=','RyXDlcOqwpo=','w4XClcKzwofDsw==','ewRow4NowosSw7XDksKow78RwrfChsKSW3gdwo8=','wrjCpcKJO8OP','BMOHF8Osw7s=','bALDrsOwwpc=','w50LH8Obwp/CqQ==','w47ClsO7Dws=','w5DDu8OCJR4=','w5RjwoYkwr8=','wqXDhsKRSiM=','w53Cji9gLQ==','bEzDmR7CmiE=','wpxawoXCpHo='
// 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