jdpro/jd_fcwb_help.js

22 lines
37 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
欢乐淘金发财挖宝助力
入口京东APP玩一玩欢乐淘金
地址
https://bnzf.jd.com/?activityId=Bn1VWXtvgTv5ewPoMR-X8A
环境变量
JD_FCWB_ID // 指定活动ID 不指定默认 APP入口 格式Bn1VWXtvgTv5ewPoMR-X8A
JD_FCWB_InviterId // 指定助力码 非必须,不填默认助力账号一 格式inviterId&inviterCode
JD_FCWB_NUM // 指定人数 非必须,不填默认跑全部账号
cron:1 1 1 1 *
*/
const $ = new Env('欢乐淘金(发财挖宝)助力')
var il='jsjiami.com.v7';const ililIi=iii1II;(function(II1iI,llI1II,lIli1l,lillIi,illIi1,ii1ili,liil1i){return II1iI=II1iI>>0x2,ii1ili='hs',liil1i='hs',function(lI1lil,i1l1iI,liil1l,lI1lii,Iiili1){const liiI1i=iii1II;lI1lii='tfi',ii1ili=lI1lii+ii1ili,Iiili1='up',liil1i+=Iiili1,ii1ili=liil1l(ii1ili),liil1i=liil1l(liil1i),liil1l=0x0;const Iil1l1=lI1lil();while(!![]&&--lillIi+i1l1iI){try{lI1lii=parseInt(liiI1i(0x16f,'VdoB'))/0x1*(parseInt(liiI1i(0x1a5,'Fxpj'))/0x2)+-parseInt(liiI1i(0x146,'%ne3'))/0x3+parseInt(liiI1i(0x11a,'PAmr'))/0x4*(parseInt(liiI1i(0x1e2,'@(o5'))/0x5)+-parseInt(liiI1i(0x17e,'xxZQ'))/0x6*(-parseInt(liiI1i(0x1c8,'Fxpj'))/0x7)+parseInt(liiI1i(0x14f,'npAf'))/0x8*(-parseInt(liiI1i(0x14a,'ZNku'))/0x9)+-parseInt(liiI1i(0x142,')9It'))/0xa*(parseInt(liiI1i(0x120,'JjUU'))/0xb)+-parseInt(liiI1i(0x122,'*8dy'))/0xc;}catch(i1i11I){lI1lii=liil1l;}finally{Iiili1=Iil1l1[ii1ili]();if(II1iI<=lillIi)liil1l?illIi1?lI1lii=Iiili1:illIi1=Iiili1:liil1l=Iiili1;else{if(liil1l==illIi1['replace'](/[bwMyVrUkWOEALDGS=]/g,'')){if(lI1lii===i1l1iI){Iil1l1['un'+ii1ili](Iiili1);break;}Iil1l1[liil1i](Iiili1);}}}}}(lIli1l,llI1II,function(il1iIl,iii1ii,il1iIi,iii1il,II11li,I1l11i,iIIiiI){return iii1ii='\x73\x70\x6c\x69\x74',il1iIl=arguments[0x0],il1iIl=il1iIl[iii1ii](''),il1iIi=`\x72\x65\x76\x65\x72\x73\x65`,il1iIl=il1iIl[il1iIi]('\x76'),iii1il=`\x6a\x6f\x69\x6e`,(0x159f99,il1iIl[iii1il](''));});}(0x2fc,0x76b57,Iii11l,0xc1),Iii11l)&&(il=0xc1);const notify=require('./utils/Rebels_sendJDNotify'),jdCookie=require('./jdCookie'),common=require(ililIi(0x1b5,'%ne3')),{H5st}=require(ililIi(0x130,'%cLz'));console[ililIi(0xe3,'sp(P')](''),console[ililIi(0xb3,'i^FX')](ililIi(0x13f,'xxZQ')+$['name']+ililIi(0x201,'@(o5')),console[ililIi(0x16c,'eI^Z')](ililIi(0xd0,'$q4Y')),console[ililIi(0x152,'[CP8')](ililIi(0x1be,'$q4Y')),console[ililIi(0xb3,'i^FX')](ililIi(0x198,'i^FX')+$[ililIi(0x1e6,'k#Io')]+ililIi(0x170,'npAf')),console[ililIi(0xce,'rQ8F')]('');const isNotify=process[ililIi(0xec,'npAf')][ililIi(0xfe,'bJvS')]===ililIi(0x16e,'rQ8F'),fcwbcode=process[ililIi(0x183,'*8dy')][ililIi(0x10b,'%ne3')]||'',fcwbnum=process[ililIi(0x167,'IPES')][ililIi(0x1f5,'UMFe')];let link=process[ililIi(0xf4,'VkNq')][ililIi(0x137,'Lw(5')]||ililIi(0xbb,'bRz*');const WAIT='1';let waitTimes=parseInt(WAIT)*0x3e8;$[ililIi(0x10c,'aWhM')]=0x0,$[ililIi(0x192,'*8dy')]=![];let cookie='';const cookiesArr=Object[ililIi(0x1ef,'Ob!m')](jdCookie)['map'](iIII1l=>jdCookie[iIII1l])[ililIi(0x100,'jz@3')](lllil=>lllil);!cookiesArr[0x0]&&($[ililIi(0x126,'$q4Y')]($[ililIi(0x191,'PAmr')],ililIi(0x166,'Lw(5')),process['exit'](0x1));!(async()=>{const lilIIl=ililIi,iI11Il={'QUDUc':'❖\x20当前设置活动ID为','nhLYy':lilIIl(0xf7,'jz@3'),'djnjm':function(iIII1i,iil1i1){return iIII1i===iil1i1;},'EGdkp':'kGMyK','YUwsj':lilIIl(0x18a,'@(o5'),'cuSAL':function(il1i11,IlIll1){return il1i11<IlIll1;},'ARdEr':function(IlIII,ilil1l){return IlIII+ilil1l;},'iQBMI':function(illlIi,I1lIii){return illlIi(I1lIii);},'gbktR':function(IiI1I){return IiI1I();},'CYCZk':function(illlIl,i11ill,IIIIIi){return illlIl(i11ill,IIIIIi);},'TyLcE':function(IIIIIl,I1lIil){return IIIIIl*I1lIil;}};console[lilIIl(0x16c,'eI^Z')](iI11Il[lilIIl(0x135,'8QvF')]+link);fcwbnum?iI11Il[lilIIl(0x1ae,'VkNq')]!==iI11Il[lilIIl(0xbc,'8QvF')]?IliI1I[lilIIl(0x106,')9It')](lilIIl(0x1fd,'Ef*U')+lI1Iii):console[lilIIl(0x131,'ZNku')](lilIIl(0x1f3,'Hu%@')+fcwbnum+']'):iI11Il[lilIIl(0x185,'t!nP')](iI11Il[lilIIl(0x136,'Iog2')],lilIIl(0x1e5,'i^FX'))?ll1il[lilIIl(0x139,'Iog2')]('❓'+IiiIiI+'\x20'+lilii[lilIIl(0xe7,'VkNq')](l1iiI)):console[lilIIl(0x190,'ikq*')](lilIIl(0x1bc,'VkNq'));if(fcwbcode){let IIIl1l=fcwbcode['split']('&');$['zdinviter']=IIIl1l[0x0],$[lilIIl(0x129,'eS03')]=IIIl1l[0x1],console[lilIIl(0x152,'[CP8')](lilIIl(0x1df,')9It')+$[lilIIl(0x1de,'A#Gk')]+']');}else lilIIl(0xd1,'rQ8F')!==iI11Il['YUwsj']?IliI1i[lilIIl(0x106,')9It')]('>\x20'+ll1ii[lilIIl(0x1e9,'cjQf')]):console['log'](lilIIl(0x104,'#9Mt'));notify[lilIIl(0x18f,'Z03F')]({'title':$[lilIIl(0x15a,'IqkA')]});for(let i11ili=0x0;iI11Il[lilIIl(0xb5,'cjQf')](i11ili,cookiesArr[lilIIl(0x11
// 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