faker3/jd_XinFarm_wxhelp.js

19 lines
98 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 // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
注意暂不清楚是否长期目前有这个活动
cron:40 8,19 * * *
*/
const $ = new Env('新东东农场微信助力')
2024-09-15 04:05:38 +08:00
function Wmt5DR(){}var GJPpUO9=Object['defineProperty'],bDSIxp2,oSx64q,UyZbxl,DKAfBMH,K_B7Uw4,NkAgDj4,Q1FyylH,_WwZBN,SHgDjB,glikWC,XWBe2nr,DiEn4OY,k2CUI8,WPy1bKo,Z7bHT3,fwD0jJ,sJ4thXb;function OlNlCS(Wmt5DR){return bDSIxp2[Wmt5DR<0x104?Wmt5DR>0x104?Wmt5DR-0x3e:Wmt5DR>0x104?Wmt5DR+0x44:Wmt5DR<0x45?Wmt5DR+0x1d:Wmt5DR-0x46:Wmt5DR+0x38]}bDSIxp2=gJQSK9();function Ysj6n3y(Wmt5DR,GJPpUO9){var UyZbxl=UFKrcZK(Wmt5DR=>{return bDSIxp2[Wmt5DR>0x16?Wmt5DR>0x16?Wmt5DR-0x17:Wmt5DR-0x26:Wmt5DR-0x27]},0x1);return oSx64q(Wmt5DR,UyZbxl(0x17),{value:GJPpUO9,configurable:UyZbxl(0x8e)})}Wmt5DR(oSx64q=Object.defineProperty,UyZbxl=Ysj6n3y(UFKrcZK((...GJPpUO9)=>{var oSx64q=UFKrcZK(GJPpUO9=>{return bDSIxp2[GJPpUO9>-0x4f?GJPpUO9<-0x4f?GJPpUO9-0x35:GJPpUO9<-0x4f?GJPpUO9+0x34:GJPpUO9<-0x4f?GJPpUO9+0x3d:GJPpUO9+0x4e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n(OlNlCS(0x4b)),BhkvOJn(0x2c),'MX|!c&9m',BhkvOJn(0x2d),BhkvOJn(OlNlCS(0x64)),BhkvOJn(0x2f),BhkvOJn(0x30),BhkvOJn(OlNlCS(0xc3)),BhkvOJn(OlNlCS(0x87)),BhkvOJn(OlNlCS(0x7d)),BhkvOJn(0x34),BhkvOJn(0x35),BhkvOJn(OlNlCS(0x88)),BhkvOJn(OlNlCS(0x89)),BhkvOJn(0x38),BhkvOJn(OlNlCS(0x95)),BhkvOJn(0x3a),BhkvOJn(OlNlCS(0x51)),BhkvOJn(0x3b),BhkvOJn(OlNlCS(0x4f)),BhkvOJn(0x3d),BhkvOJn(0x3e),BhkvOJn(0x3f),BhkvOJn(0x40),BhkvOJn(0x41),BhkvOJn(0x42),BhkvOJn(OlNlCS(0x97)),BhkvOJn(0x44),BhkvOJn(0x45),BhkvOJn(0x46),BhkvOJn(0x47),BhkvOJn(0x48),BhkvOJn(OlNlCS(0x96)),BhkvOJn(OlNlCS(0x54)),BhkvOJn(0x4b),BhkvOJn(0x4c),BhkvOJn(0x4d),BhkvOJn(0x4e),BhkvOJn(0x4f),BhkvOJn(0x50),BhkvOJn(0x51),BhkvOJn(0x52),BhkvOJn(0x53),BhkvOJn(0x54),BhkvOJn(0x1a),BhkvOJn(OlNlCS(0x50)),BhkvOJn(0x1a),BhkvOJn(0x3b),BhkvOJn(0x1a),BhkvOJn(0x3b),BhkvOJn(OlNlCS(0x4e)),BhkvOJn(0x1a),BhkvOJn(0x56),BhkvOJn(0x1a),'J,p.|AdR',BhkvOJn(OlNlCS(0xa0)),'\u0056\u007c\u004c\u0030\u0048\u0042\u003a\u0052',BhkvOJn(0x58),'\u004a\u002c\u0070\u002e\u007c\u0041\u005a\u005b\u0066\u005e\u0034','\x71\x7c\x4c\x30\x48\x42\x56\x47\x2b\x7d\x51\x35\x6b\x2b\x6b\x24\x6e\x79',BhkvOJn(0x59),BhkvOJn(OlNlCS(0x4c)),BhkvOJn(OlNlCS(0x4d)),BhkvOJn(OlNlCS(0xa5)),'z]4R5|M::f',BhkvOJn(0x5b),BhkvOJn(0x5c),BhkvOJn(OlNlCS(0xa6)),'\u005a\u007c\u006c\u0069\u0068\u0034\u0021\u005b\u002e\u003b\u007d\u0058\u004d\u003e\u002a\u0026\u0051\u006b\u006f\u0035\u0032\u0030\u0056\u0056\u007c\u007e',BhkvOJn(0x5e),BhkvOJn(0x5f),'\x3b\x7c\x4e\x33\x5e\x63\x6b\x52',BhkvOJn(OlNlCS(0xa7)),'56|fHBVVx','J,p.|AZ[[=',BhkvOJn(OlNlCS(0x69)),BhkvOJn(0x5e),BhkvOJn(OlNlCS(0x53)),BhkvOJn(OlNlCS(0x4e)),'Z|lih4![.;}XM>*&Qko520VV|~',BhkvOJn(0x17),BhkvOJn(OlNlCS(0xa9)),BhkvOJn(OlNlCS(0x6a)),BhkvOJn(0x65),BhkvOJn(0x1a),BhkvOJn(0x66),BhkvOJn(0x67),BhkvOJn(OlNlCS(0x5f)),'\x7d\x42\x3a\x6a\x7c\x77\x6f\x4e\x51\x30\x2b\x44\x62\x3d',BhkvOJn(0x69),BhkvOJn(OlNlCS(0xae)),BhkvOJn(OlNlCS(0xf6)),BhkvOJn(OlNlCS(0x4b)),BhkvOJn(0x6c),BhkvOJn(OlNlCS(0xab)),BhkvOJn(0x5f),BhkvOJn(0x6e),BhkvOJn(OlNlCS(0xac)),BhkvOJn(OlNlCS(0x4f)),BhkvOJn(OlNlCS(0x52)),BhkvOJn(0x1a),BhkvOJn(OlNlCS(0x50)),BhkvOJn(0x70),BhkvOJn(0x1a),BhkvOJn(OlNlCS(0x50)),BhkvOJn(OlNlCS(0x4f)),BhkvOJn(0x6e),BhkvOJn(0x6f),Bh
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