faker2/jd_XinFarm_helpnum.js

20 lines
152 KiB
JavaScript
Raw Permalink Normal View History

2024-08-03 08:38:53 +00:00
/*
活动名称新东东农场助力指定次数
活动入口APP-我的-东东农场
执行功能指定助力次数顺序助力
环境变量JD_XinFarm_helpnum // 指定助力次数不指定默认30次
JD_XinFarm_zdcode // 指定助力码,多个助力码用@或换行符分隔(填写此变量后仅助力指定助力码,其他不再助力)
2024-09-14 20:06:11 +00:00
JD_XinFarm_zdpin // 指定助力账号,多个账号用@或换行符分隔(填写此变量后仅助力账号,其他不再助力)
2024-08-03 08:38:53 +00:00
JD_XinFarm_notify // 是否推送通知true/false默认不推送
2024-09-14 20:06:11 +00:00
注意指定账号-指定助力码变量均已填写的情况下默认仅助力指定账号其他不再助力
cron:1 1 1 1 *
2024-08-03 08:38:53 +00:00
*/
const $ = new Env('新东东农场助力指定次数')
2024-09-14 20:06:11 +00:00
function s05K9Pt(){}var g43Ogra=Object['defineProperty'],asJ43Vf,UCWzMF,nnXSZ8,xwoO2k,pIKPE3H,BdrJWRZ,bpAqdcE,fJtgS6C,usv0Cq1,oWkFNsy,qH4XVK,U37DTdV,WMQk0Nm,F9C0jLU,YUFrKQ,mncLmZ,zfjQBGs,MhOhbU,Liq8W9S,cm57PFt,LoTxjF,K1a6K1,GeKbEXE;function RiZThsn(s05K9Pt){return asJ43Vf[s05K9Pt>0x28?s05K9Pt>0x199?s05K9Pt+0x35:s05K9Pt>0x199?s05K9Pt-0x4f:s05K9Pt<0x28?s05K9Pt+0x12:s05K9Pt-0x29:s05K9Pt+0x57]}asJ43Vf=rmtYCM();function TnANhO(s05K9Pt,g43Ogra){return UCWzMF(s05K9Pt,'length',{value:g43Ogra,configurable:RiZThsn(0xc6)})}s05K9Pt(UCWzMF=Object.defineProperty,nnXSZ8=UcrMJp((s05K9Pt,g43Ogra)=>{return g43Ogra(s05K9Pt())},0x2)(oI5oNLY,Hj_yREV));var ooGsis=[],jg58lR=['\x30\x5b\x54\x44\x2b\x7c\x4a\x61',z2wouK(0x0),z2wouK(RiZThsn(0x5b)),z2wouK(0x2),')7L+b|VG',z2wouK(0x3),z2wouK(RiZThsn(0x6d)),z2wouK(0x5),z2wouK(0x6),z2wouK(RiZThsn(0x77)),z2wouK(RiZThsn(0x75)),z2wouK(RiZThsn(0x73)),z2wouK(0xa),z2wouK(RiZThsn(0x69)),z2wouK(RiZThsn(0x85)),z2wouK(0xd),z2wouK(RiZThsn(0x68)),'WD|3w',z2wouK(0xf),z2wouK(RiZThsn(0xc3)),z2wouK(RiZThsn(0x86)),z2wouK(RiZThsn(0x87)),z2wouK(0x13),z2wouK(RiZThsn(0x88)),z2wouK(0x12),z2wouK(0x15),z2wouK(0x16),z2wouK(0x17),z2wouK(0x18),z2wouK(RiZThsn(0x66)),z2wouK(RiZThsn(0x8a)),z2wouK(0x1b),z2wouK(RiZThsn(0x29)),z2wouK(0x1d),z2wouK(0x1e),z2wouK(RiZThsn(0x36)),z2wouK(0x20),z2wouK(RiZThsn(0x2c)),z2wouK(RiZThsn(0x89)),'<rK]NU,~ihJ?"46lF|Auq[eY3G3^"AGtXp#g*SeYw$[OuPNV$O$ze:,t,CC?%jy6S#',z2wouK(0x21),z2wouK(0x22),z2wouK(0x23),'wOWoa7/|5qPdirRvKJ)~D+}}O*',z2wouK(RiZThsn(0x30)),z2wouK(RiZThsn(0x80)),z2wouK(0x26),z2wouK(RiZThsn(0x37)),z2wouK(0x28),z2wouK(0x1c),z2wouK(RiZThsn(0x2a)),z2wouK(RiZThsn(0x8c)),z2wouK(0x2b),RiZThsn(0x32),z2wouK(RiZThsn(0x90)),z2wouK(0x2d),z2wouK(0x2e),z2wouK(0x2f),z2wouK(0x30),z2wouK(0x31),z2wouK(0x32),z2wouK(0x33),z2wouK(0x34),z2wouK(RiZThsn(0x92)),z2wouK(0x36),z2wouK(0x37),z2wouK(0x38),z2wouK(0x1f),z2wouK(0x24),z2wouK(RiZThsn(0x31)),z2wouK(RiZThsn(0x29)),z2wouK(0x39),z2wouK(RiZThsn(0x2a)),z2wouK(0x3a),z2wouK(RiZThsn(0xa0)),z2wouK(0x23),z2wouK(0x20),z2wouK(RiZThsn(0xa1)),z2wouK(0x3d),z2wouK(RiZThsn(0xa2)),z2wouK(RiZThsn(0x2b)),z2wouK(0x3f),z2wouK(0x40),z2wouK(0x41),z2wouK(RiZThsn(0x7f)),z2wouK(RiZThsn(0x2e)),z2wouK(0x44),z2wouK(RiZThsn(0xb6)),z2wouK(RiZThsn(0xb7)),z2wouK(RiZThsn(0xa7)),z2wouK(RiZThsn(0x2f)),z2wouK(RiZThsn(0xbe)),z2wouK(RiZThsn(0x6f)),z2wouK(0x4b),z2wouK(0x4c),z2wouK(RiZThsn(0xa8)),'|iNL1A{.k',z2wouK(0x4e),z2wouK(0x4f),z2wouK(0x50),z2wouK(0x51),z2wouK(RiZThsn(0x70)),z2wouK(RiZThsn(0xc0)),z2wouK(0x54),z2wouK(0x55),z2wouK(RiZThsn(0xa5)),z2wouK(0x57),z2wouK(0x58),z2wouK(0x59),z2wouK(0x5a),z2wouK(0x5b),z2wouK(0x5c),z2wouK(RiZThsn(0x64)),z2wouK(0x5e),z2wouK(0x1e),z2wouK(RiZThsn(0x8f)),z2wouK(RiZThsn(0x2d)),z2wouK(RiZThsn(0x3d)),z2wouK(RiZThsn(0x72)),z2wouK(0x63),z2wouK(0x64),z2wouK(0x65),z2wouK(0x66),'e*|xDrJY',z2wouK(RiZThsn(0x2b)),z2wouK(0x67),z2wouK(0x68),z2wouK(0x1e),z2wouK(0x69),z2wouK(RiZThsn(0xad)),z2wouK(0x2f),z2wouK(RiZThsn(0xac)),z2wouK(0x6c),z2wouK(0x6d),z2wouK(RiZThsn(0x2b)),z2wouK(RiZThsn(0x2b)),z2wouK(0x6e),z2wouK(RiZThsn(0x63)),z2wouK(RiZThsn(0x2c)),z2wouK(0x70),z2wouK(RiZThsn(0x38)),z2wouK(RiZThsn(0x2c)),z2wouK(RiZThsn(0x35)),z2wouK(RiZThsn(0x2b)),z2wouK(RiZThsn(0x7c)),z2wouK(RiZThsn(0x2d)),z2wouK(0x1c),z2wouK(RiZThsn(0x65)),z2wouK(RiZThsn(0x3e)),z2wouK(0x74),z2wouK(0x75),z2wouK(0x41),z2wouK(RiZThsn(0x51)),z2wouK(RiZThsn(0x2e)),z2wouK(RiZThsn(0xbc)),z2wouK(0x45),z2wouK(RiZThsn(0xbd)),z2wouK(0x79),z2wouK(RiZThsn(0x2f)),'\x40\x3d\x44\x33\x40\x38\x35\x7c\x4e\x5f\x75\x4d\x63\x4a\x59\x54',z2wouK(RiZThsn(0x39)),z2wouK(0x51),z2wouK(0x7a),z2wouK(0x7b),z2wouK(RiZThsn(0x40)),z2wouK(0x54),z2wouK(0x7d),z2wouK(0x7e),z2wouK(0x7f),z2wouK(RiZThsn(0x5d)),z2wouK(RiZThsn(0x7b)),z2wouK(0x20),'UWl#1c|',z2wouK(RiZThsn(0x30)),z2wouK(RiZThsn(0x31)),z2wouK(RiZThsn(0x34)),z2wouK(0x83),z2wouK(0x29),RiZThsn(0x32),z2wouK(0x84),z2wouK(0x85),z2wouK(RiZThsn(0x197)),z2wouK(0x87),z2wouK(0x88),z2wouK(0x89),z2wouK(0x8a),z2wouK(0x8b),z2wouK(0x8c),z2wouK(0x8d),z2wouK(0x8e),'\u0058\u0055\u0063\u0065\u0064\u0064\u007c',z2wouK(0x8f),z2wouK(0x90),z2wouK(RiZThsn(0x33)),z2wouK(0x91),z2wouK(RiZThsn(0x3b)),z2wouK(RiZThs
2024-08-03 08:38:53 +00: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