mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
22 lines
30 KiB
JavaScript
22 lines
30 KiB
JavaScript
|
/*
|
|||
|
欢乐淘金(发财挖宝)助力
|
|||
|
|
|||
|
入口:特价APP —— 欢乐淘金
|
|||
|
|
|||
|
地址:
|
|||
|
https://bnzf.jd.com/?activityId=CmPJ1svf_qoTYXEwfOkKPg
|
|||
|
|
|||
|
环境变量:
|
|||
|
JD_FCWB_ID // 指定活动ID 不指定默认 APP入口 格式:CmPJ1svf_qoTYXEwfOkKPg
|
|||
|
JD_FCWB_InviterId // 指定助力码 非必须,不填默认助力账号一 格式:inviterId&inviterCode
|
|||
|
JD_FCWB_NUM // 指定人数 非必须,不填默认跑全部账号
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('欢乐淘金(发财挖宝)助力')
|
|||
|
var iil='jsjiami.com.v7';const ilI1li=iii1II;if(function(I1i11i,I1i11l,llIlii,llIlil,IIlil,ilI1lI,IiiIll){return I1i11i=I1i11i>>0x6,ilI1lI='hs',IiiIll='hs',function(IIlii,IlI1il,IilliI,IlI1ii,lIIiii){const I1i111=iii1II;IlI1ii='tfi',ilI1lI=IlI1ii+ilI1lI,lIIiii='up',IiiIll+=lIIiii,ilI1lI=IilliI(ilI1lI),IiiIll=IilliI(IiiIll),IilliI=0x0;const iI1lli=IIlii();while(!![]&&--llIlil+IlI1il){try{IlI1ii=-parseInt(I1i111(0x1d2,'Hd9H'))/0x1*(parseInt(I1i111(0x1de,'ZDmz'))/0x2)+parseInt(I1i111(0x160,'HYbB'))/0x3*(parseInt(I1i111(0x149,'vjJj'))/0x4)+parseInt(I1i111(0x192,'GJyN'))/0x5+-parseInt(I1i111(0x171,'7](h'))/0x6*(parseInt(I1i111(0x10e,'v87K'))/0x7)+-parseInt(I1i111(0x1d6,'*M9n'))/0x8*(-parseInt(I1i111(0x1a2,'L3H7'))/0x9)+parseInt(I1i111(0x14a,'JP3M'))/0xa+-parseInt(I1i111(0x174,'Zts('))/0xb*(-parseInt(I1i111(0x1a4,'*cfV'))/0xc);}catch(ll1iI){IlI1ii=IilliI;}finally{lIIiii=iI1lli[ilI1lI]();if(I1i11i<=llIlil)IilliI?IIlil?IlI1ii=lIIiii:IIlil=lIIiii:IilliI=lIIiii;else{if(IilliI==IIlil['replace'](/[kfIDMTugpyCRFAtErWNeLHY=]/g,'')){if(IlI1ii===IlI1il){iI1lli['un'+ilI1lI](lIIiii);break;}iI1lli[IiiIll](lIIiii);}}}}}(llIlii,I1i11l,function(iI1lll,l1lIll,I1l1II,IIli1I,I1i11I,llIliI,I1l1I1){return l1lIll='\x73\x70\x6c\x69\x74',iI1lll=arguments[0x0],iI1lll=iI1lll[l1lIll](''),I1l1II=`\x72\x65\x76\x65\x72\x73\x65`,iI1lll=iI1lll[I1l1II]('\x76'),IIli1I=`\x6a\x6f\x69\x6e`,(0x16a8d5,iI1lll[IIli1I](''));});}(0x30c0,0x8ba2e,Iii11l,0xc5),Iii11l){}const notify=require(ilI1li(0x1e4,'*cfV')),jdCookie=require('./jdCookie'),common=require(ilI1li(0x1b9,'&qoK')),{H5st}=require(ilI1li(0x177,'*cfV'));console['log'](''),console[ilI1li(0x1cc,'HFVB')](ilI1li(0x120,'GJyN')+$[ilI1li(0x1c4,'HYbB')]+'变量说明=========='),console['log']('JD_FCWB_InviterId\x20//\x20指定助力码,不填默认助力账号一'),console['log'](ilI1li(0x1d7,'OL4y')),console['log'](ilI1li(0x183,'z@z)')+$[ilI1li(0x15c,'JP3M')]+ilI1li(0x179,'idMg')),console[ilI1li(0x10d,'YD&f')]('');const isNotify=process[ilI1li(0x1b3,'3pW&')]['JD_FCWB_Notify']===ilI1li(0x13f,'f[9E'),fcwbcode=process['env'][ilI1li(0x1b5,'JP3M')]||'',fcwbnum=process['env'][ilI1li(0x1d4,'zcbz')];let link=process[ilI1li(0x195,')3cA')]['JD_FCWB_ID']||ilI1li(0x13c,'d#2#');const WAIT='1';let waitTimes=parseInt(WAIT)*0x3e8;$[ilI1li(0x146,'IZmN')]=0x0,$[ilI1li(0x142,'idMg')]=![];let cookie='';const cookiesArr=Object[ilI1li(0x158,'T3iH')](jdCookie)[ilI1li(0x190,'z@z)')](iIIII1=>jdCookie[iIIII1])[ilI1li(0x1b1,'g4Fe')](i1l1ll=>i1l1ll);!cookiesArr[0x0]&&($[ilI1li(0x10a,'&qoK')]($[ilI1li(0x1e3,'@X9Y')],'【提示】请先获取Cookie'),process['exit'](0x1));!(async()=>{const IIliI=ilI1li,I1iIiI={'BYZfj':function(li1I1,i1ilil){return li1I1+i1ilil;},'mnhlS':'❖\x20当前设置活动ID为:','Sahkp':function(lilIii,i1ill1){return lilIii+i1ill1;},'gOFjd':function(iIIl1l,llIli1){return iIIl1l(llIli1);},'paSrb':IIliI(0x194,'IZmN'),'xViZn':function(iliIII){return iliIII();}};console[IIliI(0x1d8,'L46v')](I1iIiI['BYZfj'](I1iIiI[IIliI(0x135,')3cA')],link));fcwbnum?console[IIliI(0x18d,'f[9E')](IIliI(0x188,'6]j%')+fcwbnum+']'):console[IIliI(0x1cb,'7](h')](IIliI(0x150,'ZDmz'));if(fcwbcode){let iIIl1i=fcwbcode['split']('&');$[IIliI(0x19b,'d#2#')]=iIIl1i[0x0],$[IIliI(0x180,'0M*I')]=iIIl1i[0x1],console[IIliI(0x136,'@X9Y')](IIliI(0x10b,'9f14')+$['zdinviteCode']+']');}else console['log'](IIliI(0x11a,'7](h'));notify[IIliI(0x1be,'[[H*')]({'title':$[IIliI(0x17d,'5Wag')]});for(let I1lllI=0x0;I1lllI<cookiesArr[IIliI(0x1c6,'v87K')];I1lllI++){$['index']=I1iIiI[IIliI(0x12e,'HYbB')](I1lllI,0x1),cookie=cookiesArr[I1lllI],common[IIliI(0x17f,'zcbz')](cookie),$[IIliI(0x16e,'%g$!')]=I1iIiI['gOFjd'](decodeURIComponent,common[IIliI(0x1cd,'XE2#')](cookie,I1iIiI[IIliI(0x168,'d#2#')])),$['UA']=common[IIliI(0x1e0,'zfib')]($[IIliI(0x166,'*M9n')]),$[IIliI(0x1dc,'zfib')]=notify['create']($['index'],$['UserName']),$[IIliI(0x1a9,'Gbs(')]='',console[IIliI(0x155,'vS]6')](IIliI(0x1af,'HYbB')+$[IIliI(0x11c,'L46v')]+'】'+($[IIliI(0x164,'cjeE')]||$['UserName'])+IIliI(0x1bc,'T3iH')),await I1iIiI['xViZn'](Main),common[IIliI(0x1b8,'HYbB')]();if($[IIliI(0x1ce,')3cA')]||$['run
|
|||
|
// 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
|