mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
18 lines
48 KiB
JavaScript
18 lines
48 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
链接:https://pro.m.jd.com/mall/active/3pdfN7oPzb6if7pB8N8dMr4dV2ys/index.html
|
|||
|
|
|||
|
环境变量:
|
|||
|
JD_PDD3_InviterId // 指定助力码 非必须,不填默认助力账号一
|
|||
|
JD_PDD3_NUM // 指定人数 非必须,不填默认跑全部账号
|
|||
|
|
|||
|
cron:0 0,14 * * * jd_duojin_help.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('夺金刮刮乐助力');
|
|||
|
var iil='jsjiami.com.v7';const l1IIlIl1=liIIli1i;(function(Illl11ii,IiIlllI,Iil11lI1,ill1Iii,Ili1l1i1,lIiillll,i1ll1lI1){return Illl11ii=Illl11ii>>0x7,lIiillll='hs',i1ll1lI1='hs',function(l1111I1,IIi1llI1,i1iII1i1,lilI11II,lIi1i11){const l1liIi11=liIIli1i;lilI11II='tfi',lIiillll=lilI11II+lIiillll,lIi1i11='up',i1ll1lI1+=lIi1i11,lIiillll=i1iII1i1(lIiillll),i1ll1lI1=i1iII1i1(i1ll1lI1),i1iII1i1=0x0;const i1lIiIil=l1111I1();while(!![]&&--ill1Iii+IIi1llI1){try{lilI11II=parseInt(l1liIi11(0x199,'yjg)'))/0x1+-parseInt(l1liIi11(0x121,'e^45'))/0x2*(parseInt(l1liIi11(0x1c3,'wPy&'))/0x3)+-parseInt(l1liIi11(0x1e8,'xZ)z'))/0x4+parseInt(l1liIi11(0x154,'CB9E'))/0x5+-parseInt(l1liIi11(0x133,'J*qd'))/0x6+parseInt(l1liIi11(0x1b2,'!dS5'))/0x7*(parseInt(l1liIi11(0x106,'Z9JL'))/0x8)+parseInt(l1liIi11(0x147,'BW4@'))/0x9;}catch(ii11IiIl){lilI11II=i1iII1i1;}finally{lIi1i11=i1lIiIil[lIiillll]();if(Illl11ii<=ill1Iii)i1iII1i1?Ili1l1i1?lilI11II=lIi1i11:Ili1l1i1=lIi1i11:i1iII1i1=lIi1i11;else{if(i1iII1i1==Ili1l1i1['replace'](/[nuMQSPqYWIBDXHGgKUOAe=]/g,'')){if(lilI11II===IIi1llI1){i1lIiIil['un'+lIiillll](lIi1i11);break;}i1lIiIil[i1ll1lI1](lIi1i11);}}}}}(Iil11lI1,IiIlllI,function(ll1l1lll,i11liI1,Ii1I1i1I,Il11iI1I,ii1i1I1i,IIIlil1i,l1IIlllI){return i11liI1='\x73\x70\x6c\x69\x74',ll1l1lll=arguments[0x0],ll1l1lll=ll1l1lll[i11liI1](''),Ii1I1i1I='\x72\x65\x76\x65\x72\x73\x65',ll1l1lll=ll1l1lll[Ii1I1i1I]('\x76'),Il11iI1I='\x6a\x6f\x69\x6e',(0x17ad72,ll1l1lll[Il11iI1I](''));});}(0x5e00,0xdbe40,lIli1l1,0xbe),lIli1l1)&&(iil=0x880);const notify=require(l1IIlIl1(0x245,'ISIg')),jdCookie=require(l1IIlIl1(0x10f,'cAkq')),common=require(l1IIlIl1(0x193,'dB70')),{H5st}=require(l1IIlIl1(0x1de,'e^45')),isNotify=process[l1IIlIl1(0x224,'*9*x')][l1IIlIl1(0x1d5,'3u^7')]==='true',pddcode=process['env'][l1IIlIl1(0x1ad,'wPy&')]||'',pddnum=process[l1IIlIl1(0xe1,'hD28')][l1IIlIl1(0x20d,'ffpa')],linkId=l1IIlIl1(0x13c,'CB9E'),PDD_WAIT='1';let waitTimes=parseInt(PDD_WAIT)*0x3e8;$[l1IIlIl1(0x20a,'hD28')]=0x0,$[l1IIlIl1(0x113,'!dS5')]=![];let cookie='';const cookiesArr=Object[l1IIlIl1(0x15c,'cAkq')](jdCookie)[l1IIlIl1(0x1a6,'i1uc')](liIIi1l1=>jdCookie[liIIi1l1])['filter'](lIII1l1l=>lIII1l1l);!cookiesArr[0x0]&&($[l1IIlIl1(0x1d1,'Ig)8')]($[l1IIlIl1(0x12f,'Ho[T')],l1IIlIl1(0x149,'LcS$')),process[l1IIlIl1(0x19b,'Hm36')](0x1));!(async()=>{const IiIilII1=l1IIlIl1,ii1Ii11i={'JetGZ':function(lii111li,lIlilii1,iIIl1Iil){return lii111li(lIlilii1,iIIl1Iil);},'kPSuh':IiIilII1(0xde,'dB70'),'pQwUr':function(li11l11I,i1IllIiI){return li11l11I<i1IllIiI;},'obLja':function(i11III11,Iil1illl){return i11III11+Iil1illl;},'aUXuN':function(i1ilIlIl,Ill1IiIl){return i1ilIlIl(Ill1IiIl);},'LPfnN':function(IiiIli1i){return IiiIli1i();},'IPOzX':function(l1ill1l,lllI1i){return l1ill1l+lllI1i;},'tOURT':function(iiI1llli,llII1IiI){return iiI1llli+llII1IiI;},'jtQKm':function(iIlII1II,Il1illIi){return iIlII1II*Il1illIi;},'TWPWd':function(lIlili,liIllIli,II1iiIi1){return lIlili(liIllIli,II1iiIi1);}};authorCodeList=await getAuthorCodeList(IiIilII1(0x15e,'*QbD'));authorCodeList?(console[IiIilII1(0xfb,'#PP4')]('❖\x20测试连通性中...\x0a❖\x20服务状态正常...\x0a'),$['authorCode']=authorCodeList[ii1Ii11i['JetGZ'](random,0x0,authorCodeList[IiIilII1(0x181,'dR$H')])]):console[IiIilII1(0x186,'Z9JL')](ii1Ii11i['kPSuh']);if(pddnum)console[IiIilII1(0x163,'d5f3')](IiIilII1(0x22f,'*pfd')+pddnum+']');pddcode?console[IiIilII1(0x243,'EudE')]('❖\x20已填写指定助力变量,开始助力\x20['+pddcode+']'):console['log']('❖\x20未填写指定助力变量,开始助力账号[1]');notify[IiIilII1(0x23b,'hM94')]({'title':$['name']});for(let l1llI1l1=0x0;ii1Ii11i[IiIilII1(0x112,'#hx0')](l1llI1l1,cookiesArr[IiIilII1(0x1ee,'#hx0')]);l1llI1l1++){$['index']=ii1Ii11i[IiIilII1(0xdd,'1!4p')](l1llI1l1,0x1),cookie=cookiesArr[l1llI1l1],common[IiIilII1(0x104,'wPy&')](cookie),$[IiIilII1(0x195,'#PP4')]=ii1Ii11i[IiIilII1(0x142,'BW4@')](decodeURIComponent,common[IiIilII1(0x261,'!3Q4')](cookie,IiIilII1(0x18c,'CB9E'))),$['UA']=common[IiIilII1(0x240,'9B19')]($[IiIilII1(0x1cd,'*9*x')]),$['message']=notify[IiIilII1(0x262,'RlOf')]($[I
|
|||
|
|
|||
|
// 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
|