faker3/jd_mybbphdyh.js

14 lines
54 KiB
JavaScript
Raw Normal View History

2024-07-06 12:23:46 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron:1 1 1 1 *
*/
2024-07-16 00:24:38 +08:00
const $ = new Env('轻松育儿集卡礼')
2024-07-17 21:07:25 +08:00
const _0x1ac68f=_0x284b;(function(_0x3b0791,_0x4d82d4){const _0x2b52a4=_0x284b,_0x261eed=_0x3b0791();while(!![]){try{const _0x100801=-parseInt(_0x2b52a4(0x17e,'O[%a'))/0x1+parseInt(_0x2b52a4(0xc9,'HEuk'))/0x2*(parseInt(_0x2b52a4(0x10e,'o3T!'))/0x3)+-parseInt(_0x2b52a4(0x294,'9p3R'))/0x4+-parseInt(_0x2b52a4(0x191,'&loP'))/0x5*(parseInt(_0x2b52a4(0x16a,'VmM6'))/0x6)+parseInt(_0x2b52a4(0x263,'w*as'))/0x7*(parseInt(_0x2b52a4(0x2c2,'I0I3'))/0x8)+-parseInt(_0x2b52a4(0x1b6,')u^y'))/0x9*(parseInt(_0x2b52a4(0x21c,'&loP'))/0xa)+parseInt(_0x2b52a4(0xc0,'o3T!'))/0xb*(parseInt(_0x2b52a4(0x2dc,'NS3U'))/0xc);if(_0x100801===_0x4d82d4)break;else _0x261eed['push'](_0x261eed['shift']());}catch(_0x5764a3){_0x261eed['push'](_0x261eed['shift']());}}}(_0xf962,0xa283e));const jdCookie=require('./jdCookie'),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0x1ac68f(0x23a,'$VgB')),getToken=require('./utils/Rebels_Token.js'),{lzdz1_savePrize}=require(_0x1ac68f(0x17a,'NS3U')),opencard_draw=_0x1ac68f(0x29e,'SWzH'),hotbreak=process['env'][_0x1ac68f(0x2f0,'KgdA')]===_0x1ac68f(0x161,'@WE^'),isNotify=process[_0x1ac68f(0xc2,'G34B')][_0x1ac68f(0x2dd,'US%R')]==='true';let domains='https://mybbphdyh-2357-dz.isvjcloud.com';const tasklist={0x1:_0x1ac68f(0x148,'liM8'),0x2:_0x1ac68f(0xbb,'V6dQ'),0x3:_0x1ac68f(0x1f8,'&7[%'),0x4:_0x1ac68f(0x228,'SPm3')};let cookie='',activityCookie='',originCookie='';const cookiesArr=Object[_0x1ac68f(0x2e4,'[1Gj')](jdCookie)[_0x1ac68f(0x2f2,'liM8')](_0x333176=>jdCookie[_0x333176])[_0x1ac68f(0x12d,'KgdA')](_0x5e244a=>_0x5e244a);!cookiesArr[0x0]&&($[_0x1ac68f(0x188,'LwQB')]($['name'],_0x1ac68f(0x27a,'o3T!')),process[_0x1ac68f(0x145,'9p3R')](0x1));!(async()=>{const _0x592de7=_0x1ac68f;console['log'](_0x592de7(0xf1,'Iw!$')),authorCodeList=await getAuthorCodeList(_0x592de7(0x276,'6MRo'));if(authorCodeList)console[_0x592de7(0x256,'[1Gj')](_0x592de7(0x28c,'xn9P')),$['authorCode']=authorCodeList[random(0x0,authorCodeList['length'])];else{let _0x1d391a=[''];$[_0x592de7(0x2c6,'!wVh')]=_0x1d391a[random(0x0,_0x1d391a[_0x592de7(0xd6,'O[%a')])],console[_0x592de7(0x157,'9p3R')](_0x592de7(0x199,'8gKS'));}$[_0x592de7(0x1b4,'xB2Q')]=_0x592de7(0x179,'liM8'),$['shareUuid']=$[_0x592de7(0x1ba,'NS3U')],$[_0x592de7(0x1ae,'9p3R')]=_0x592de7(0x2ed,'!wVh')+$[_0x592de7(0x1e5,'6MRo')]+_0x592de7(0x174,'LwQB')+$[_0x592de7(0x134,'&7[%')],notify['config']({'title':$[_0x592de7(0x13b,'9p3R')]});for(let _0x4c8eb6=0x0;_0x4c8eb6<cookiesArr[_0x592de7(0xe9,'6MRo')];_0x4c8eb6++){$[_0x592de7(0x195,'SK&C')]=_0x4c8eb6+0x1,cookie=cookiesArr[_0x4c8eb6],originCookie=cookiesArr[_0x4c8eb6],common['setCookie'](cookie),$[_0x592de7(0xe8,'#SCu')]=decodeURIComponent(common['getCookieValue'](cookie,_0x592de7(0x20c,'V6dQ'))),$['UA']=common['genUA']($[_0x592de7(0xb5,'HEuk')]),$[_0x592de7(0x135,'Rw@m')]=notify['create']($['index'],$[_0x592de7(0x1e8,'k9ts')]),$['nickName']='',console[_0x592de7(0x209,'xn9P')]('\x0a******开始【京东账号'+$['index']+'】'+($[_0x592de7(0x17c,'F68]')]||$[_0x592de7(0xc1,'O[%a')])+_0x592de7(0xd2,'i@F6')),await run(),common[_0x592de7(0x1d9,'W(2V')]();if($[_0x592de7(0x27c,'k9ts')]||$[_0x592de7(0x1d8,'qNV@')])break;await $[_0x592de7(0x1d4,'8rSo')](parseInt(Math[_0x592de7(0x125,'liM8')]()*0x3e8+0x3e8,0xa));}isNotify&&notify[_0x592de7(0x131,'US%R')]()&&(notify[_0x592de7(0x1af,'&loP')]('\x0a'),await notify[_0x592de7(0x19a,'US%R')]());})()[_0x1ac68f(0x2af,'5q@c')](_0x4ec670=>$[_0x1ac68f(0x192,'SWzH')](_0x4ec670))[_0x1ac68f(0xb9,'F68]')](()=>$[_0x1ac68f(0xfb,'W(2V')]());async function run(){const _0x27466b=_0x1ac68f;try{$[_0x27466b(0x218,'V6dQ')]=![],$[_0x27466b(0x2e1,'KgdA')]=!![],$[_0x27466b(0x2bb,'NfjS')]=![],$[_0x27466b(0x196,'HEuk')]=0x0,$[_0x27466b(0x128,'KgdA')]='',$[_0x27466b(0x1c2,'#SCu')]='',$[_0x27466b(0x187,'xn9P')]='',$['cardUuid']='',$[_0x27466b(0x107,'&7[%')]=await getToken(cookie,domains);if($['Token']==''){console[_0x27466b(0x2b5,'$VgB')](_0x27466b(0x21f,'LHKi'));return;}await getCk();if(activityCookie==''){console[_0x27466b(0x266,'Iw!$')](_0x27466b(0x115,')u^y'));return;}if($[_0x27466b(0xaa,'VmM6')]){console['log']('IP被限制49
2024-07-06 12:23:46 +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