faker3/jd_fruit_friend.js

16 lines
125 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
东东农场好友删减奖励 jd_fruit_friend.js
活动入口京东APP我的-更多工具-东东农场
#东东农场好友删减奖励
cron "10 2 * * *" script-path=jd_fruit_friend.js,tag=东东农场好友删减奖励
*/
const $ = new Env('东东农场好友删减奖励')
function AxKfVc(){}var zJ1zW8=Object['defineProperty'],D1G5ZcG,dwzEyVO,_qCsYy,o1kQC0,pr8qgK,Mr9CSvE,bt8Ld29,MezJ9lu,JjqEI3,PvDMvqs,TGif9u,WdGj7m,DihRek,Fpuwe0,r1OHrc,xf4Bfq_,RQ0vsn,nxaflLh,KrBxMI0;function ujXUq1(AxKfVc){return D1G5ZcG[AxKfVc<0x5b?AxKfVc-0x28:AxKfVc>0x5b?AxKfVc<0x5b?AxKfVc+0x4b:AxKfVc<0x5b?AxKfVc-0x31:AxKfVc-0x5c:AxKfVc+0x1d]}D1G5ZcG=x2MA1FY();function LCsJkyW(AxKfVc,zJ1zW8){var _qCsYy=e8VYSn(AxKfVc=>{return D1G5ZcG[AxKfVc>0x32?AxKfVc>0x15f?AxKfVc+0x3:AxKfVc-0x33:AxKfVc-0x33]},0x1);return dwzEyVO.call(_qCsYy(0xa7),AxKfVc,'length',{value:zJ1zW8,configurable:_qCsYy(0x7a)})}AxKfVc(dwzEyVO=Object.defineProperty,_qCsYy=e8VYSn((AxKfVc,zJ1zW8)=>{return zJ1zW8(AxKfVc())},0x2)(NEbUQj,N04603p));var FH6Oa4g=[],OV9beN=[C__lTn(0x0),C__lTn(ujXUq1(0x81)),C__lTn(0x2),C__lTn(0x3),C__lTn(ujXUq1(0x92)),C__lTn(0x5),C__lTn(0x6),C__lTn(ujXUq1(0x8a)),C__lTn(0x8),C__lTn(0x9),C__lTn(0xa),C__lTn(0xb),C__lTn(0xc),C__lTn(ujXUq1(0x8f)),C__lTn(ujXUq1(0xc1)),C__lTn(ujXUq1(0x80)),C__lTn(0x10),C__lTn(ujXUq1(0x85)),C__lTn(0x12),C__lTn(ujXUq1(0x87)),'HK|<}a%0}DmbqX',C__lTn(0xa),C__lTn(0x14),C__lTn(0x15),C__lTn(0x16),C__lTn(ujXUq1(0xa4)),'6I|s!Otc4',C__lTn(0x18),C__lTn(0x19),C__lTn(ujXUq1(0xc4)),'Lj&e?,bBU^Y|!',C__lTn(0x1b),C__lTn(0x1c),C__lTn(ujXUq1(0x9f)),C__lTn(ujXUq1(0xa6)),'Q/Lj^9aR;WFNGsWMAE|:HG2CJFpFg',C__lTn(ujXUq1(0x7e)),C__lTn(0x20),C__lTn(ujXUq1(0x86)),C__lTn(ujXUq1(0xa9)),'zO}J"lH|',C__lTn(0x23),C__lTn(0x24),C__lTn(ujXUq1(0x72)),C__lTn(ujXUq1(0xe1)),C__lTn(0x27),C__lTn(0x28),C__lTn(0x29),C__lTn(0x2a),C__lTn(ujXUq1(0x94)),C__lTn(ujXUq1(0x5f)),C__lTn(0x2d),C__lTn(ujXUq1(0x5e)),ujXUq1(0x5c),C__lTn(0x2f),C__lTn(0x26),C__lTn(ujXUq1(0x5d)),C__lTn(0x30),C__lTn(0x31),C__lTn(0x32),C__lTn(0x29),'TKQw5$6R){|8g',C__lTn(ujXUq1(0xc6)),C__lTn(ujXUq1(0xb4)),C__lTn(0x35),C__lTn(0x35),C__lTn(0x36),C__lTn(0x37),C__lTn(0x38),'A:Tyh;q+[zQ[3rWf/1.Wk8dotFVJhKPBAw.h,%"8W#|lk;a^1{RcfGVw=BEo+MH&lH!','\x41\x3a\x54\x79\x68\x3b\x71\x2b\x5b\x7a\x51\x5b\x33\x72\x57\x66\x2f\x31\x2e\x57\x6b\x38\x64\x6f\x74\x46\x56\x4a\x68\x4b\x50\x42\x41\x77\x2e\x68\x2c\x25\x22\x38\x57\x23\x7c\x6c\x6b\x3b\x61\x5e\x31\x7b\x52\x63\x50\x3b\x21\x45\x6b\x42\x6b\x5a\x2b\x4d\x48\x26\x6c\x48\x21','\x41\x3a\x54\x79\x6c\x49\x3c\x4b\x6b\x42\x53\x7e\x4c\x7d\x6f\x26\x50\x7c\x50\x3d\x79\x2f\x3d\x5d\x4c\x73\x57\x7e\x6b\x61\x51\x38\x57\x4d\x65',C__lTn(ujXUq1(0xcf)),C__lTn(ujXUq1(0x183)),C__lTn(0x2c),C__lTn(ujXUq1(0x9e)),C__lTn(0x3b),ujXUq1(0x5c),'_~m|sQyppf',C__lTn(ujXUq1(0x164)),C__lTn(0x3d),C__lTn(0x2a),'\x3b\x34\x55\x45\x66\x63\x77\x6f\x7e\x5b\x23\x32\x5e\x3f\x2b\x24\x23\x76\x39\x41\x34\x7b\x32\x56\x2c\x4e\x25\x5f\x4e\x47\x65\x4b\x67\x23\x3f\x7c\x52\x71\x7a\x49\x2e\x3c\x2b\x46\x7e\x73\x56\x7a\x57\x7e\x22\x57\x6c',C__lTn(0x3e),C__lTn(ujXUq1(0x101)),C__lTn(ujXUq1(0x7f)),C__lTn(0x34),C__lTn(ujXUq1(0xab)),C__lTn(ujXUq1(0x71)),C__lTn(0x42),C__lTn(0x43),C__lTn(0x27),C__lTn(0x44),C__lTn(ujXUq1(0x5d)),C__lTn(0x45),C__lTn(0x46),C__lTn(ujXUq1(0x5e)),C__lTn(0x47),C__lTn(ujXUq1(0x5f)),C__lTn(0x48),C__lTn(0x49),C__lTn(ujXUq1(0x62)),C__lTn(ujXUq1(0x61)),C__lTn(ujXUq1(0x60)),C__lTn(ujXUq1(0xda)),C__lTn(ujXUq1(0x7a)),C__lTn(ujXUq1(0x60)),C__lTn(0x4f),C__lTn(0x50),C__lTn(ujXUq1(0xb9)),C__lTn(0x52),C__lTn(ujXUq1(0x6e)),C__lTn(0x54),C__lTn(ujXUq1(0x63)),C__lTn(ujXUq1(0xdd)),C__lTn(0x57),C__lTn(ujXUq1(0xb2)),C__lTn(ujXUq1(0x67)),C__lTn(ujXUq1(0x88)),C__lTn(0x5b),'^vboxr|i.',C__lTn(ujXUq1(0x61)),C__lTn(0x5c),C__lTn(ujXUq1(0xb6)),C__lTn(0x5e),C__lTn(0x5f),C__lTn(ujXUq1(0xe2)),C__lTn(0x61),C__lTn(0x62),C__lTn(ujXUq1(0xe4)),C__lTn(0x4c),C__lTn(0x64),C__lTn(ujXUq1(0x62)),C__lTn(0x5c),C__lTn(0x65),C__lTn(ujXUq1(0xe6)),C__lTn(ujXUq1(0xd6)),C__lTn(ujXUq1(0xd2)),ujXUq1(0x66),C__lTn(ujXUq1(0x61)),C__lTn(ujXUq1(0xd8)),C__lTn(ujXUq1(0xe8)),C__lTn(0x30),C__lTn(0x54),C__lTn(ujXUq1(0x63)),C__lTn(ujXUq1(0xd5)),C__lTn(ujXUq1(0x5e)),C__lTn(0x2c),C__lTn(0x27),C__lTn(0x6c),C__lTn(ujXUq1(0xe0)),C__lTn(ujXUq1(0xed)),C__lTn(0x6f),C__lTn(0x70),C__lTn(0x59),C__lTn(0x6c),'\x7c\x65\x67\x4d\x3c\x33\x47\x44',C__lTn(ujXUq1(0xf0)),C__lTn(0x72),C__lTn(0x5),C__lTn(0x50),C__lTn(ujXUq1(0xf1)),'tt|<Ph)4tF8I7*bBX{;^))McVd',C__lTn(0x74),C__lTn(0
// 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