faker3/jd_zzhb_new_help.js

19 lines
93 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-08-19 18:29:09 +08:00
新转赚红包助力
2024-06-28 15:38:28 +08:00
链接https://pro.m.jd.com/mall/active/B2Y13x641hwWfpsoRenCzfbz4jR/index.html
环境变量
2024-08-19 18:29:09 +08:00
jd_zzhb_inviterId // 指定助力码 非必须,不填默认助力账号一
jd_zzhb_num // 指定人数 非必须,不填默认跑全部账号
2024-06-28 15:38:28 +08:00
cron:0 0,12 * * * jd_zzhb_new_help.js
*/
const $ = new Env('新转赚红包助力');
2024-08-19 18:29:09 +08:00
function faker4r1rk8(){}var fakerxwl44j=Object['defineProperty'],fakerb78xmj,fakermq6d4,faker7w78mi,faker1uugdc,fakergbhc0s,faker6xgrt9c,fakermrxci,fakeru4ibf,fakerr5v6vg,fakerei05qr,faker6ddjsa,fakerszjnvc,fakerjqsd4h,faker4av0kw,fakerpmoquk,fakerm2hn7,fakerskkm5,fakermo2hw9;function faker9r0x2r(faker4r1rk8){return fakerb78xmj[faker4r1rk8>-0x9?faker4r1rk8<0x9b?faker4r1rk8>-0x9?faker4r1rk8<-0x9?faker4r1rk8-0x2:faker4r1rk8+0x8:faker4r1rk8+0x58:faker4r1rk8-0x11:faker4r1rk8-0x18]}fakerb78xmj=fakerc994ec.call(this);function fakernm0hfr(faker4r1rk8,fakerxwl44j){return fakermq6d4(faker4r1rk8,faker9r0x2r(0x1),{value:fakerxwl44j,configurable:!0x0})}fakermq6d4=Object.defineProperty;var faker1zqmmf=[],faker4w26em=['+Rr=A?<S0]:%KV','+Rr=A?kS}8o?1E',',YjoP(vV','+Rr=A?uIRqA?|E','+Rr=A?BV','Lj=Wv','ObE~}y>X>PnQDg','.J1XE','i%}*h~=F','q%hC','E,(y66fV0RHoFP','Fpja>','HUFP,4|A','><u5DdI4gLm',')Y*Tm','Vx._z','aq]O~p6U','hPC3?',':8/3','{!1X!e6U','6W1cop5U','f;Gw+','{!1X!ey}%F+m2ut8S;2[+','{!1X!ey}9uNGRE',';!p;j*Fah)McQ$#nn/^KmXDvYX;','jq._FOmG[','!!45|OdU','TqZ~5','(Eo_','86._w%4U',faker9r0x2r(-0x5),faker9r0x2r(-0x7),':Um=uC;^g5a|fu%p=#&^g@(','t2l{uCZ]L,)F(','=Sb_?','/=k3ZpFtzXNS>qs8J={"s7/tzms&h%WqQx]Ove*el]F4(u&^F8a7>wLeT,Q,]f@<#8O7J~{U',faker9r0x2r(-0x8),'[sk}G%ompt:ngWcr;UIlPg)}`{Gw%h%(x^H[so6{ZmXawF)wb(jR}F~qau~w%h%(','}>k3w~$j;jIL(','aq]O~p6U','$<)_','[sk}C%01w8S3)3A*:~iq',')8YcX',faker9r0x2r(-0x6),'$<)_',faker9r0x2r(-0x8),'$<)_','6<mICcbU','I6k3n%i',faker9r0x2r(-0x7),'aq]O~p6U','y8n"Fsi','nqSOT~8U',':6f)','$IsXqr+GGZ','dqSOT~n,y&:"6y623(',':=$)Nc{U','dqjwe:i','$IsXqr!U','bq>O.S1n[','#;{"Op]U','.6a7}r+GGZ','$<)_','F8Pw~phtI,al2E','n>jw|OdU','CEb_?','dq0wT%/j}*rL(','v4$wlOvj;jSRW%t8','5>}36','VxSO/Ri','$<I"Do4U','86jw]7(Xv','z<jw+','Vx]O2S*nCm+myE',faker9r0x2r(-0x6),'y8n"Fsi',faker9r0x2r(-0x8),'*Affx8Nxc88I~Wy,i(','CVUW$ZofQRe]4,7.~(','PnF}.<2.F0#','}>k3w~4U','t^n"+','B]Q.Hmb','S:82','5d33#]X#T]]oCYBqbv','O1/YS"%3UZ$DeqKNCv','9QHAN:tNHFl','n>jw|OdU','Afru`CS(~(o[v','9aLX"%5U','_&b_w%4U',faker9r0x2r(-0x8),'bq>O.S1n[','y8fwhpM$Y&DK1fG{KNY7<okYL,lL(',faker9r0x2r(-0x3),'3qyIk','y8fwhpM$Y&DK1fG{g^Cw+','h}.j~_Sr','YNsLz9}r','p`Nj+|6','h}.j~_;/K','vT9uh;c)w>>=!AS','gqcjj|*vT','N;+V5__ZdSH]_ssv','I6Cw+','?;dt:h{D','{O)Y|=mG','`=omri5R','K,ro','v;YI','y8fwhp<}v','y8fwhp]U',')6>ONc8U','maf)[hi','6<n"+','">a7z%/jv','y8fwhp]U',faker9r0x2r(-0x1),'maf)[hi','fx0wb','jq._M=]U','">._?',faker9r0x2r(-0x8),'y8n"Fsi',faker9r0x2r(-0x2),faker9r0x2r(-0x6),faker9r0x2r(-0x4),'16bD)pbU','$<)_','S;;w)pbU','S;;w)pbU',faker9r0x2r(-0x8),faker9r0x2r(-0x5),'$<)_',faker9r0x2r(-0x8),'#%+;_gJaOLE','y8fwhpM$Y&DK1fG{jq._5','y8fwhpM$Y&DK1fG{KNY7<okYL,lL(','fx0wb',faker9r0x2r(-0x4),'16bD)pbU',faker9r0x2r(-0x8),'S;;w)pbU',faker9r0x2r(-0x3),faker9r0x2r(-0x8),'PI)_','$<)_','$<)_','.=;wPOVL(&>','e:Mwu','y8fwhpM$Y&DK1fG{KNY7<okYL,lL(',faker9r0x2r(-0x2),'y8fwhp]U',')6>ONc8U','ma6wn%i',faker9r0x2r(-0x4),'fx0wb','16bD)pbU',faker9r0x2r(-0x8),'S;;w)pbU','n>jw|OdU',faker9r0x2r(-0x8),faker9r0x2r(-0x5),faker9r0x2r(-0x6),faker9r0x2r(-0x8),'$<)_','.=;wPObU','xdF3',faker9r0x2r(0x0),faker9r0x2r(-0x1),'ma6wn%i','$<)_','bq>O.S1n[','n>jw|OdU','IaLXU4|U','IaLXBY8U','qqS@?','v<?vk','v4$w.9i','q>:ET8i','d>]OOp,e{,x;(',faker9r0x2r(0x0),'5@#wseg<','t/>5fl0','v4$wH9i','4_0w+f5U','(@VK%v8<','iETr"~4U','OJ9"lO51cZDK1fG{','dqk3BS*n6]EUtE1nS;Pww~{U','OJ9"lO|U','W+`$','C+idi','46]O=;dU','rIy[g:^Uv','Qg>Wl7+`n','~Izwse67f','QBOE','s#dD','b@vW5v_u','n.;6}','++"djw^n+Fmzu','|I?$+2[Cn','/=k3ZpFtzXES}K${l57XS`XG"XB*p>c{>8@7Op,e/j','EE;ws7x+_Z@Y(','Qg>Wl7.pP9~4o>E16IXGZ','q;M)A9i','Qg>Wl7.pP9~4o>E14sPK+)?PzYjzu','bGvWC>e!39@4FDU1iNPK+)o<','(qLONc8U','460w)0Ghl)Rci','0[zK[`i','y8fwhpM$Y&DK1fG{g^Cw+','EE;ws7.U',';x0wb','$<)_','A*XG','bqk3w~dU','jq;)5%$jv','N_T"Eh|U','nb)G`e^n8M','W+MwheA"26','br~hi8++LG','0DC(qd&m@5','N_T"Eh&GN!7yVy@/V]x','Ce!G/d6/EFSk@Qhpbre@s','N_T"Eh&G1lkmR>bJdqx','w/bHNw0','{8t(iHk!39Ztu','Tqf)Q"P`.d&L(','{8YGWH1<','w2;yGlM<','nb)G`e^n+tkxm>/8|tuL&dj"%t79}TU1,g/KNOx!f','y/#?ShLU',';I0wr9gi','+6k36','y/,[%p|U4P<`{FL8+(','{8ZwUeM<','WN4"2o<}v','2N?$F7h{@5"O24p1jZK]=J]Ei5M*u:`','"qF6p`ZXGm>#Q$
2024-06-28 15:38:28 +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