mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
18 lines
77 KiB
JavaScript
18 lines
77 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
链接:https://prodev.m.jd.com/mall/active/Dqsw45xjnhWQDb8XKV8gPtPb49f/index.html
|
|||
|
|
|||
|
环境变量:
|
|||
|
jd_hsh_inviterId // 指定助力码 非必须,不填默认助力账号一
|
|||
|
jd_hsh_num // 指定人数 非必须,不填默认跑全部账号
|
|||
|
|
|||
|
cron:0 0,15 * * * jd_hsh_help.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('黑神话助力');
|
|||
|
function O2pNtzS(){}var nPGVH6C=Object['defineProperty'],Qj_8d2w,Nwbb3Sj,hVozo2,d4Mb5T,QhM8tpU,Oj1lpM,eeISByP,i5kyK6o,fMjzoY,RAhDc3,El0c7XK,Zx6b2TB,ZPUH4FW,hu0YozT,ClpCQ8X,dwBCfG,Lq1f4N;function QEwhJ3(O2pNtzS){return Qj_8d2w[O2pNtzS>0x4c?O2pNtzS-0x11:O2pNtzS>0x4c?O2pNtzS+0x27:O2pNtzS>0x4c?O2pNtzS-0x3c:O2pNtzS>0x4c?O2pNtzS-0x3a:O2pNtzS+0x5e]}Qj_8d2w=c45T_al();function qQim7i(O2pNtzS,nPGVH6C){return Nwbb3Sj[QEwhJ3(-0x32)](null,O2pNtzS,'length',{value:nPGVH6C,configurable:QEwhJ3(-0x1)})}Nwbb3Sj=Object.defineProperty;var x8QTp8=[],pQyDgrA=['{Zi4W1=0',')r=L_nX@F','P%PM8rwLF','Bs:ojNM]M`@{yv','GR4Sj','H2BVAPWW#Em','j(u!""wMI@n_oU','oK<{9','1@tmM*D0','8IPl9gQ0','V@H#','820bD','tRgYv',QEwhJ3(-0x5e),QEwhJ3(-0x5e),'z<RaafP','6qmO0[^i','D9kVBHBi','EEyoSrBizm0|W6p1%A','JS0zc',',1wz','FbxLEX6i',';1fYE[!i','Q9?a)','FbxLEX3pUN9H(]"xk6[L','FbxLEX3pw7d&A','~Om9$w`5[m9)#EaNA#MOu1;`W7S','`EgY"rm?8','bby_+rNi','!Ele_','A<MY','16gYafyi',QEwhJ3(-0x56),QEwhJ3(-0x5c),',im=G09jh_}+QGfX=:&jh4MQ)ra!~10;Ea>o)','=|^Yc','w={zlX"dvV2|#ED1~=FoDHwdvmD&JfsEWRBrnp3p(B"yAG&j"1}H#akp!7UC84cGCOZOv','8a^OSV[18','xqLY','8D{5?fMmXd,%hs[K9iO(ShL5.F?afJfARjC8DM6FlmV}a"La^A`Z5"eE}GeafJfA','$d"Z#&/=!=B>b',QEwhJ3(-0x5e),'i#y<b[_i','#Y|+sk6i',QEwhJ3(-0x5d),'8D{50f@ua1|zLz$3,eA#qa)=P','xqLY',QEwhJ3(-0x5d),'xqLY','6qmO0[^i','O6{z%fP',QEwhJ3(-0x5c),'}EBreX6i',']1%o"DP','%E|r!e%7]&+','xODVEK)??l','NE|r!e%7]&,o6]6TzA',',=xL2[Fi','NE`ap,P','^E#rg|u%8',':9ForXBi','g6}H5K)??l','xqLY','d)FVQ%?u','M?];51O',QEwhJ3(-0x53),'PT4H5','NE@a!fw`53KkA','nyxa(rn`9`|Zsfd1','_#5z6','tR|rwZP','xqOo/Myi','16`aBHAVn','vq`a)','tRBrT|3%0m)m]<',QEwhJ3(-0x5b),QEwhJ3(-0x5d),QEwhJ3(-0x5a),'5#{zaex`9`OkA',QEwhJ3(-0x5b),QEwhJ3(-0x5d),QEwhJ3(-0x5a),'%#`a+rNi','5#{zaex`9`OkA','>}kVofnX?mmZW62','xqLY',QEwhJ3(-0x52),QEwhJ3(-0x57),'%#`a+rNi',QEwhJ3(-0x51),']1QaJXIxU&/*uQ?Fhj0a)',']1QaJXq5n','>}kVofnX?mmZW62','z<Raaf,x8','6q%KMXXdhB@_X##x','O60a)','#fG/IoH[Wnl9FAF)`w=ORXgi','xqLY','>}kVof_i','Y&^Yafyi',QEwhJ3(-0x5d),']1QaJXq5n',QEwhJ3(-0x59),'6q%o)','o#}Hvfw`n',QEwhJ3(-0x59),QEwhJ3(-0x58),QEwhJ3(-0x4f),'o#gYc',QEwhJ3(-0x5d),']1%o"DP',QEwhJ3(-0x58),QEwhJ3(-0x54),QEwhJ3(-0x5d),'|99aLX^i','|99aLX^i',QEwhJ3(-0x5d),'SOLY',QEwhJ3(-0x5d),QEwhJ3(-0x5d),QEwhJ3(-0x55),'RN"z',']1QaJXIxU&/*uQ?F`EgY_',QEwhJ3(-0x57),QEwhJ3(-0x58),'QR@a^','izbR7Lb6','Gg7k','|99aLX^i','Q=P|t%S6',QEwhJ3(-0x5d),QEwhJ3(-0x56),'Gg7k','xqLY',QEwhJ3(-0x55),'(S`0','?C/*l',']1QaJXIxU&/*uQ?F*2UHqM{Uk7(kA',']1QaJXIxU&/*uQ?Fhj0a)','QR@a^',QEwhJ3(-0x58),QEwhJ3(-0x54),QEwhJ3(-0x5d),'|99aLX^i',QEwhJ3(-0x53),'xqLY',QEwhJ3(-0x56),'xqLY','xqLY','g=9aSrtkA&#',']1QaJXIxU&/*uQ?Fhj0a)','}EH[c',QEwhJ3(-0x5d),QEwhJ3(-0x52),'%#`a+rNi','nqcn{','nyxag>P','E#,<!1P','N#BrrX7pF7R9A',']1QaJXIxU&/*uQ?F`EgY_','nyxaC>P','yY@a)Q[^+&6*l<bF%=UHqMui','r~>o(r_u[l/*uQ?F','NE{z;|3%6B<id<u%|9SaaeFi','r~>o(r+i','aq5z',')q%o%','y6Br=9Ni','KO]8h,jin',']1QaJXq5n','/Ekr2[`X8','W;r<','2#o<','Q;%]ZFP','qqpo(rYnqlCkA','NE{zqwR)n','w={zlX"dvV<|5*xF(_HV|.V?oV;3X#[F#14HrX7pw`','<<9aDHgi','9R@a^',']1QaJXBi','L6#r2[1i','m}QL8JP','*3[VN','E9IL$>P',']1QaJXIxU&/*uQ?F*2UHqM{Uk7(kA','qqpo(rqA','yY3o)','<<9aDHR)Yl4UA','@8v*8.P',']1QaJXIxU&/*uQ?Fhj0a)','AEkr2[1i','w={zlX"dvVg','+6V6SaH^EV]','*w3fBH1%w`(','cR@LE[`X8','xqLY','O}kV;U1i','pp6j{',')]5X','YpdG*zOi',QEwhJ3(-0x50),'2Y!o<J+i','nyMY5[Znqm3:CQ%wjq7Y=!3%E{|:d]}~]1tR=cv=i','2Y!o<J&?2bH]t]4wtBR',')[^Y}o`}?lT36]"xyh[62','}~9V@*ki','.BQL','r}yf=rP','%3^tr=#Y&Ux^N','bp@s~oQ?5OU.N','dj7YafFi','Tl7{X$fi','Em!XLehE,^#`R@S3O^Nz4oZ(J^>UQ;Hy9ASa}<`YW','Fl`{6$vrKf#.n2Qry}cX','FlvW=>&imQ,?yn.A/N','%3xTHefi','s2yoTMq5n','w={zlX"d6Lp>w*xF(_HV|.V?%LB9AGd1_q4HrX8ur3V>PuKx)|DnW,)cu==M(2wF4c{z]|.}`OP?<DIujbQL3a*^!`O',']w:cA*q5HlD&>2auzA','l}dGI>n%Ks(<l0MyZxa86?Ai','V,rXdaeYT#nmkFElPpcFDV,N','GEW]b3d}KBzvf(5Bj=oYtXbi','XCz*,wRW$N!9T<oGw=CYv','m]=aJeyi','l}dGI>n%Ks(<l0MyZxa86?8:W','>lwG~oU?FUS^Gj','B#J%$a?JjL','Mt)8~oeA:I6hN','QR@a^','O60aoen)n','TBlE','+r)Z"UVn/s04[O=',QEwhJ3(-0x51),'{p,**=w/E','o#}Hvfw`n','6].T,!D',';2b[La|+W','Yp2T56VrW','16Vz','8a^OSV[18','D9gY','O60aoen)n',QEwhJ3(-0x50),'xODVWo[1?l|ZA','<q^/!HPLoVh7ziz2Ey3H#rz7"+J!|Rsux}ZO%fYd(2Y.AX7l,O?i5
|
|||
|
|
|||
|
// 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
|