faker3/jd_XinFarm_helpnum.js

20 lines
156 KiB
JavaScript
Raw Normal View History

2024-08-03 16:38:57 +08:00
/*
活动名称新东东农场助力指定次数
活动入口APP-我的-东东农场
执行功能指定助力次数顺序助力
2024-11-04 10:33:35 +08:00
环境变量JD_XinFarm_helpnum // 指定助力次数不指定默认35次
2024-08-03 16:38:57 +08:00
JD_XinFarm_zdcode // 指定助力码,多个助力码用@或换行符分隔(填写此变量后仅助力指定助力码,其他不再助力)
2024-09-15 04:05:38 +08:00
JD_XinFarm_zdpin // 指定助力账号,多个账号用@或换行符分隔(填写此变量后仅助力账号,其他不再助力)
2024-08-03 16:38:57 +08:00
JD_XinFarm_notify // 是否推送通知true/false默认不推送
2024-09-15 04:05:38 +08:00
注意指定账号-指定助力码变量均已填写的情况下默认仅助力指定账号其他不再助力
cron:1 1 1 1 *
2024-08-03 16:38:57 +08:00
*/
const $ = new Env('新东东农场助力指定次数')
2024-11-08 15:27:30 +08:00
function xabya0j(){}var FN_fcL1=Object['defineProperty'],olGcyr,OkwFOWb,v9ewKB9,W0ChgH,QkOYyx,_0tybto,ul8nhO,IxoyS99,GH_1KKR,F4zjiiV,HmPECY,Kin3Eh,fAIVfh,EuoBtt,W134vu,tDxbbzp,S76PuPJ,e4BRbj,mAXQh4,gBPCN7;function dMU90s(xabya0j){return olGcyr[xabya0j<0x12f?xabya0j>0x12f?xabya0j-0x46:xabya0j+0x31:xabya0j+0x21]}olGcyr=sd3eD17();function L_WPX2K(xabya0j,FN_fcL1){var v9ewKB9=NW_sJYA(xabya0j=>{return olGcyr[xabya0j>0x146?xabya0j-0x2f:xabya0j>-0x1b?xabya0j+0x1a:xabya0j+0x4d]},0x1);return OkwFOWb(xabya0j,v9ewKB9(0x11),{value:FN_fcL1,configurable:dMU90s(0x51)})}xabya0j(OkwFOWb=Object.defineProperty,v9ewKB9=NW_sJYA((xabya0j,FN_fcL1)=>{return FN_fcL1(xabya0j())},0x2)(OOag1kQ,Y1spBw));var g1t6BHX=[],A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),'vR|(3',Kb6iRZ5(0x71),Kb6iRZ5(dMU90s(-0x27)),Kb6iRZ5(dMU90s(0x57)),Kb6iRZ5(0x73),Kb6iRZ5(0x74),dMU90s(-0x21),Kb6iRZ5(dMU90s(0x71)),'&nMJ~2?|A',Kb6iRZ5(dMU90s(-0x26)),Kb6iRZ5(0x54),Kb6iRZ5(dMU90s(-0x2f)),'|ME6qJH
2024-08-03 16:38: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