mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
21 lines
68 KiB
JavaScript
21 lines
68 KiB
JavaScript
|
/*
|
|||
|
地址:
|
|||
|
https://bnzf.jd.com/?activityId=CmPJ1svf_qoTYXEwfOkKPg
|
|||
|
|
|||
|
助力脚本为: jx_fcwb_help.js
|
|||
|
|
|||
|
环境变量:
|
|||
|
JD_FCWB_ROUND 指定剩余血量 非必须,不填默认剩余 1 退出
|
|||
|
JD_FCWB_TXNUM 轮询提现页数 默认查询第一页,一般无需填写
|
|||
|
JD_FCWB_EXCHANGE 达到剩余血量是否领取奖励,默认不启用(领取奖励后相当于结束当天活动,无法继续挖宝,请自行对应设置)
|
|||
|
JD_FCWB_SWISH 是否延长提现时间,默认不延长(true/false)
|
|||
|
|
|||
|
cron:1 1 1 1 * jx_fcwb_auto.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('特价现金挖宝任务')
|
|||
|
var iil='jsjiami.com.v7';const l1lI1l=iii1II;(function(lI1lIl,liiili,I1ll11,lI1lIi,Iii1Ii,Iii1Il,i1l1I1){return lI1lIl=lI1lIl>>0x1,Iii1Il='hs',i1l1I1='hs',function(lI1lI1,llIl1,l1iIiI,illlli,illlll){const l1lI1i=iii1II;illlli='tfi',Iii1Il=illlli+Iii1Il,illlll='up',i1l1I1+=illlll,Iii1Il=l1iIiI(Iii1Il),i1l1I1=l1iIiI(i1l1I1),l1iIiI=0x0;const IIIIiI=lI1lI1();while(!![]&&--lI1lIi+llIl1){try{illlli=parseInt(l1lI1i(0x1e5,'m!jR'))/0x1+parseInt(l1lI1i(0x1d7,'I3X7'))/0x2+-parseInt(l1lI1i(0x39b,'mIR2'))/0x3+parseInt(l1lI1i(0x3d5,'3%@a'))/0x4+-parseInt(l1lI1i(0x29b,'ZZOd'))/0x5+-parseInt(l1lI1i(0x2b9,'wK#0'))/0x6*(-parseInt(l1lI1i(0x151,'ih1y'))/0x7)+parseInt(l1lI1i(0x397,'N*J8'))/0x8;}catch(II1I1){illlli=l1iIiI;}finally{illlll=IIIIiI[Iii1Il]();if(lI1lIl<=lI1lIi)l1iIiI?Iii1Ii?illlli=illlll:Iii1Ii=illlll:l1iIiI=illlll;else{if(l1iIiI==Iii1Ii['replace'](/[TVghOLXFwuSHqJbMy=]/g,'')){if(illlli===llIl1){IIIIiI['un'+Iii1Il](illlll);break;}IIIIiI[i1l1I1](illlll);}}}}}(I1ll11,liiili,function(i1i111,ii1l1I,lI1lII,lIill1,iiI1i1,ilIlII,iIiil1){return ii1l1I='\x73\x70\x6c\x69\x74',i1i111=arguments[0x0],i1i111=i1i111[ii1l1I](''),lI1lII=`\x72\x65\x76\x65\x72\x73\x65`,i1i111=i1i111[lI1lII]('\x76'),lIill1=`\x6a\x6f\x69\x6e`,(0x15b943,i1i111[lIill1](''));});}(0x17a,0xc2b79,Iii11l,0xbf),Iii11l)&&(iil=0xbf);const jdCookie=require('./jdCookie'),notify=require('./utils/Rebels_sendJDNotify'),common=require('./utils/Rebels_jdCommon'),{H5st}=require(l1lI1l(0x1c0,'mQkB'));console[l1lI1l(0x277,'sTv@')](''),console[l1lI1l(0x244,'fC59')]('=========='+$[l1lI1l(0x35a,'a[Ww')]+'变量说明=========='),console[l1lI1l(0x286,'a0u]')](l1lI1l(0x15f,'6f]&')),console[l1lI1l(0x265,'3%@a')](l1lI1l(0x3be,'b4UZ')),console[l1lI1l(0x35f,'sVKb')]('JD_FCWB_EXCHANGE\x20//\x20达到剩余血量是否领取奖励'),console[l1lI1l(0x309,'RU&#')](l1lI1l(0x24a,'sTv@')),console[l1lI1l(0x3e2,'I3X7')](l1lI1l(0x347,'NmQD')+$[l1lI1l(0x3c7,'ih1y')]+l1lI1l(0x134,'mQkB')),console[l1lI1l(0x349,'6f]&')]('');const bloodMinimum=process['env'][l1lI1l(0x1e7,'ZZOd')]||'1',linkId=process[l1lI1l(0x1d8,'a0u]')]['JD_FCWB_ID']||l1lI1l(0x324,'WMsW'),pagination=process[l1lI1l(0x17c,'wYTO')][l1lI1l(0x282,'I3X7')]?process[l1lI1l(0x2a7,'ijPZ')]['JD_FCWB_TXNUM']:'1',Exchange=process['env'][l1lI1l(0x320,'GYE1')]==='true',Swish=process['env'][l1lI1l(0x1ff,'2zzN')]==='true',MAX_RETRY=process[l1lI1l(0x23e,'I3X7')][l1lI1l(0x270,'7caB')]||'3',isNotify=process['env'][l1lI1l(0x118,'fC59')]==='true';let time=Date[l1lI1l(0x1e1,'2(dk')](),business='happyDigger';const roundMaxBombNums={'Bn1VWXtvgTv5ewPoMR-X8A':{0x1:0x7,0x2:0xf,0x3:0x11}};let waitTimes=0x3e8;jdCookie[l1lI1l(0x394,'sIt1')]&&(jdCookie['RS_PROXY_TUNNRL']||jdCookie['RS_PROXY_TUNNRL'])&&(waitTimes=0x64);let cookie='';const cookiesArr=Object['keys'](jdCookie)[l1lI1l(0x20e,'ijPZ')](liI1iI=>jdCookie[liI1iI])[l1lI1l(0x13b,'BQRv')](iI1Il1=>iI1Il1);!cookiesArr[0x0]&&($['msg']($[l1lI1l(0x345,'mIR2')],l1lI1l(0x3b3,'6f]&')),process[l1lI1l(0x38e,'3To[')](0x1));function Iii11l(){const iIiiil=(function(){return[...[iil,'wVJjsTubjXhiFaqOmLig.uucTXoXSmM.vyH7HTOb==','W5uGzG','W4lLTABMN53LI6FLI5ZKU7lMLPik','ACkUWPjhcNSAW4K','WQ7cLIZdM34','CCkUWQy','q2a8bCoUytH4gaS','dKedW5BcKva','WQhcKt4','wYHkW6xcKCkAuSkgCa','WQqgW7yXdW','5O6m5A6v5AAX6lsbWP0','W49BoCkZW6O','gmkOW43dTSkriG','n8o3mCo2WOJdNW','g3RcVCo9W7NdSCk3WRmxWPqhg8khW6n8WP4','WQZdMSk3EW','WPBdOCkRb8kVFmkV','sX0gW7eEtIK','WRJdJmkteSkyrmkDbeegWOfLpZblBweJnq','lSkWWOu','hN7cVSo+W6hdKSk7','WRBcKSoTWRVdMG','W7b2ra','d8k1W4RdLCkg','cKqwW7tcKa','W6xcPIS','WOhdI8kPdSky','WRPZW67cOwq','gCk7W4VdMG','eCoDBCklFffS','xNiP','W7iJB0BdSa','W7DO5AAH6lwC772q','W59ps8knW7e','CmktW7hcGSk5','WOtcVHzlEa','Fa1NW4JcT8kPqmkWsSkGW6XzW5C','W6jleSovdLpcGv82','WRVdKmkQAJVdMLS','DKi3eCov','CCoUW5i','8jYAT2a','utFcVCoXW5m','h8ksW5FdRCkM','CSkkW63cJG','W710tmknW4zU','WQhcHmoNiSoHEXjD','ka8FW7K4','WOxcM8ovWOtdTa','W4FdLhpcNZ82how+MUwMIooaIUs6Gos4GUI1O+wpVa','W5yqWPRcG17dMSkd','CCklWOvDhq','tMCoWRBdHvNdGa','WRHia8oIW4q','W5KJAdNdVNhcOSoPcHX9W4e','tmoxgb8tdSoSCCkb','oSoRp8o9WPFdMxm','s8kmx8oI','WQVdNSo1EvS','mCoTaCoRWOW','W7pcOsBdOei','xXPpWQpdMGiNW6
|
|||
|
// 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
|