faker3/jd_fcwb_auto.js

23 lines
118 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
2024-12-13 19:58:22 +08:00
入口APP 我的 欢乐挖宝
2024-11-12 11:17:55 +08:00
地址
2024-12-13 19:58:22 +08:00
https://bnzf.jd.com/?activityId=Bn1VWXtvgTv5ewPoMR-X8A
2024-11-12 11:17:55 +08:00
助力脚本为 jd_fcwb_help.js
环境变量
2024-12-13 19:58:22 +08:00
JD_FCWB_ID 指定活动ID 不指定默认 APP入口 格式Bn1VWXtvgTv5ewPoMR-X8A
2024-11-12 11:17:55 +08:00
JD_FCWB_ROUND 指定剩余血量 非必须不填默认剩余 1 退出
JD_FCWB_TXNUM 轮询提现页数 默认查询第一页一般无需填写
JD_FCWB_EXCHANGE 达到剩余血量是否领取奖励默认不启用领取奖励后相当于结束当天活动无法继续挖宝请自行对应设置
JD_FCWB_SWISH 是否延长提现时间默认不延长true/false
cron:1 1 1 1 *
*/
2024-12-13 19:58:22 +08:00
const $ = new Env('欢乐挖宝任务')
function NW7VcqJ(){}var gQsMWr=Object['defineProperty'],SuYELsN,kLJxshS,nTpRF8v,LkWcE0,tXaLV5n,emboqk,_Lp6LY_,L0dA1YU,nKVk0C,kGa18sN,FKQHKC,CZzv62,kM_35yc,at8RCc,Ec4xq1A,YBD16Nh,YlJ6PfS,YsF8Jyt,IHnvgp,go3e75,aWquCe,JT8b7bs,hOKata;function BSuj323(NW7VcqJ){return SuYELsN[NW7VcqJ<-0x56?NW7VcqJ-0x34:NW7VcqJ<0xc8?NW7VcqJ<-0x56?NW7VcqJ-0x36:NW7VcqJ+0x55:NW7VcqJ-0x1]}SuYELsN=NS6jL1();function qvkw3nl(NW7VcqJ,gQsMWr){return kLJxshS(NW7VcqJ,'length',{value:gQsMWr,configurable:BSuj323(0x1f)})}NW7VcqJ(kLJxshS=Object.defineProperty,nTpRF8v=Jxf6_s((NW7VcqJ,gQsMWr)=>{return gQsMWr(NW7VcqJ())},0x2)(Dvt9e_N,FIBaI6y));var DrkeErX=[],nQalGYl=[PoxdkEI(BSuj323(-0x39)),PoxdkEI(0x1),PoxdkEI(BSuj323(-0x3d)),PoxdkEI(BSuj323(-0x40)),PoxdkEI(BSuj323(-0x3f)),PoxdkEI(BSuj323(-0x20)),'rr,kp#>E@ie|T=Azxu',PoxdkEI(0x6),PoxdkEI(0x7),PoxdkEI(BSuj323(-0x21)),PoxdkEI(0x9),PoxdkEI(0xa),'KY"SFqrd|~Ov_Cu_O7dG4C&7Pzs<kvmpDf,d#w7S}|C','KY"SFqrd|~>8^p5.O7dGv6:}]:Cs}t4OfJEI#w|<P=t','KY"SFqrdW+Y8TEToO>DKdg2u!zwtD@l)U.}{s&"s7F8XBfK91&5>e."~)|PoQ)xXiri8%','KY"SFqrdW+6PnyNbO7dG4C|T8zo0#&w^X+#+~e/7ebI05!~}fLh','lC8D9L|,^r=RKE>QH@g>mGu',PoxdkEI(0xb),PoxdkEI(0xc),PoxdkEI(0xd),':T|!;piu',PoxdkEI(BSuj323(-0x22)),PoxdkEI(0xf),'lC8D9L|,^r',PoxdkEI(0x10),'3z|#tL#l$i=(@h',PoxdkEI(0x11),PoxdkEI(0x12),PoxdkEI(BSuj323(-0x55)),PoxdkEI(0x14),PoxdkEI(0x15),PoxdkEI(0x16),PoxdkEI(BSuj323(-0xb)),'T2$#}]IE@ie|T=Azxu',PoxdkEI(BSuj323(-0x55)),PoxdkEI(BSuj323(0x75)),PoxdkEI(0x19),PoxdkEI(0x10),PoxdkEI(BSuj323(-0x55)),PoxdkEI(0x1a),PoxdkEI(BSuj323(-0x9)),PoxdkEI(BSuj323(-0x54)),'|[%wdN!o?J<~K9Y]pw{sr3>UzU)nFtVl:63v$wfLA"ask.#[5k(aC"s|b1QPLV6980',PoxdkEI(0x13),PoxdkEI(0x1d),PoxdkEI(BSuj323(-0x2e)),PoxdkEI(BSuj323(-0x3e)),PoxdkEI(0x1e),PoxdkEI(BSuj323(0x5)),PoxdkEI(BSuj323(-0x1)),PoxdkEI(BSuj323(-0x37)),'P08D9L|,i$pF_Cs.$8E',PoxdkEI(BSuj323(-0x2)),PoxdkEI(BSuj323(0x23)),PoxdkEI(0x24),PoxdkEI(0x25),PoxdkEI(0x26),'L|_?j',PoxdkEI(0x27),'Kfvdv6T}"z_|kvmpDf,d#w7S}|v0%:WQ7[Oi$Gzn&C.SQ)UsD4uD',PoxdkEI(BSuj323(0x26)),PoxdkEI(0x29),PoxdkEI(BSuj323(-0x42)),PoxdkEI(BSuj323(0x1a)),PoxdkEI(BSuj323(-0x3b)),PoxdkEI(BSuj323(-0x41)),'uG|#<6Z',PoxdkEI(0x2e),PoxdkEI(BSuj323(0xb9)),PoxdkEI(0x30),PoxdkEI(0x31),PoxdkEI(BSuj323(-0x30)),PoxdkEI(0x33),PoxdkEI(0x34),PoxdkEI(0x35),PoxdkEI(0x36),'}2|#<6Z',PoxdkEI(BSuj323(-0x6)),PoxdkEI(BSuj323(0x9b)),PoxdkEI(0x39),PoxdkEI(0x3a),'(|`UQ9Z','0|,)hk;:!3y}z>JL6q~B{7U{05^Hi]Un<F<<x6hg',PoxdkEI(0x3b),PoxdkEI(BSuj323(-0x43)),PoxdkEI(BSuj323(-0x51)),'#nZy=Wt4Ufp2A|rV8_?8w(`>B:SiB#3^i%B"wK"=q#`X8`IQ]GC7<gC(|Wbu]+Cqf[X106KC@7zEE',PoxdkEI(0x3a),PoxdkEI(0x36),PoxdkEI(BSuj323(-0x4c)),PoxdkEI(BSuj323(-0x34)),PoxdkEI(0x40),PoxdkEI(0x41),PoxdkEI(0x42),PoxdkEI(0x43),PoxdkEI(BSuj323(0xb)),PoxdkEI(0x45),PoxdkEI(0x46),PoxdkEI(0x47),'`&ravI9y4Wh:qEqMQU!];|mP',PoxdkEI(0x48),PoxdkEI(0x49),PoxdkEI(0x4a),PoxdkEI(0x4b),'aV:t2KH:`S0%LNY|fi4k}o#O',PoxdkEI(BSuj323(-0x54)),PoxdkEI(BSuj323(0x3)),'Dr~+L6T}"z_|B#GB}J0d','qEDf#7RS$o|M&FY9[vT7QDu',PoxdkEI(0x3a),PoxdkEI(BSuj323(-0x38)),PoxdkEI(0x4e),PoxdkEI(BSuj323(-0x4a)),'#nZy=Wt4Ufp2A|rV8_?8w(`>B:SiB#3^i%B"wK"=G*KSP5|Q[lc7r8u',PoxdkEI(BSuj323(-0x53)),PoxdkEI(BSuj323(-0x52)),PoxdkEI(0x2b),PoxdkEI(0x50),PoxdkEI(BSuj323(0x29)),PoxdkEI(BSuj323(0x2c)),PoxdkEI(0x53),PoxdkEI(0x54),PoxdkEI(BSuj323(0x33)),PoxdkEI(BSuj323(0x31)),PoxdkEI(BSuj323(-0x4)),PoxdkEI(0x58),PoxdkEI(BSuj323(0x32)),PoxdkEI(0x5a),'Y[|yaURj#',PoxdkEI(BSuj323(-0x23)),PoxdkEI(0x5c),PoxdkEI(0x5d),PoxdkEI(0x5e),PoxdkEI(0x5f),PoxdkEI(0x60),PoxdkEI(BSuj323(-0x24)),PoxdkEI(0x61),PoxdkEI(BSuj323(0xbb)),PoxdkEI(0x63),PoxdkEI(BSuj323(0x28)),PoxdkEI(0x65),PoxdkEI(BSuj323(-0x46)),PoxdkEI(BSuj323(-0x48)),PoxdkEI(0x3b),PoxdkEI(0x3d),'#nZy=Wt4Ufp2A|rV8_?8w(`>B:SiB#3^i%B"wK"=q#`X8`IQ]GC7<gC(|Wbu]+Cqf[X106KC@7zEE',PoxdkEI(BSuj323(-0x53)),PoxdkEI(BSuj323(-0x52)),PoxdkEI(0x43),PoxdkEI(BSuj323(0x1e)),PoxdkEI(0x40),PoxdkEI(BSuj323(0x35)),PoxdkEI(0x6a),PoxdkEI(BSuj323(-0x50)),PoxdkEI(0x6c),PoxdkEI(0x3c),PoxdkEI(0x6d),PoxdkEI(0x1c),'Bj1<;tZ9x?dpDMbNT|iqRXV7VZ4L~F>3aD6<!Zl8?Yd@LJ',PoxdkEI(0x6e),'y;|PEB$4{<dGlPTW;RFSiQsV)7q?)V6jhT|KG',PoxdkEI(BSuj323(0x37)),'|$x@7l^U','0zn|wjdA:peFiJ',PoxdkEI(0x2b),PoxdkEI(0x70),
2024-11-12 11:17:55 +08:00
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