faker3/jd_plus_help.js

18 lines
59 KiB
JavaScript
Raw Normal View History

2024-12-25 15:16:47 +08:00
/*
活动名称PLUS派送助力
活动链接https://pro.m.jd.com/mall/active/3CAqZRAyxE7pUQwrsPB4iiT33Pn7/index.html
环境变量
jd_plus_inviterId // 指定助力码 非必须,不填默认助力账号一
jd_plus_num // 指定人数 非必须,不填默认跑全部账号
0 0,12 * * * jd_plus_help.js
*/
const $ = new Env('Plus派送助力');
function fakery7ksr(){}var fakerxnbb6q=Object['defineProperty'],faker72z9jg,fakerou237s,faker6l4qmb,faker2edd08,faker6tupc,fakerdmg2bu,fakeri72yne,fakerzxdnal,fakerc2dek5,fakerqd59h,fakerdjmbj9,fakerfm4vz,fakerr3lja;function fakerquqdjc(fakery7ksr){return faker72z9jg[fakery7ksr>-0x39?fakery7ksr<-0x39?fakery7ksr-0x3f:fakery7ksr+0x38:fakery7ksr+0x21]}faker72z9jg=fakerm21jxn();var fakerd1xaff=[],faker6i4kak=['YbyW%>`3','RInp0/3alyx50o','=<Fjl{pA','fH+*>','y}g*','W%tz({ndDPlIEPMm?M','6O8Ao','W%tz({ndcBo&nP;}$On:o','W%tz({ndDPx8ZQ','$&(OZXxNUxIjYBH?K|1Qdq:JIUH','dV|5Bj&8:','%%Nu2jkL','TV_9u','MQC5','}Y|5ADNL',fakerquqdjc(-0x32),'LQ+Ao','yL&/P+O3]u<26PDX/Ir3]^C6ojAT[}+7VApwo','/$(5>','g/.*_XB;"Fx$UV,}[/Ww,{g;"&,rfDhV=b4ji1q1R4BNMPr3B}<{UAJ1T@]DfD?g3G@5',fakerquqdjc(-0x38),'DU9_[EGet|nY]L?z)Ap@r]x_FV[mEJE/v*ODUGqVge6^mfxmk/M2_fHj^WHmEJE/','_T9KmH+M)Mp>/','^juPHtqA',fakerquqdjc(-0x38),':,.)+D0mA}$*z*`qy9MUGAo/~',fakerquqdjc(-0x38),fakerquqdjc(-0x38),fakerquqdjc(-0x38),'YG&e+v(L','eY.*?D~','LQ+Ao','<V4j9XYL',fakerquqdjc(-0x37),'?V$jT9?@lr2','te,FVKo88_','kV$jT9?@lrywYlYn*M','y/tzxvWL','kVdA1y~',fakerquqdjc(-0x36),'O&X:D`iP','0[=]pmr33l','V$sG','y72KA`6d<{=eZM','?UdA2jkL','+Q(5>','kV0ATDgd)qKJM','[b?D^8[ZPZm>#Y1,','qa4yW','ab$jgZ~','tGewECNL','}YdA4{MFi','"GdAo','ab4jn$q?+&o&lQ',fakerquqdjc(-0x37),fakerquqdjc(-0x38),'q`66b}xbv}}e9hl@8|r?%3E|$?1Jb}DC{Yk&EdV92"oMf^',')U.*A9tdOdeJM',fakerquqdjc(-0x37),fakerquqdjc(-0x38),'q`66b}xbv}}e9hl@8|r?%3E|$?1Jb}DC{Yk&EdV92"oMf^','?UdA2jkL',')U.*A9tdOdeJM','p<JFwDiX8&&Z=Yx','tGz5',fakerquqdjc(-0x36),'l}6AfXSt#rEcm68Wcx#{GC.#J@RJM','?UdA2jkL','+Q(5>','l}6AfXSt#rEcm68W]3+Ao',fakerquqdjc(-0x35),'>gL1)JUMu{{6cqx','*QbAADyt:','YG?KCXX;]40uXUUt','eY+Ao','XJDK9)04cUC*+l+iO"3?BM^T','o;hz','tGz5',fakerquqdjc(-0x35),fakerquqdjc(-0x34),'YG?wo','wU<{"Dgdi',fakerquqdjc(-0x34),fakerquqdjc(-0x33),'dV|5S/5dH40ZM',fakerquqdjc(-0x38),fakerquqdjc(-0x37),'e<JF7#1({qyZM',fakerquqdjc(-0x33),'mY(EzX(L','tGz5','$OOAzX(L','$OOAzX(L','tGz5','wZVt','u:Vt',fakerquqdjc(-0x38),'Yc/bw&>798!',fakerquqdjc(-0x34),'J|/Od',fakerquqdjc(-0x31),'6b0A(',fakerquqdjc(-0x33),'mY(EzX(L','tGz5','$OOAzX(L',fakerquqdjc(-0x30),fakerquqdjc(-0x38),fakerquqdjc(-0x32),'tGz5',fakerquqdjc(-0x38),fakerquqdjc(-0x2f),fakerquqdjc(-0x31),fakerquqdjc(-0x2e),fakerquqdjc(-0x33),'6b0A(','mY(EzX(L',fakerquqdjc(-0x38),'$OOAzX(L',fakerquqdjc(-0x30),fakerquqdjc(-0x38),'Hez5',fakerquqdjc(-0x38),'tGz5',fakerquqdjc(-0x2f),fakerquqdjc(-0x2e),'tGz5',fakerquqdjc(-0x36),fakerquqdjc(-0x30),'Fx$Fo','iNtA|p~','VUyQT}~','kU4jjX@1W@bOM','Z+R=]*<PpI3.5R_q!8OJ;','FCP=WLK','CJk=&RvE4I|.{dSq,@pTxV5f','j[pwRjumv_Ecm68W',':8oh%tY,|2df[d5,t9s==uqf','j[pwRj2L','AG)*','oG?w?','C|2j@9:f','B7ZGzDMfF','Z+R=]*xbF',':8ohxgi&F','g@ohJQ%[F{|AaA$NqS7},u.)%{EA"}[+$ikc8v!*G','QQOA,{bo5_^#M','89<c1LK','Z+R=]*<PpI3.5R_q.(pTxVop?~A?`','0:"c:s~','Z+R=]*<PpI3.5R_qzMX=&','PxcJ','U9OJ','E8oh=u:f','!89c;}P!F','x5TwQf2L','iNC5)vZiG&qI!6?g3G@5/Tq?V.$I;l<[l}ab/>"/L','x5TwQfr8x%{lal^ga4b','ov(5<wd<8_nqYlBtN]vYx','x5TwQfr8mR.&ZU([kVb','j/C}@jK','[M#7,}YE4I;#`','TV6z=wHs|krJM','[M~J=}UEzFAV:wS','FCVJbvmFx#YeWR/M:#`u"yA)X#*IsaSqD+/T@LeEG','Zge$t]~,|2Y?wHs,q@NJ','lg@:DX2LNHGsWBJ}oM',';3uj%v4L','hxNwnCG)i','g@oh{*w[|c)Lg.PqA;Trt>r_,c29`N[+;xnTj*G5jYrLK5BP&tUF6D&$5@@VA(gqn$ohZt>/!7K_dU<5MSRcY=.E0!7','lgI>McG){_,rpxAm*M','C9}TXvqf','g@oh{*w[|c)Lg.PqA;Trt>r_G','Xgb*=wrslr<&*^','2H],1=_]Mc','te,F=wv}8_$ZM','dd9=UTOf','6b0A(','7|X=yuF&F','g/.*_XEs"&10EPP7Ueb','0eWw19h(^@/','j(gF','XdEJ$','$8x==}i&F','wU<{"Dgdi','t9?jxVK','e<JF7#1({qyZM','"UTK){#n:','E8HjOt5,G','e<JF7#1({qyZM','}YF*',',O|5','eY+Aw9ioi','dVOzuDtdi','te,F=wv}8_$ZM','QG(ET{~zwF]@*L*xVNq{Uj*@B2fT$bhmt<Ze?D5;Rx5sMX@_ye8L)v`?@2{NEQ8";]+Vu+IyC5?DQ?uqiRC6QdKHOY`Ad>U^rV_|_"e[8L)v`?@27J+WP7G]QU4}FYZeAE=_+zh@TL+"j:(5?DU:Ee"sYL?+IbNw}C@1#5gZo)>+M%K{N7Sf3zmZkL=PL$;Q','kV.*','QQJjwD~','tGz5','"X]x`*VA"ofJM:+XHND30A]y;8BR.q:XUNh=p+0*I(','tGewECNL','C[ujGC~',':Q@5w9mL','M/%wJr(J*qHx$VB?,7wl@K%L]&&Z4b)"24Bvcq3L','9oJ*+1@N!_','iN{jE$SiMI2Z>B7wKDL','}/J>Z|,CUz>_mHp(#Ojv7aJLK@Aw2l|}','6O$2b1VFQ','7$TurR2NbU]AMP}g9gb','{$15CDfn?H[(sQ','ZHvjDmxJ/q1v9xL?G$f{kss<ZRkf,b'
// 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