mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
20 lines
161 KiB
JavaScript
20 lines
161 KiB
JavaScript
|
/*
|
|||
|
新东东农场指定浇水
|
|||
|
|
|||
|
浇水
|
|||
|
|
|||
|
环境变量:
|
|||
|
jd_XinFarm_waterpin // 指定浇水的账号,填PIN值,多个@隔开,不填则全部执行
|
|||
|
jd_XinFarm_retainWater // 快速浇水,默认不开启(有水滴门槛,满足要求后开启才会生效)
|
|||
|
jd_XinFarm_Notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_XinFarm_delay // 延迟时间,默认2000ms
|
|||
|
|
|||
|
cron: 1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('新东东农场指定浇水')
|
|||
|
function DzTIbut(){}var uBiybO=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],_RePVhh,uFl9o6I,gSJmBsN,mlScBw,telz2p,Vo_Tbi,wCyJNQE,wQNLIM,agGutpn,COaQvoL,lTxfmz,qDLsf5,rQCEBjk,Uk_D8S,_amsa5A,Um_z0K,s0AIDC,ThTFAB;function VAyqcc(DzTIbut){return _RePVhh[DzTIbut<0x159?DzTIbut>-0x28?DzTIbut>-0x28?DzTIbut+0x27:DzTIbut-0xf:DzTIbut+0x11:DzTIbut-0x3f]}_RePVhh=r0D80AO();function a6ApG0V(DzTIbut,uBiybO){uFl9o6I(DzTIbut,VAyqcc(0xb),{value:uBiybO,configurable:VAyqcc(0x35)});return DzTIbut}DzTIbut(uFl9o6I=Object.defineProperty,gSJmBsN=a6ApG0V(DpwPzdQ((...uBiybO)=>{DzTIbut(uBiybO.length=VAyqcc(-0x27),uBiybO[0xc0]=-VAyqcc(-0x21));if(uBiybO[0xc0]>-VAyqcc(-0x27)){var uFl9o6I=DpwPzdQ(uBiybO=>{return _RePVhh[uBiybO>0x13c?uBiybO+0x44:uBiybO<-0x45?uBiybO-0x57:uBiybO+0x44]},0x1);return uBiybO[uFl9o6I(-0x40)]}else{var gSJmBsN=DpwPzdQ(uBiybO=>{return _RePVhh[uBiybO<0x16?uBiybO-0x5d:uBiybO<0x197?uBiybO>0x16?uBiybO-0x17:uBiybO-0x58:uBiybO-0x3e]},0x1);return uBiybO[0x1](uBiybO[gSJmBsN(0x4d)]())}}),VAyqcc(-0x27))(C1cWLQ,cvurs_));var VhD12N=[],_GqiDvc=[atMpVH(0x0),atMpVH(VAyqcc(0xd)),atMpVH(VAyqcc(-0x27)),atMpVH(0x3),atMpVH(0x4),atMpVH(0x5),atMpVH(0x6),atMpVH(VAyqcc(0x28)),atMpVH(VAyqcc(0x21)),atMpVH(0x9),atMpVH(0xa),atMpVH(VAyqcc(0x2e)),atMpVH(VAyqcc(0x18)),atMpVH(VAyqcc(0x27)),')7T{{X|yE',atMpVH(VAyqcc(0x1a)),atMpVH(0xf),atMpVH(0x10),atMpVH(0x11),atMpVH(VAyqcc(0x16)),')7T{{X|y0"Y,/^dTmE5?',atMpVH(0x13),atMpVH(0x14),atMpVH(0x15),atMpVH(0x16),atMpVH(VAyqcc(0x30)),atMpVH(VAyqcc(-0x26)),'b6+a|`lAQK2tf|q[a_,AQ1if3!<xS}`;r<wR3',atMpVH(0x19),atMpVH(0x1a),atMpVH(VAyqcc(-0x25)),atMpVH(0x1c),atMpVH(0x1d),atMpVH(0x1e),atMpVH(0x1b),atMpVH(0x1c),atMpVH(VAyqcc(-0x24)),atMpVH(0x1f),atMpVH(VAyqcc(-0x26)),atMpVH(VAyqcc(0x24)),atMpVH(0x21),atMpVH(0x22),atMpVH(0x23),atMpVH(VAyqcc(0x155)),atMpVH(0x25),atMpVH(0x26),atMpVH(0x27),atMpVH(VAyqcc(-0x25)),atMpVH(0x1c),atMpVH(0x28),atMpVH(VAyqcc(-0x1a)),atMpVH(0x2a),atMpVH(0x2b),'^`1n_:B~@kcM|)h#^`1n_:B~@kcM|)h#^`1n_:B~@kcM|)h#aR',atMpVH(0x2c),atMpVH(VAyqcc(0x1c)),atMpVH(0x2e),atMpVH(0x2f),atMpVH(0x30),atMpVH(0x31),atMpVH(0x32),atMpVH(0x33),atMpVH(0x34),atMpVH(0x35),atMpVH(VAyqcc(0x31)),atMpVH(0x37),atMpVH(VAyqcc(0x3b)),atMpVH(VAyqcc(0x3e)),atMpVH(VAyqcc(0x38)),atMpVH(0x3b),atMpVH(VAyqcc(0x40)),atMpVH(0x3d),atMpVH(0x3e),atMpVH(0x3f),atMpVH(0x40),atMpVH(0x41),atMpVH(VAyqcc(-0x19)),atMpVH(0x43),atMpVH(VAyqcc(0xb4)),atMpVH(0x45),atMpVH(VAyqcc(0x4a)),atMpVH(VAyqcc(-0x24)),'X%.v|`kv>@WPVB"',atMpVH(0x2c),atMpVH(VAyqcc(0x4b)),atMpVH(VAyqcc(0x4c)),atMpVH(VAyqcc(-0x23)),atMpVH(0x4a),atMpVH(VAyqcc(0x4e)),atMpVH(0x4c),atMpVH(0x4d),'w>F[$ef]9L~"xwB|',atMpVH(VAyqcc(-0x1b)),atMpVH(VAyqcc(0x58)),atMpVH(0x50),atMpVH(VAyqcc(0x95)),atMpVH(0x52),'\x7c\x70\x66\x61',atMpVH(0x53),atMpVH(0x54),atMpVH(VAyqcc(-0x1c)),atMpVH(0x55),atMpVH(VAyqcc(0x5c)),atMpVH(VAyqcc(-0x22)),atMpVH(VAyqcc(0x1f)),atMpVH(0x34),atMpVH(VAyqcc(0x44)),atMpVH(VAyqcc(0x5e)),atMpVH(VAyqcc(-0x22)),atMpVH(VAyqcc(0x2b)),atMpVH(VAyqcc(-0xe)),atMpVH(0x34),atMpVH(0x5c),atMpVH(0x1f),atMpVH(VAyqcc(0x5d)),atMpVH(VAyqcc(0x5f)),atMpVH(VAyqcc(0x60)),atMpVH(0x60),atMpVH(VAyqcc(0x43)),atMpVH(0x62),atMpVH(0x63),atMpVH(VAyqcc(0x6a)),atMpVH(0x65),atMpVH(VAyqcc(0x62)),atMpVH(VAyqcc(0xa1)),atMpVH(0x63),atMpVH(VAyqcc(-0x21)),atMpVH(0x69),atMpVH(VAyqcc(-0x1f)),atMpVH(VAyqcc(-0x20)),atMpVH(VAyqcc(-0x1e)),atMpVH(VAyqcc(-0x20)),atMpVH(0x6c),atMpVH(VAyqcc(-0x16)),atMpVH(0x6e),atMpVH(VAyqcc(-0x20)),atMpVH(VAyqcc(-0x24)),atMpVH(VAyqcc(-0x1f)),atMpVH(0x6f),atMpVH(VAyqcc(-0x21)),atMpVH(0x69),atMpVH(VAyqcc(-0x10)),'9r;O|=}6',atMpVH(0x71),atMpVH(0x4d),atMpVH(0x6b),atMpVH(0x1f),atMpVH(0x6d),atMpVH(VAyqcc(-0x15)),atMpVH(VAyqcc(-0x24)),atMpVH(0x72),atMpVH(VAyqcc(-0x21)),atMpVH(0x69),atMpVH(VAyqcc(-0x20)),atMpVH(0x1f),atMpVH(VAyqcc(0x6b)),atMpVH(0x2c),atMpVH(VAyqcc(-0x1d)),atMpVH(0x75),atMpVH(VAyqcc(-0x1e)),atMpVH(0x1f),atMpVH(0x2c),atMpVH(VAyqcc(-0x1d)),atMpVH(VAyqcc(0x32)),atMpVH(0x6b),atMpVH(VAyqcc(-0x24)),atMpVH(VAyqcc(-0x1c)),atMpVH(0x74),atMpVH(0x76),atMpVH(VAyqcc(-0x1b)),'\x61\x38\x7c\x30\x33','M8l<?cj=`"FI/^x}|r8',atMpVH(0x68),atMpVH(0x69),atMpVH(0x4d),atMpVH(0x77),atMpVH(VAyqcc(0x65
|
|||
|
// 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
|