KR/jd_fcwb_auto.js

38 lines
86 KiB
JavaScript
Raw Normal View History

2023-12-05 17:20:15 +08:00
/*
欢乐淘金发财挖宝
入口APP 玩一玩 欢乐淘金
地址
https://bnzf.jd.com/?activityId=Bn1VWXtvgTv5ewPoMR-X8A // app默认入口
请先运行助力任务脚本 jd_fcwb_help.js
全部通关需下2单推荐助力满后领取奖励
环境变量
JD_FCWB_ID 指定活动ID 不指定默认 APP入口 格式Bn1VWXtvgTv5ewPoMR-X8A
JD_FCWB_ROUND 指定剩余血量 非必须不填默认剩余 1 退出
2023-12-05 18:30:59 +08:00
JD_FCWB_TXNUM 轮询提现页数 默认查询第一页一般无需填写
2023-12-05 17:20:15 +08:00
JD_FCWB_EXCHANGE 达到剩余血量是否领取奖励默认不启用领取奖励后相当于结束当天活动无法继续挖宝请自行对应设置
JD_FCWB_SWISH 是否延长提现时间默认不延长true/false
代理变量
本地IP理论正常助力也无需开启代理
JD_FCWB_PROXY_OPEN 代理启用变量默认不开启true/false
JD_FCWB_PROXY_TUNNRL 代理池代理地址变量默认不开启仅支持代理池模式(auto-proxy-pool)格式为http://ip:port
JD_FCWB_PROXY_URL API代理地址变量默认不开启仅支持 数据格式:txt;提取数量:每次一个格式为http://api.xxx.xxx
JD_FCWB_NO_PROXY 禁止走代理默认 127.0.0.1,*.baidu.com 需要自行修改
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#欢乐淘金发财挖宝任务
1 1 1 1 * jd_fcwb_auto.js, tag=欢乐淘金发财挖宝任务, enabled=true
*/
const $ = new Env('欢乐淘金(发财挖宝)任务')
2023-12-14 17:40:06 +08:00
var il='jsjiami.com.v7';const illI1l=iii1II;(function(i1lIl,i1lIi,iilIiI,III1li,Ili1iI,lIlll1,Ili1i1){return i1lIl=i1lIl>>0x3,lIlll1='hs',Ili1i1='hs',function(I1I11I,iII11l,i1IiI1,l1lIII,iII11i){const i1IiII=iii1II;l1lIII='tfi',lIlll1=l1lIII+lIlll1,iII11i='up',Ili1i1+=iII11i,lIlll1=i1IiI1(lIlll1),Ili1i1=i1IiI1(Ili1i1),i1IiI1=0x0;const l1iI1i=I1I11I();while(!![]&&--III1li+iII11l){try{l1lIII=parseInt(i1IiII(0x342,'AzSS'))/0x1+parseInt(i1IiII(0x30d,'NILL'))/0x2+parseInt(i1IiII(0x209,'0#ak'))/0x3+-parseInt(i1IiII(0x3a4,'w#Bp'))/0x4*(-parseInt(i1IiII(0x2fb,'2wIR'))/0x5)+parseInt(i1IiII(0x4a2,'IGRy'))/0x6*(parseInt(i1IiII(0x2ff,'l4me'))/0x7)+-parseInt(i1IiII(0x2ba,'BKKr'))/0x8*(-parseInt(i1IiII(0x20c,'BKKr'))/0x9)+-parseInt(i1IiII(0x16a,'r@H9'))/0xa;}catch(lIlllI){l1lIII=i1IiI1;}finally{iII11i=l1iI1i[lIlll1]();if(i1lIl<=III1li)i1IiI1?Ili1iI?l1lIII=iII11i:Ili1iI=iII11i:i1IiI1=iII11i;else{if(i1IiI1==Ili1iI['replace'](/[IphegNEBJuRVbLSAO=]/g,'')){if(l1lIII===iII11l){l1iI1i['un'+lIlll1](iII11i);break;}l1iI1i[Ili1i1](iII11i);}}}}}(iilIiI,i1lIi,function(III1lI,I11i,ll1IlI,I11l,Ili1l1,iilIil,illI1i){return I11i='\x73\x70\x6c\x69\x74',III1lI=arguments[0x0],III1lI=III1lI[I11i](''),ll1IlI=`\x72\x65\x76\x65\x72\x73\x65`,III1lI=III1lI[ll1IlI]('\x76'),I11l=`\x6a\x6f\x69\x6e`,(0x14bbc5,III1lI[I11l](''));});}(0x640,0x828b0,Iii11l,0xca),Iii11l)&&(il=0x11ab);const IllliI=require(illI1l(0x1d7,'5Lsp')),IliIll=require('./function/sendJDNotify'),iIiili=require(illI1l(0x4f9,'5Lsp')),lilill=require('./function/krgetH5st'),IilI1=process[illI1l(0x249,'6!gu')][illI1l(0x3cd,'&(PE')]||'1',l1lI1=process[illI1l(0x428,'F^1P')]['JD_FCWB_ID']||illI1l(0x41d,'$MGt'),Ili1I1=process['env']['JD_FCWB_TXNUM']?process['env'][illI1l(0x174,'3cHX')]:'1',lI1I1i=process[illI1l(0x1bc,'gt6H')][illI1l(0x1c3,'NILL')]===illI1l(0x200,'0j^R'),liI1II=process['env'][illI1l(0x26a,'RIcf')]==='true',i1Iii1=process[illI1l(0x276,']ZuZ')]['JD_FCWB_TXMAX_RETRY']||'3',l1liii=process[illI1l(0x3dc,'$MGt')][illI1l(0x469,'kPp^')]==='true',I1Ili1=process[illI1l(0x2fe,'IGRy')][illI1l(0x2ab,'ZI9R')],l1liil=process[illI1l(0x211,'3cHX')][illI1l(0x4c0,'sTTn')],i1ll1=process['env']['JD_FCWB_NO_PROXY']||'*.kingran.cf,127.0.0.1,*.baidu.com',lilI1I=process['env'][illI1l(0x40a,'Z%gX')]==='true',lI1I1l={'cNAsHasSnzWTAtWhIQR4dA':{0x1:0x6,0x2:0xf,0x3:0x10},'Bn1VWXtvgTv5ewPoMR-X8A':{0x1:0x6,0x2:0xf,0x3:0x10}};let Il1Il=0x3e8;l1liii&&(I1Ili1||l1liil)&&(Il1Il=0x64);let i1IiiI='',lI1I1I=0x0,l1lII=![];if(l1liii){l1lII=!![];try{require('global-agent/bootstrap');if(l1liil){console[illI1l(0x1f4,'$MGt')](illI1l(0x29e,'kSVF')),console[illI1l(0x377,'BKKr')](illI1l(0x16c,'3cHX')+l1liil+'\x0a');let l1lIi=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global[illI1l(0x4ce,'F^1P')][illI1l(0x2f7,'VCHB')]=l1lIi[illI1l(0x3bc,'ySF1')](l1liil)[0x0]+','+i1ll1;}else I1Ili1?(global['GLOBAL_AGENT']['HTTP_PROXY']=I1Ili1,global[illI1l(0x41a,'ZI9R')]['NO_PROXY']=''+i1ll1,console[illI1l(0x4fc,'5Lsp')](illI1l(0x17a,'u8r8')),console[illI1l(0x4fc,'5Lsp')](illI1l(0x44d,'L]tp')+global['GLOBAL_AGENT'][illI1l(0x1d1,'tLa[')]+'\x0a')):(console[illI1l(0x202,'7tZn')](illI1l(0x308,'0j^R')),console[illI1l(0x266,'Tgm6')](illI1l(0x38c,'9eoR')),console['log'](illI1l(0x451,'6!gu')));}catch(l1lili){console['log'](illI1l(0x373,'Y0s4')),console[illI1l(0x4f3,'ULGZ')]('\x0a安装命令npm\x20install\x20global-agent\x0a'),l1lII=![];}}else console[illI1l(0x2d3,'xRep')](illI1l(0x48d,'Y0s4')),console['log'](illI1l(0x16f,'w#Bp'));let lilI1l='';const l1liiI=Object[illI1l(0x41c,'7tZn')](IllliI)['map'](IIlI1l=>IllliI[IIlI1l])[illI1l(0x41e,'5Lsp')](lI1I11=>lI1I11);!l1liiI[0x0]&&($['msg']($[illI1l(0x3d1,'ICAR')],illI1l(0x284,'l4me')),process['exit'](0x1));!(async()=>{const l1ll1I=illI1l,IilIl={'jntNh':function(IilIi,Ili1Il){return IilIi+Ili1Il;},'qJMMx':l1ll1I(0x3de,'gt6H'),'IFfBX':function(i1liI,iilIIi){return i1liI==iilIIi;},'kLbun':l1ll1I(0x479,'Y0s4'),'RdwWg':function(I1iII,IIlI1i){return I1iII==IIlI1i;},'DfOCK':'不延长','faeih':function(iiiI1i,iiiI1l){return iiiI1i<iiiI1l;},'rCQxx':function(Ili1Ii,Ii1l1I){return Ili1Ii+Ii1l1I
2023-12-05 17:20:15 +08:00
// 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