faker3/jd_plantBean_help.js

18 lines
81 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称种豆得豆内部互助
活动入口APP-我的-种豆得豆
环境变量
jd_plantBean_codenum // 指定助力次数,不填默认助力最大次数(填写值大于最大助力次数则助力最大次数)
jd_plantBean_helpnum // 指定助力账号数,默认不启用,值为数字,代表前几账号助力,需自行设置变量
jd_plantBean_pin // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
jd_plantBean_notify // 是否推送通知true/false默认不推送
cron:40 4,17 * * *
*/
const $ = new Env('种豆得豆内部互助');
function EL41r8(){}var eNAQII=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],jlmx7fJ,wPWd3_,bYskLhe,F7rDos,MBLRFe,JPCCrPL,R6BOGk,mgIBMmz,Vz2E3D,kl_mm0H,bLiJ46c,O_LlQr,FnMS2_m,vX9QDj,xKnGHr,C3GQAT,oIJOp6,F2B02f;function l5g2SIc(EL41r8){return jlmx7fJ[EL41r8>0x87?EL41r8+0x1:EL41r8+0x40]}jlmx7fJ=cB5kfrH();function Vl3vKA(EL41r8,eNAQII){return wPWd3_.call(null,EL41r8,'length',{value:eNAQII,configurable:!0x0})}EL41r8(wPWd3_=Object.defineProperty,bYskLhe=QOWiSYA((EL41r8,eNAQII)=>{return eNAQII(EL41r8())},0x2)(XDteoH,dAnYnYH));var kNlmrHQ=[],AheYHYL=[mG24hR(0x0),mG24hR(0x1),mG24hR(0x2),mG24hR(l5g2SIc(-0x35)),mG24hR(0x4),mG24hR(l5g2SIc(-0x2e)),mG24hR(0x6),mG24hR(0x7),mG24hR(0x8),mG24hR(l5g2SIc(-0x23)),mG24hR(l5g2SIc(-0x1c)),mG24hR(0xb),mG24hR(l5g2SIc(-0x28)),mG24hR(l5g2SIc(-0x9)),mG24hR(0xe),mG24hR(l5g2SIc(-0x12)),mG24hR(l5g2SIc(-0x1d)),mG24hR(l5g2SIc(-0x14)),mG24hR(l5g2SIc(-0x25)),mG24hR(0x13),mG24hR(0x14),mG24hR(0x15),mG24hR(0x16),mG24hR(l5g2SIc(-0xb)),mG24hR(l5g2SIc(-0x40)),mG24hR(l5g2SIc(-0x3f)),mG24hR(0x1a),mG24hR(l5g2SIc(-0x3c)),mG24hR(l5g2SIc(-0x40)),mG24hR(l5g2SIc(-0x3f)),mG24hR(0x1c),mG24hR(0x1d),mG24hR(l5g2SIc(-0x3e)),mG24hR(0x14),mG24hR(0x1e),mG24hR(l5g2SIc(0x6f)),mG24hR(l5g2SIc(-0xa)),mG24hR(0x21),mG24hR(0x22),mG24hR(0x23),mG24hR(l5g2SIc(-0xd)),mG24hR(0x25),mG24hR(0x26),mG24hR(l5g2SIc(-0x7)),mG24hR(0x19),mG24hR(0x28),mG24hR(l5g2SIc(0x7c)),mG24hR(0x2a),mG24hR(0x2b),mG24hR(l5g2SIc(-0x8)),mG24hR(0x2d),mG24hR(0x2e),mG24hR(0x2f),mG24hR(0x30),mG24hR(0x31),mG24hR(l5g2SIc(-0x1)),mG24hR(l5g2SIc(0x13)),mG24hR(0x34),mG24hR(0x35),mG24hR(0x36),mG24hR(l5g2SIc(0x76)),mG24hR(0x38),mG24hR(0x39),mG24hR(0x3a),mG24hR(0x3b),mG24hR(l5g2SIc(-0x3e)),mG24hR(0x21),mG24hR(l5g2SIc(-0x39)),mG24hR(0x3d),mG24hR(0x3e),'\u002f\u0047\u0021\u007c\u003e\u007d\u006d\u005e',mG24hR(0x3f),'\x2e\x47\x33\x7c\x6b\x42\x76\x5e',mG24hR(l5g2SIc(0x14)),mG24hR(l5g2SIc(0x6e)),mG24hR(0x42),mG24hR(l5g2SIc(0xc)),mG24hR(0x44),mG24hR(0x45),mG24hR(l5g2SIc(0x16)),mG24hR(l5g2SIc(-0x3e)),mG24hR(l5g2SIc(-0x3d)),mG24hR(l5g2SIc(-0x3e)),mG24hR(l5g2SIc(-0x3d)),mG24hR(0x47),mG24hR(0x48),mG24hR(l5g2SIc(-0x3b)),mG24hR(0x1c),'kKS1/|TDDC',mG24hR(0x4a),mG24hR(l5g2SIc(0x17)),mG24hR(0x4c),mG24hR(0x4d),mG24hR(0x4e),mG24hR(0x19),mG24hR(l5g2SIc(-0x2f)),mG24hR(0x50),mG24hR(0x51),mG24hR(0x52),mG24hR(0x53),'\u006b\u004b\u0053\u0031\u002f\u007c\u0076\u005e',mG24hR(l5g2SIc(0x19)),mG24hR(0x55),mG24hR(l5g2SIc(0x23)),mG24hR(0x57),mG24hR(l5g2SIc(-0x16)),mG24hR(l5g2SIc(-0x3c)),mG24hR(0x59),mG24hR(l5g2SIc(-0x38)),mG24hR(0x5b),mG24hR(l5g2SIc(0x82)),mG24hR(l5g2SIc(0x27)),mG24hR(l5g2SIc(0x28)),mG24hR(0x5f),mG24hR(l5g2SIc(0x26)),mG24hR(0x61),mG24hR(0x62),mG24hR(0x63),mG24hR(0x64),mG24hR(0x65),mG24hR(l5g2SIc(0x6)),mG24hR(l5g2SIc(0x4)),mG24hR(l5g2SIc(0x1d)),mG24hR(l5g2SIc(-0xf)),mG24hR(l5g2SIc(0x2c)),mG24hR(l5g2SIc(0x2d)),mG24hR(0x6c),mG24hR(l5g2SIc(0x31)),mG24hR(l5g2SIc(0x2e)),mG24hR(l5g2SIc(0x29)),mG24hR(l5g2SIc(0x2b)),'L|=y&%^PBX_)+<',mG24hR(0x47),mG24hR(0x1c),mG24hR(l5g2SIc(0x2f)),mG24hR(l5g2SIc(-0x36)),mG24hR(0x72),mG24hR(0x73),mG24hR(0x74),mG24hR(l5g2SIc(-0x3e)),mG24hR(l5g2SIc(-0x3d)),mG24hR(0x75),'(?8fU?t@|]R9<P3',mG24hR(l5g2SIc(-0x3b)),mG24hR(l5g2SIc(-0x37)),mG24hR(l5g2SIc(-0x3a)),mG24hR(0x74),mG24hR(l5g2SIc(-0x3e)),mG24hR(l5g2SIc(-0x3d)),mG24hR(0x77),mG24hR(0x1a),mG24hR(0x49),mG24hR(0x78),mG24hR(l5g2SIc(-0x3a)),mG24hR(l5g2SIc(-0x39)),mG24hR(l5g2SIc(0x34)),mG24hR(0x7a),mG24hR(l5g2SIc(-0x3e)),mG24hR(0x21),mG24hR(0x77),mG24hR(l5g2SIc(0x10)),mG24hR(l5g2SIc(-0x38)),mG24hR(l5g2SIc(-0x3b)),mG24hR(l5g2SIc(-0x22)),mG24hR(0x7b),mG24hR(0x7c),mG24hR(0x7d),mG24hR(0x7e),mG24hR(0x1c),mG24hR(0x50),mG24hR(0x7f),mG24hR(l5g2SIc(-0x2a)),mG24hR(0x81),mG24hR(l5g2SIc(0xd)),mG24hR(0x83),mG24hR(l5g2SIc(-0x37)),mG24hR(0x84),mG24hR(l5g2SIc(0x1c)),mG24hR(l5g2SIc(0x1a)),mG24hR(0x87),mG24hR(0x88),mG24hR(0x89),mG24hR(0x8a),mG24hR(0x8b),mG24hR(0x8c),mG24hR(0x8d),mG24hR(l5g2SIc(0x2)),mG24hR(l5g2SIc(0x40)),'n1dX|eCw3',mG24hR(l5g2SIc(0x24)),mG24hR(l5g2SIc(0x43)),mG24hR(0x92),mG24hR(l5g2SIc(0x44)),mG24hR(0x94),mG24hR(0x95),mG24hR(0x96),mG24hR(l5g2SIc(0x45)),mG24hR(l5g2SIc(0x46)),mG24hR(0x99),mG24hR(0x9a),mG24hR(0
// 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