faker3/jd_plantBean_friend.js

13 lines
80 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称种豆得豆收取好友营养液
活动入口APP-我的-种豆得豆
cron:1 8,14,20 * * *
*/
const $ = new Env('种豆得豆收取好友营养液')
function x0X7SZ(){}var h_HlZqo=Object['defineProperty'],bKOlBJM,JqJDLwH,LdKz1D8,JLA6mGO,oVI366Y,IPLJ5Q,yDizTu,HKU6F6L,R0KLc2,Oejwoc,dD2xOz,iDBZs4m,jhLxxy,dqXhcl,_KZJ9Gl,Qn17bem;function kxYBG5(x0X7SZ){return bKOlBJM[x0X7SZ>-0x57?x0X7SZ<-0x57?x0X7SZ-0x5a:x0X7SZ+0x56:x0X7SZ+0x5c]}bKOlBJM=I_Nxkz5();function ScEPXw(x0X7SZ,h_HlZqo){return JqJDLwH.call(null,x0X7SZ,'\u006c\u0065\u006e\u0067\u0074\u0068',{value:h_HlZqo,configurable:!0x0})}x0X7SZ(JqJDLwH=Object.defineProperty,LdKz1D8=EiVNDg((x0X7SZ,h_HlZqo)=>{return h_HlZqo(x0X7SZ())},0x2)(lzxg9U,qKEmAf));var q1SQUk8=[],YTNk6y=[xEEGKJ(0x0),xEEGKJ(kxYBG5(-0x4d)),xEEGKJ(0x2),xEEGKJ(kxYBG5(-0x41)),xEEGKJ(0x4),xEEGKJ(kxYBG5(-0x40)),xEEGKJ(kxYBG5(-0x44)),xEEGKJ(0x7),xEEGKJ(kxYBG5(-0x36)),xEEGKJ(kxYBG5(-0x34)),'+9|%v',xEEGKJ(kxYBG5(-0x33)),xEEGKJ(0xb),xEEGKJ(kxYBG5(-0x46)),xEEGKJ(0xd),xEEGKJ(0xe),xEEGKJ(kxYBG5(-0x47)),xEEGKJ(0x10),xEEGKJ(0xd),xEEGKJ(0x11),xEEGKJ(kxYBG5(-0x42)),xEEGKJ(kxYBG5(-0x31)),xEEGKJ(kxYBG5(-0x9)),xEEGKJ(0x15),'&3WS|tm',xEEGKJ(0x16),xEEGK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G5(-0x52)),xEEGKJ(0x30),xEEGKJ(0x78),xEEGKJ(kxYBG5(-0x4f)),xEEGKJ(0x65),xEEGKJ(0x10),xEEGKJ(kxYBG5(-0x55)),xEEGKJ(0x66),xEEGKJ(0x67),xEEGKJ(0x7a),xEEGKJ(kxYBG5(0x26)),xEEGKJ(kxYBG5(-0x51)),xEEGKJ(0x3b),xEEGKJ(kxYBG5(-0x10)),xEEGKJ(0x3d),xEEGKJ(kxYBG5(-0x56)),xEEGKJ(0x2e),'AWp25~&d*|Ct`OHVuH',xEEGKJ(kxYBG5(-0x3b)),xEEGKJ(0x7c),xEEGKJ(kxYBG5(-0x3a)),xEEGKJ(0x65),xEEGKJ(kxYBG5(-0x56)),xEEGKJ(kxYBG5(-0x55)),xEEGKJ(0x66),xEEGKJ(0x77),xEEGKJ(kxYBG5(-0x52)),xEEGKJ(0x7e),xEEGKJ(0x30),xEEGKJ(0x7f),xEEGKJ(kxYBG5(-0x4b)),xEEGKJ(0x10),xEEGKJ(kxYBG5(0x2c)),xEEGKJ(0x82),xEEGKJ(0x83),xEEGKJ(0x84),xEEGKJ(kxYBG5(0x2d)),xEEGKJ(0x86),kxYBG5(-0x50),xEEGKJ(0x87),xEEGKJ(0x88),xEEGKJ(0x89),'2lO4C2vVJ|USVM&j',xEEGKJ(0x8a),xEEGKJ(kxYBG5(0x2e)),xEEGKJ(0x8c),xEEGKJ(kxYBG5(0x22)),xEEGKJ(0x8e),xEEGKJ(kxYBG5(0x2f)),xEEGKJ(0x90),xEEGKJ(0x91),xEEGKJ(kxYBG5(-0x2)),'\x48\x2e\x6a\x3d\x3b\x56\x5e\x7c\x50',xEEGKJ(0x93),'\u0071\u0040\u007b\u0021\u007c\u005e\u0059
// 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