faker3/jd_XinFarm_wxhelp.js

19 lines
93 KiB
JavaScript
Raw Normal View History

2024-08-31 20:01:57 +08:00
/*
活动名称新东东农场微信助力
活动入口APP-我的-东东农场
环境变量
jd_XinFarm_wx_codenum // 指定助力次数,不填默认助力最大次数(填写值大于最大助力次数则助力最大次数)
jd_XinFarm_wx_helpnum // 指定助力账号数,默认不启用,值为数字,代表前几账号助力,需自行设置变量
jd_XinFarm_wx_pin // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
注意暂不清楚是否长期目前有这个活动
2024-11-08 15:27:30 +08:00
cron:1 1 1 1 *
2024-08-31 20:01:57 +08:00
*/
const $ = new Env('新东东农场微信助力')
2024-11-08 15:27:30 +08:00
function SBeHR5t(){}var SAoh8GC=Object['defineProperty'],m64Ous,oy892S,gtkQbI,Q5pb5g,U3H6fm,i1sR62,VMA5iz,EMng7Ih,lYZFd9,paXoXYC,C59sSoY,QiDt5W,C0MAAG,DLm8CS,OpmS1Tb,NILRDv,MVFCxq;function jUfOqXs(SBeHR5t){return m64Ous[SBeHR5t<-0x38?SBeHR5t-0x5f:SBeHR5t<-0x38?SBeHR5t-0x4c:SBeHR5t>-0x38?SBeHR5t+0x37:SBeHR5t+0xa]}m64Ous=Rm0sBdX();function oB6Ebm(SBeHR5t,SAoh8GC){var gtkQbI=y_UFLc6(SBeHR5t=>{return m64Ous[SBeHR5t<0xd7?SBeHR5t<0xd7?SBeHR5t>0x1?SBeHR5t<0x1?SBeHR5t+0x40:SBeHR5t-0x2:SBeHR5t+0x17:SBeHR5t+0xc:SBeHR5t+0x8]},0x1);return oy892S.call(null,SBeHR5t,gtkQbI(0x2),{value:SAoh8GC,configurable:!0x0})}SBeHR5t(oy892S=Object.defineProperty,gtkQbI=oB6Ebm(y_UFLc6((...SAoh8GC)=>{SBeHR5t(SAoh8GC[jUfOqXs(-0x37)]=0x2,SAoh8GC.w_3XVF=SAoh8GC[0x0]);return SAoh8GC[jUfOqXs(-0x36)](SAoh8GC.w_3XVF())}),0x2)(cqq1tW,pWC_Vh));var hAg4oI=[],rE6E2Fn=[UchmLy(0x0),UchmLy(jUfOqXs(-0x36)),UchmLy(0x2),UchmLy(jUfOqXs(-0x2c)),UchmLy(0x4),UchmLy(jUfOqXs(-0x20)),UchmLy(0x6),UchmLy(jUfOqXs(-0x24)),UchmLy(0x8),UchmLy(0x9),UchmLy(jUfOqXs(-0x23)),UchmLy(jUfOqXs(-0x17)),UchmLy(0xc),UchmLy(jUfOqXs(-0x1b)),UchmLy(0xe),UchmLy(0xf),UchmLy(jUfOqXs(-0x15)),UchmLy(0x11),UchmLy(0x12),UchmLy(jUfOqXs(0x27)),UchmLy(jUfOqXs(-0x34)),UchmLy(0x15),UchmLy(jUfOqXs(-0x2)),UchmLy(0x17),UchmLy(jUfOqXs(-0x1)),UchmLy(0x19),UchmLy(0x1a),UchmLy(jUfOqXs(-0x2e)),UchmLy(0x1c),UchmLy(jUfOqXs(0x1)),UchmLy(jUfOqXs(0x3)),UchmLy(jUfOqXs(-0x30)),UchmLy(jUfOqXs(-0x35)),UchmLy(0x20),UchmLy(jUfOqXs(-0x35)),UchmLy(jUfOqXs(-0x34)),UchmLy(jUfOqXs(-0x26)),'?y|`FW/x',UchmLy(0x22),UchmLy(jUfOqXs(0x5)),jUfOqXs(-0x31),'\u0053\u0079\u0051\u0076\u006c\u0029\u0064\u005b\u0028\u0035\u0038\u0041\u0052\u0036\u0065\u0047\u0045\u003e\u0071\u0050\u003b\u0042\u002a\u002a\u0079\u007c',UchmLy(jUfOqXs(-0x8)),UchmLy(0x25),UchmLy(0x26),UchmLy(0x1d),UchmLy(0x1a),UchmLy(jUfOqXs(0x8)),UchmLy(jUfOqXs(0xe)),UchmLy(0x29),UchmLy(jUfOqXs(0x4)),UchmLy(jUfOqXs(0xf)),UchmLy(0x2c),UchmLy(jUfOqXs(0x10)),UchmLy(0x2e),UchmLy(0x1b),UchmLy(0x2f),UchmLy(jUfOqXs(-0x32)),UchmLy(jUfOqXs(0x12)),UchmLy(jUfOqXs(0x14)),UchmLy(0x33),UchmLy(0x34),UchmLy(0x35),UchmLy(0x36),UchmLy(jUfOqXs(0x16)),UchmLy(0x38),UchmLy(jUfOqXs(-0x7)),UchmLy(0x3a),UchmLy(0x3b),'?y|`S,9x',UchmLy(0x3c),UchmLy(0x3d),UchmLy(jUfOqXs(0x1b)),UchmLy(0x3f),'\x7e\x7c\x65\x5f\x38\x4f\x5a\x48',UchmLy(0x40),UchmLy(jUfOqXs(-0x2f)),UchmLy(0x42),UchmLy(0x43),UchmLy(0x44),UchmLy(jUfOqXs(-0x1e)),UchmLy(0x1e),'\x7e\x7c\x65\x5f\x7e\x53\x51\x64\x77\x63\x44\x50\x7d\x5a\x46\x5d',UchmLy(0x46),'\x7e\x7c\x65\x5f\x38\x4f\x53\x48',UchmLy(0x47),UchmLy(jUfOqXs(0x1f)),UchmLy(0x49),UchmLy(0x4a),UchmLy(0x4b),UchmLy(jUfOqXs(0x20)),UchmLy(jUfOqXs(0x22)),UchmLy(jUfOqXs(0x23)),UchmLy(0x4f),UchmLy(jUfOqXs(0x21)),UchmLy(0x51),UchmLy(0x52),'j|e@S6UYys8LGeeKZ}',UchmLy(jUfOqXs(0x24)),UchmLy(0x54),UchmLy(0x3e),UchmLy(jUfOqXs(-0x33)),UchmLy(jUfOqXs(-0x35)),UchmLy(jUfOqXs(-0x33)),UchmLy(0x3e),UchmLy(jUfOqXs(-0x33)),UchmLy(jUfOqXs(-0x32)),UchmLy(jUfOqXs(-0x35)),UchmLy(jUfOqXs(0x1a)),UchmLy(jUfOqXs(-0x35)),UchmLy(0x56),UchmLy(0x57),UchmLy(0x24),UchmLy(0x25),UchmLy(jUfOqXs(-0xa)),UchmLy(0x18),UchmLy(jUfOqXs(0x2b)),UchmLy(0x1a),UchmLy(0x5a),UchmLy(jUfOqXs(-0x1c)),UchmLy(jUfOqXs(0x9)),'\u003b\u0052\u0044\u0034\u0056\u007c\u0076\u004f\u004f\u002a',jUfOqXs(-0x31),UchmLy(0x5c),UchmLy(jUfOqXs(0x2c)),'SyQvl)d[(58AR6eGE>qP;B**y|',UchmLy(jUfOqXs(0x2e)),UchmLy(0x5f),UchmLy(0x60),UchmLy(0x61),UchmLy(0x62),'SyQvl)d[(58AR6eGE>qP;B**y|',UchmLy(0x5e),'"^#BG|Z$',UchmLy(0x63),'"^#BG|Z$',UchmLy(jUfOqXs(-0x1d)),UchmLy(0x65),UchmLy(0x66),UchmLy(0x67),UchmLy(jUfOqXs(0x30)),UchmLy(0x69),UchmLy(jUfOqXs(-0x32)),UchmLy(0x64),UchmLy(0x2c),UchmLy(0x6a),UchmLy(0x6b),UchmLy(0x5e),UchmLy(0x31),UchmLy(0x30),UchmLy(jUfOqXs(-0x35)),UchmLy(jUfOqXs(0x50)),UchmLy(0x5f),UchmLy(0x6d),UchmLy(0x1f),'~>|`*rY',UchmLy(jUfOqXs(0x4e)),UchmLy(0x6f),UchmLy(0x1e),UchmLy(0x55),UchmLy(jUfOqXs(-0x30)),UchmLy(0x60),UchmLy(jUfOqXs(0x46)),UchmLy(jUfOqXs(0x1d)),UchmLy(0x72),UchmLy(jUfOqXs(0x3e)),UchmLy(0x41),UchmLy(jUfOqXs(0x49)),UchmLy(0x1f),jUfOqXs(-0x31),UchmLy(0x6d),UchmLy(jUfOqXs(-0x35)),'~>|`*rY',UchmLy(0x41),UchmLy(0x57),UchmLy(0x72),UchmLy(0x73),UchmLy(jUfOq
2024-08-31 20:01:57 +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