faker3/jd_plantBean_friend.js

13 lines
78 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称种豆得豆收取好友营养液
活动入口APP-我的-种豆得豆
cron:1 8,14,20 * * *
*/
const $ = new Env('种豆得豆收取好友营养液')
2024-12-11 16:57:36 +08:00
function NC37KUM(){}var vTtnM0g=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],ZecTc9,cAHUAr9,_i8j53z,xM8OSc,q6SAtC,lN3YKTA,OUqBGjz,n5cPa1,_wRI7FD,q9WytXY,kAe_Gc,e49t4W,_4i7QOq,gT5Reg;function PHDlAkw(NC37KUM){return ZecTc9[NC37KUM<-0x55?NC37KUM-0x17:NC37KUM+0x54]}NC37KUM(ZecTc9=wfQlYX(),cAHUAr9=J7WiQQX((NC37KUM,vTtnM0g)=>{return vTtnM0g(NC37KUM())},0x2)(ucPfpk3,B4_ND5));var enPIQMK=[],nCd4waz=['\u0030\u005a\u006b\u0046\u0031\u0079\u003f\u0056','\u006a\u0029\u004e\u003f\u004d\u0035\u0047\u0024','\u0057\u007b\u004d\u0052\u0047','\x50\x76\x54\x52','\x4f\x2f\x4e\x4a\x63\x61\x7a\x49\x23\x4b\x54\x24\x36\x39\x5a\x6e\x54\x30\x3e\x3c\x55\x36\x5f\x55',oENLSb(0x0),oENLSb(0x1),'F)Xf2','\u006d\u0041\u0049\u0070','vibp<9=U',oENLSb(PHDlAkw(-0x3a)),oENLSb(0x3),'\u0050\u0055\u0075\u0022\u0051\u004d\u002b\u0023\u006c\u0032\u0028\u005a\u0074\u0051\u0039\u0037\u0022\u0043\u007d\u0023\u006c\u0056\u0049\u0074\u0053\u006f\u003c\u0046\u003f\u0076\u004d\u002c\u0029\u003c\u0038\u006b\u0053','\x3e\x63\x3a\x39\x67',oENLSb(PHDlAkw(-0x54)),'\u0055\u0041\u004d\u003c\u0053','\x2a\x29\x7e\x52\x44\x49\x65\x64\x6e\x43\x79\x60\x69\x73\x34\x65\x63\x6d','\x69\x30\x75\x79\x4d\x7c\x63\x55',PHDlAkw(-0x4e),oENLSb(0x5),oENLSb(0x6),'w)BoFfw[s}Z','\x4e\x79\x5d\x21\x29\x3a\x53\x45\x45\x58','\x2a\x29\x42\x6f\x46\x66\x77\x5b\x73\x7d\x50\x6b\x69\x73\x69\x65\x52\x6d',oENLSb(PHDlAkw(-0x43)),oENLSb(0x8),'\u0063\u0029\u005f\u006f\u0062\u0042\u0044\u0077\u0072',oENLSb(PHDlAkw(-0x40)),'\u0062\u0069\u0028\u0061\u0031\u003a\u0053\u0045\u0045\u0058','MAcpG','\x2e\x76\x7b\x3c\x66\x37\x57\x33\x79\x5b\x28\x48\x65\x41','\x74\x75\x2a\x64\x50\x60\x67\x4e',oENLSb(0xa),'\x47\x29\x49\x70\x64\x42\x32\x77\x72',oENLSb(PHDlAkw(-0x37)),oENLSb(0xc),'2_1Ri','\u007a\u006a\u0042\u006f\u0054\u0060\u005e','N0yknI=U','\x76\x69\x71\x3c\x4b\x61\x6d\x21\x59',oENLSb(0xd),oENLSb(PHDlAkw(-0x3e)),'S06pw9zIr',PHDlAkw(-0x4c),oENLSb(0xf),'\u0071\u003c\u0063\u0070\u0035\u0022\u006b\u0037\u0072','\u0062\u0022\u0036\u0070\u0035\u0022\u006b\u0037\u0072',oENLSb(0x10),oENLSb(0x11),oENLSb(PHDlAkw(-0x35)),oENLSb(PHDlAkw(-0x52)),PHDlAkw(-0x51),'\u0073\u0076\u003e\u004a\u0021\u007a\u0077\u0077\u0069\u004b','\x5b\x5f\x54\x67\x28\x49\x21\x62\x29\x26\x42\x6f\x33\x63\x66\x3f\x57\x4d','\u004d\u0041\u0063\u0070\u0047',oENLSb(PHDlAkw(-0x47)),oENLSb(PHDlAkw(-0x33)),oENLSb(PHDlAkw(-0x54)),oENLSb(PHDlAkw(-0x4f)),'\x2f\x31\x57\x5d\x6e\x7d\x63\x55\x61\x3c\x72\x46\x7a\x69\x7b\x2a\x24\x41',oENLSb(0x16),'*)~RY|bwr','\x25\x39\x28\x38\x6b\x4c\x3f\x4f\x3f\x46\x35\x36\x62\x5a\x56\x61\x55\x3b\x5a\x5f\x34','\x26\x76\x55\x7b\x33\x29\x53\x55\x3d\x40\x24\x62\x2c\x49\x49\x61',oENLSb(PHDlAkw(-0x31)),'\u0025\u0039\u0028\u0038\u007c\u0047\u004b\u0060\u0067\u0062',oENLSb(PHDlAkw(-0x46)),PHDlAkw(-0x53),'\u0075\u0075\u0045\u007a\u0074\u0021\u0077\u006e\u005b\u006b\u003b\u0057\u0069\u004b\u0034',PHDlAkw(-0x53),'\x3e\x5f\x76\x39',oENLSb(PHDlAkw(-0x30)),'\x4d\x4d\x31\x53\x3b\x57\x44\x3c\x7d\x40\x41\x4b\x6e\x2c\x64',PHDlAkw(-0x4a),oENLSb(PHDlAkw(-0x2f)),'\x79\x69\x7e\x52\x77\x39\x5e',oENLSb(PHDlAkw(-0x54)),oENLSb(0xf),'\u004e\u0030\u004a\u0070','\u003b\u004e\u0028\u0038\u004f\u0021\u0030',oENLSb(PHDlAkw(-0x52)),PHDlAkw(-0x51),'\x73\x76\x3e\x4a\x21\x7a\x77\x77\x69\x4b','\u0029\u005f\u0072\u003a\u006b\u0039\u005d\u0063\u003d\u007b\u0068\u0045\u0066\u0073\u0060\u0053\u0070\u006d','\u0068\u005f\u005f\u0021\u004b\u0061\u0066\u0024\u004e\u0071\u002e\u0043\u0072\u0056',oENLSb(0x5),'\x4a\x41\x5f\x6f\x71\x4c\x45\x31\x34\x58\x48\x24\x3e\x38\x6d\x44\x4b\x6d','\x69\x5f\x46\x3a\x68\x7c\x6c\x49\x30\x75\x4c\x32\x77\x56\x2e\x4e',')_bp:zHw@x;=oA',oENLSb(PHDlAkw(-0x54)),oENLSb(PHDlAkw(-0x2e)),'\x74\x6a\x3e\x3c\x63',oENLSb(PHDlAkw(-0x50)),oENLSb(0x1c),oENLSb(PHDlAkw(-0x54)),'\u0079\u0069\u007e\u0052\u0077\u0039\u005e','sv>J!zwwiK',oENLSb(0x1d),oENLSb(PHDlAkw(-0x34)),oENLSb(PHDlAkw(-0x50)),'i0bpw9@c={i6)Z3v',oENLSb(PHDlAkw(-0x2d)),oENLSb(0x4),oENLSb(PHDlAkw(-0x4f)),PHDlAkw(-0x4d),oENLSb(PHDlAkw(-0x2b)),'\u0025\u007a\u0055\u0026',PHDlAkw(-0x4e),PHDlAkw(-0x4d),oENLSb(0x20),PHDlAkw(-0x4c),oENLSb(PHDlAkw(-0x4f)),PHDlAkw(-0x4b),oENLSb(0x21),oENLSb(0x4),oE
2024-11-12 11:17:55 +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