From 1a0cc92eed5ab1318a5b48c31e8683e70eee5867 Mon Sep 17 00:00:00 2001 From: Faker Date: Thu, 14 Apr 2022 15:39:19 +0800 Subject: [PATCH] expired --- .DS_Store | Bin 16388 -> 18436 bytes gua_opencard115.js | 941 ---------------------------------------- gua_opencard117.js | 786 --------------------------------- gua_opencard118.js | 665 ---------------------------- jd_CkSeq.js | 16 +- jd_lzdz1_customized2.js | 536 ----------------------- jd_lzdz1_customized3.js | 536 ----------------------- jd_lzdz1_customized5.js | 527 ---------------------- jd_lzdz1_customized9.js | 541 ----------------------- jd_wish.js | 82 ++-- 10 files changed, 39 insertions(+), 4591 deletions(-) delete mode 100644 gua_opencard115.js delete mode 100644 gua_opencard117.js delete mode 100644 gua_opencard118.js delete mode 100644 jd_lzdz1_customized2.js delete mode 100644 jd_lzdz1_customized3.js delete mode 100644 jd_lzdz1_customized5.js delete mode 100644 jd_lzdz1_customized9.js diff --git a/.DS_Store b/.DS_Store index 2749ce098aa69107069fb662c0edc9c6ff825e47..b469947b014e96865f00e984dfb3e0726e4486f0 100644 GIT binary patch delta 213 zcmZo^U~HMdsKUU&!01$(V#vVY0Az9iF^Cr60SW^-3P9R`XQGNWelLZ76 zCzlH-Z=S=L&&O!7d6qyf(`J9+Jv@^Yn6546RuEuR+RS5cnsIWB3dd$$qn)giS1NH& zj%PHP%q!r!Sw`bEyDS^fd?0Y(1`@95R&5q!dd)nU-^N#l3E~aAih1nN%)>Mdp{VaR95 z1?sJ0NCnCmO?FfkWtC-MV7)gvP(^t2eZ!rslPBp(D>KFY2RfS#h=IU@8%VgK`(m>o g(`)9*{4Tycj1Z54)lN?5>D|2C { - cookiesArr.push(jdCookieNode[item]) - }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; -} else { - cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); -} - -guaopencard_addSku = $.isNode() ? (process.env.guaopencard_addSku115 ? process.env.guaopencard_addSku115 : `${guaopencard_addSku}`) : ($.getdata('guaopencard_addSku115') ? $.getdata('guaopencard_addSku115') : `${guaopencard_addSku}`); -guaopencard_addSku = $.isNode() ? (process.env.guaopencard_addSku_All ? process.env.guaopencard_addSku_All : `${guaopencard_addSku}`) : ($.getdata('guaopencard_addSku_All') ? $.getdata('guaopencard_addSku_All') : `${guaopencard_addSku}`); -guaopencard = $.isNode() ? (process.env.guaopencard115 ? process.env.guaopencard115 : `${guaopencard}`) : ($.getdata('guaopencard115') ? $.getdata('guaopencard115') : `${guaopencard}`); -guaopencard = $.isNode() ? (process.env.guaopencard_All ? process.env.guaopencard_All : `${guaopencard}`) : ($.getdata('guaopencard_All') ? $.getdata('guaopencard_All') : `${guaopencard}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait115 ? process.env.guaopenwait115 : `${guaopenwait}`) : ($.getdata('guaopenwait115') ? $.getdata('guaopenwait115') : `${guaopenwait}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait_All ? process.env.guaopenwait_All : `${guaopenwait}`) : ($.getdata('guaopenwait_All') ? $.getdata('guaopenwait_All') : `${guaopenwait}`); -guaopenwait = parseInt(guaopenwait, 10) || 0 -guaopencard_draw = $.isNode() ? (process.env.guaopencard_draw115 ? process.env.guaopencard_draw115 : guaopencard_draw) : ($.getdata('guaopencard_draw115') ? $.getdata('guaopencard_draw115') : guaopencard_draw); -guaopencard_draw = $.isNode() ? (process.env.guaopencard_draw ? process.env.guaopencard_draw : guaopencard_draw) : ($.getdata('guaopencard_draw') ? $.getdata('guaopencard_draw') : guaopencard_draw); -$.compositeCard = $.isNode() ? (process.env.guaopencard_compositeCard ? process.env.guaopencard_compositeCard : guaopencard_compositeCard) : ($.getdata('guaopencard_compositeCard') ? $.getdata('guaopencard_compositeCard') : guaopencard_compositeCard); - -allMessage = "" -message = "" -$.hotFlag = false -$.outFlag = false -$.activityEnd = false -let lz_jdpin_token_cookie ='' -let activityCookie ='' -const activeEndTime = '2022/03/18 00:00:00+08:00';//活动结束时间 -let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; -!(async () => { - if ($.isNode()) { - if(guaopencard+"" != "true"){ - console.log('如需执行脚本请设置环境变量[guaopencard115]为"true"') - } - if(guaopencard+"" != "true"){ - return - } - } - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { - "open-url": "https://bean.m.jd.com/" - }); - return; - } - $.activityId = "uniongame20220303molpd624p" - $.shareUuid = "22242ec8144241298e02e05f286033ba" - console.log(`入口:\nhttps://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}`) - let shareUuidArr = [$.shareUuid,"23d4e9f6ec134372961af3071d21f9b6","2742073fd9844dcca2bfeacef02ce1f1","34dc8ab005cd47ad8a43ae603cef178a","2e1c100a924246b99c6d420e03eaba23","76aafdd8564442638a2f272bfa93532d","1162ac95685742b48f7f0457b01d7a96","cc76375aaac64260a850a05f90ac8572","fa35f57c5f6c4f8692d9bb6cabbb1729","64e44b8a95e54aa393006be46c2eb954"] - let s = Math.floor((Math.random()*10)) - let n = 0 - if(s == 1) n = Math.floor((Math.random()*shareUuidArr.length)) - if($.time("dd") == "03") $.shareUuid = shareUuidArr[n] ? shareUuidArr[n] : $.shareUuid - - for (let i = 0; i < cookiesArr.length; i++) { - cookie = cookiesArr[i]; - if (cookie) { - $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) - $.index = i + 1; - message = "" - $.bean = 0 - $.hotFlag = false - $.nickName = ''; - console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - await getUA() - await run(); - if(i == 0 && !$.actorUuid) break - if($.outFlag || $.activityEnd) break - } - } - if($.outFlag) { - let msg = '此ip已被限制,请过10分钟后再执行脚本' - $.msg($.name, ``, `${msg}`); - if ($.isNode()) await notify.sendNotify(`${$.name}`, `${msg}`); - } - if(allMessage){ - allMessage = `以下账号可参与瓜分京豆\n${allMessage}\n入口:https://3.cn/-104nGiNw` - $.msg($.name, ``, `${allMessage}`); - if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); - } -})() - .catch((e) => $.logErr(e)) - .finally(() => $.done()) - - -async function run() { - try { - $.hasEnd = true - $.endTime = 0 - lz_jdpin_token_cookie = '' - $.Token = '' - $.Pin = '' - let flag = false - await takePostRequest('isvObfuscator'); - if($.Token == ''){ - console.log('获取[token]失败!') - return - } - await getCk() - if (activityCookie == '') { - console.log(`获取cookie失败`); return; - } - if($.activityEnd === true){ - console.log('活动结束') - return - } - if($.outFlag){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - return - } - await takePostRequest('getSimpleActInfoVo'); - await takePostRequest('getMyPing'); - if(!$.Pin){ - console.log('获取[Pin]失败!') - return - } - await takePostRequest('accessLogWithAD'); - await takePostRequest('getUserInfo'); - await takePostRequest('activityContent'); - if($.hotFlag) return - if(!$.actorUuid){ - console.log('获取不到[actorUuid]退出执行,请重新执行') - return - } - if(($.hasEnd === true || Date.now() > $.endTime) && nowTime > new Date('2022/03/19 00:00:00+08:00').getTime()){ - $.activityEnd = true - console.log('活动结束') - return - } - await takePostRequest('drawContent'); - await $.wait(1000) - $.openList = [] - $.allOpenCard = false - await takePostRequest('checkOpenCard'); - console.log($.actorUuid) - // return - if($.allOpenCard == false){ - console.log('开卡任务') - for(o of $.openList){ - $.openCard = false - if(o.status == 0){ - flag = true - $.joinVenderId = o.venderId - await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) - await joinShop() - await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) - await takePostRequest('activityContent'); - await takePostRequest('drawContent'); - await takePostRequest('checkOpenCard'); - await $.wait(parseInt(Math.random() * 1000 + 4000, 10)) - } - } - }else{ - console.log('已全部开卡') - } - - $.log("关注: " + $.followShop) - if(!$.followShop && !$.outFlag){ - flag = true - await takePostRequest('followShop'); - await $.wait(parseInt(Math.random() * 2000 + 3000, 10)) - } - $.yaoqing = false - await takePostRequest('助力'); - if($.yaoqing){ - await takePostRequest('邀请'); - } - // await takePostRequest('startDraw'); - - if(flag){ - await takePostRequest('activityContent'); - } - if(guaopencard_draw+"" !== "0"){ - $.runFalag = true - let count = parseInt($.score/100) - guaopencard_draw = parseInt(guaopencard_draw, 10) - if(count > guaopencard_draw) count = guaopencard_draw - console.log(`抽奖次数为:${count}`) - for(m=1;count--;m++){ - console.log(`第${m}次抽奖`) - await takePostRequest('抽奖'); - if($.runFalag == false) break - if(Number(count) <= 0) break - if(m >= 10){ - console.log("抽奖太多次,多余的次数请再执行脚本") - break - } - await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) - } - }else console.log('如需抽奖请设置环境变量[guaopencard_draw115]为"3" 3为次数'); - - await takePostRequest('getCardInfo'); - if($.drawCardNum && $.compositeCard+"" == "true"){ - let count = $.drawCardNum - for(m=1;count--;m++){ - console.log(`第${m}次集卡`) - await takePostRequest('集卡'); - await takePostRequest('getCardInfo'); - if($.runFalag == false || $.compositeCardNum > 0) break - if(Number(count) <= 0) break - if(m >= 10){ - console.log("集卡太多次,多余的次数请再执行脚本") - break - } - await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) - } - } - for(let c of $.myCardList || []){ - console.log(`${c.cardName}:${c.cardNum}`) - } - if ($.compositeCardFinishCount >= 1 && nowTime > new Date(activeEndTime).getTime()) { - // allMessage += `【京东账号${$.index}】${$.nickName || $.UserName}\n` - await takePostRequest('瓜分奖励'); - } - console.log(`${$.score}值 瓜分:${$.compositeCardFinishCount == 1 && "是" || "否"}`) - await $.wait(parseInt(Math.random() * 1000 + 2000, 10)) - await takePostRequest('getDrawRecordHasCoupon'); - await takePostRequest('getShareRecord'); - if($.outFlag){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - return - } - console.log($.actorUuid) - console.log(`当前助力:${$.shareUuid}`) - if($.index == 1){ - $.shareUuid = $.actorUuid - console.log(`后面的号都会助力:${$.shareUuid}`) - } - await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) - if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) - if(guaopenwait){ - if($.index != cookiesArr.length){ - console.log(`等待${guaopenwait}秒`) - await $.wait(parseInt(guaopenwait, 10) * 1000) - } - }else{ - if($.index % 3 == 0) console.log('休息1分钟,别被黑ip了\n可持续发展') - if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 60000, 10)) - } - } catch (e) { - console.log(e) - } -} - -async function takePostRequest(type) { - if($.outFlag) return - let domain = 'https://lzdz1-isv.isvjcloud.com'; - let body = ``; - let method = 'POST' - let admJson = '' - switch (type) { - case 'isvObfuscator': - url = `https://api.m.jd.com/client.action?functionId=isvObfuscator`; - body = `body=%7B%22url%22%3A%22https%3A//lzdz1-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&uuid=1613464bc32f8ab8fff55da74e0b43bf9ef1900e&client=apple&clientVersion=10.1.4&st=1646275349648&sv=111&sign=a9415c2cf9ef41af64faeae72b329ea1`; - break; - case 'getSimpleActInfoVo': - url = `${domain}/dz/common/getSimpleActInfoVo`; - body = `activityId=${$.activityId}`; - break; - case 'getMyPing': - url = `${domain}/customer/getMyPing`; - body = `userId=${$.shopId || $.venderId || ''}&token=${$.Token}&fromType=APP`; - break; - case 'accessLogWithAD': - url = `${domain}/common/accessLogWithAD`; - let pageurl = `${domain}/drawCenter/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}` - body = `venderId=${$.shopId || $.venderId || ''}&code=99&pin=${encodeURIComponent($.Pin)}&activityId=${$.activityId}&pageUrl=${encodeURIComponent(pageurl)}&subType=app&adSource=` - break; - case 'getUserInfo': - url = `${domain}/wxActionCommon/getUserInfo`; - body = `pin=${encodeURIComponent($.Pin)}`; - break; - case 'activityContent': - url = `${domain}/play/monopoly/getContent`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&pinImg=${encodeURIComponent($.attrTouXiang)}&nick=${encodeURIComponent($.nickname)}&cjyxPin=&cjhyPin=&shareUuid=${$.shareUuid}` - break; - case 'drawContent': - url = `${domain}/dingzhi/taskact/common/drawContent`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}` - break; - case 'checkOpenCard': - url = `${domain}/open/card/check`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'info': - url = `${domain}/play/monopoly/getTaskList`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'startDraw': - url = `${domain}/play/monopoly/activeDraw`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&drawType=1` - break; - case 'getCardInfo': - url = `${domain}/collect/card/getCardInfo`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case '瓜分奖励': - url = `${domain}/collect/card/carveUpPrize`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case '集卡': - url = `${domain}/collect/card/drawCard`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case '合卡': - url = `${domain}/collect/card/compositeCard`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'followShop': - url = `${domain}/play/monopoly/doTasks`; - // url = `${domain}/dingzhi/dz/openCard/saveTask`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1` - break; - case 'sign': - case 'addCart': - case 'browseGoods': - url = `${domain}/dingzhi/linkgame/${type}`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}` - if(type == 'browseGoods') body += `&value=${$.visitSkuValue}` - break; - case '邀请': - case '助力': - if(type == '助力'){ - url = `${domain}/assist/getStatus`; - }else{ - url = `${domain}/assist/go`; - } - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&shareUuid=${$.shareUuid}&actorUuid=${$.actorUuid}` - break; - case 'viewVideo': - case 'visitSku': - case 'toShop': - case 'addSku': - url = `${domain}/dingzhi/dz/openCard/saveTask`; - let taskType = '' - let taskValue = '' - if(type == 'viewVideo'){ - taskType = 31 - taskValue = 31 - }else if(type == 'visitSku'){ - taskType = 5 - taskValue = $.visitSkuValue || 5 - }else if(type == 'toShop'){ - taskType = 14 - taskValue = $.toShopValue || 14 - }else if(type == 'addSku'){ - taskType = 2 - taskValue = $.addSkuValue || 2 - } - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${taskValue}` - break; - case 'getDrawRecordHasCoupon': - url = `${domain}/play/monopoly/getPrizeList`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'getShareRecord': - url = `${domain}/play/monopoly/getHelpList`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case '抽奖': - url = `${domain}/play/monopoly/activeDraw`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&drawType=2` - break; - default: - console.log(`错误${type}`); - } - let myRequest = getPostRequest(url, body, method); - // console.log(myRequest) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - setActivityCookie(resp) - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err,err)}`) - console.log(`${type} API请求失败,请检查网路重试`) - } else { - dealReturn(type, data); - } - } catch (e) { - // console.log(data); - console.log(e, resp) - } finally { - resolve(); - } - }) - }) - } - -async function dealReturn(type, data) { - let res = '' - try { - if(type != 'accessLogWithAD' || type != 'drawContent'){ - if(data){ - res = JSON.parse(data); - } - } - } catch (e) { - console.log(`${type} 执行任务异常`); - console.log(data); - $.runFalag = false; - } - try { - switch (type) { - case 'isvObfuscator': - if(typeof res == 'object'){ - if(res.errcode == 0){ - if(typeof res.token != 'undefined') $.Token = res.token - }else if(res.message){ - console.log(`isvObfuscator ${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - break; - case 'getSimpleActInfoVo': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(typeof res.data.shopId != 'undefined') $.shopId = res.data.shopId - if(typeof res.data.venderId != 'undefined') $.venderId = res.data.venderId - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getMyPing': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(res.data && typeof res.data.secretPin != 'undefined') $.Pin = res.data.secretPin - if(res.data && typeof res.data.nickname != 'undefined') $.nickname = res.data.nickname - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getUserInfo': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(res.data && typeof res.data.yunMidImageUrl != 'undefined') $.attrTouXiang = res.data.yunMidImageUrl || "https://img10.360buyimg.com/imgzone/jfs/t1/7020/27/13511/6142/5c5138d8E4df2e764/5a1216a3a5043c5d.png" - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'activityContent': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - $.endTime = res.data.endTime || (res.data.activityVo && res.data.activityVo.endTime) || res.data.activity.endTime || 0 - $.hasEnd = res.data.isEnd || false - $.drawCount = res.data.actorVo.drawCount || 0 - $.point = res.data.actorVo.point || 0 - $.score = res.data.actorVo.score || 0 - $.actorUuid = res.data.actorVo.actorUuid || '' - $.followShop = res.data.actorVo.followShopStatus || '' - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'info': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - // $.drawCount = res.data.drawCount || 0 - $.addCart = res.data.addCart || false - $.followShop = res.data.followShop || false - $.sign = res.data.isSignStatus || false - $.visitSku = res.data.visitSku || false - $.visitSkuList = res.data.visitSkuList || [] - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'checkOpenCard': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - // console.log(data) - let cardList1 = res.data.cardList1 || [] - let cardList2 = res.data.cardList2 || [] - let cardList = res.data.cardList || [] - let openCardList = res.data.openCardList || [] - $.openList = [...cardList,...cardList1,...cardList2,...openCardList] - $.allOpenCard = res.data.allOpenCard || res.data.isOpenCardStatus || false - $.openCardScore1 = res.data.score1 || 0 - $.openCardScore2 = res.data.score2 || 0 - $.drawScore = res.data.drawScore || 0 - if(res.data.beans || res.data.addBeanNum) console.log(`开卡获得:${res.data.beans || res.data.addBeanNum}豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'startDraw': - case 'followShop': - case 'viewVideo': - case 'visitSku': - case 'toShop': - case 'addSku': - case 'sign': - case 'addCart': - case 'browseGoods': - case '抽奖': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(typeof res.data == 'object'){ - let msg = '' - let title = '抽奖' - if(res.data.addBeanNum){ - msg = `${res.data.addBeanNum}京豆` - } - if(res.data.addPoint){ - msg += ` ${res.data.addPoint}游戏机会` - } - if(type == 'followShop'){ - title = '关注' - if(res.data.beanNumMember && res.data.assistSendStatus){ - msg += ` 额外获得:${res.data.beanNumMember}京豆` - } - }else if(type == 'addSku' || type == 'addCart'){ - title = '加购' - }else if(type == 'viewVideo'){ - title = '热门文章' - }else if(type == 'toShop'){ - title = '浏览店铺' - }else if(type == 'visitSku' || type == 'browseGoods'){ - title = '浏览商品' - }else if(type == 'sign'){ - title = '签到' - }else{ - msg = res.data.drawOk == true && (res.data.drawInfoType == 6 && res.data.name || '') || '空气💨' - } - if(!msg){ - msg = '空气💨' - } - console.log(`${title}获得:${msg || data}`) - }else{ - console.log(`${type} ${data}`) - } - }else if(res.errorMessage){ - $.runFalag = false; - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getDrawRecordHasCoupon': - // console.log(data) - if(typeof res == 'object'){ - if(res.result && res.result === true){ - console.log(`我的奖品:`) - let num = 0 - let value = 0 - for(let i in res.data){ - let item = res.data[i] - if(item.drawId == 'assist'){ - num++ - value = item.infoName.replace('京豆','') - }else{ - console.log(`${item.infoType != 10 && item.drawId && ((item.drawId == "cardPrize" && "瓜分奖励") || item.drawId) +':' || ''}${item.infoName}`) - } - } - if(num > 0) console.log(`邀请好友(${num}):${num*parseInt(value, 10) || 30}京豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getShareRecord': - if(typeof res == 'object'){ - if(res.result && res.result === true && res.data){ - $.ShareCount = res.data.assistCount - $.log(`=========== 你邀请了:${$.ShareCount}个`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getCardInfo': - case '集卡': - case '合卡': - if(typeof res == 'object'){ - if(res.result && res.result === true && res.data){ - if(type == "集卡"){ - if(res.data.status == 1) console.log(`集卡成功->${res.data.cardName}`) - else console.log('集卡失败'+ res.data.cardName && '->'+res.data.cardName || '\n'+data) - }else if(type == "合卡"){ - if(res.data.status == 1) console.log('合卡成功') - else console.log('合卡失败\n'+data) - }else if(type == "getCardInfo"){ - $.score = res.data.score || 0 - $.myCardList = res.data.myCardList || [] - $.compositeCardFinishCount = res.data.compositeCardFinishCount || 0 - $.compositeCardNum = res.data.compositeCardNum || 0 - $.drawCardNum = res.data.drawCardNum || 0 - } - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case '邀请': - case '助力': - // console.log(data) - if(typeof res == 'object'){ - if(res.data == 200){ - if(type == '助力'){ - console.log('助力成功') - $.yaoqing = true - } - }else if(res.data == 105){ - console.log('已经助力过') - }else if(res.data == 104){ - console.log('已经助力其他人') - }else if(res.data == 103){ - console.log('请开全部卡并关注店铺') - }else if(res.data == 101){ - // console.log('已经助力过') - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - - case 'accessLogWithAD': - case 'drawContent': - break; - default: - console.log(`${type}-> ${data}`); - } - if(typeof res == 'object'){ - if(res.errorMessage){ - if(res.errorMessage.indexOf('火爆') >-1 ){ - $.hotFlag = true - } - } - } - } catch (e) { - console.log(e) - } -} - -function getPostRequest(url, body, method="POST") { - let headers = { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Content-Type": "application/x-www-form-urlencoded", - "Cookie": cookie, - "User-Agent": $.UA, - "X-Requested-With": "XMLHttpRequest" - } - if(url.indexOf('https://lzdz1-isv.isvjcloud.com') > -1){ - headers["Referer"] = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}` - headers["Cookie"] = `${lz_jdpin_token_cookie && lz_jdpin_token_cookie || ''}${$.Pin && "AUTH_C_USER=" + $.Pin + ";" || ""}${activityCookie}` - } - // console.log(headers) - // console.log(headers.Cookie) - return {url: url, method: method, headers: headers, body: body, timeout:30000}; -} - -function getCk() { - return new Promise(resolve => { - let get = { - url:`https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}`, - followRedirect:false, - headers: { - "User-Agent": $.UA, - }, - timeout:30000 - } - $.get(get, async(err, resp, data) => { - try { - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err)}`) - console.log(`${$.name} cookie API请求失败,请检查网路重试`) - } else { - let end = data.match(/(活动已经结束)/) && data.match(/(活动已经结束)/)[1] || '' - if(end){ - $.activityEnd = true - console.log('活动已结束') - } - setActivityCookie(resp) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function setActivityCookie(resp){ - let LZ_TOKEN_KEY = '' - let LZ_TOKEN_VALUE = '' - let lz_jdpin_token = '' - let setcookies = resp && resp['headers'] && (resp['headers']['set-cookie'] || resp['headers']['Set-Cookie'] || '') || '' - let setcookie = '' - if(setcookies){ - if(typeof setcookies != 'object'){ - setcookie = setcookies.split(',') - }else setcookie = setcookies - for (let ck of setcookie) { - let name = ck.split(";")[0].trim() - if(name.split("=")[1]){ - // console.log(name.replace(/ /g,'')) - if(name.indexOf('LZ_TOKEN_KEY=')>-1) LZ_TOKEN_KEY = name.replace(/ /g,'')+';' - if(name.indexOf('LZ_TOKEN_VALUE=')>-1) LZ_TOKEN_VALUE = name.replace(/ /g,'')+';' - if(name.indexOf('lz_jdpin_token=')>-1) lz_jdpin_token = ''+name.replace(/ /g,'')+';' - } - } - } - if(LZ_TOKEN_KEY && LZ_TOKEN_VALUE) activityCookie = `${LZ_TOKEN_KEY} ${LZ_TOKEN_VALUE}` - if(lz_jdpin_token) lz_jdpin_token_cookie = lz_jdpin_token -} - -async function getUA(){ - $.UA = `jdapp;iPhone;10.1.4;13.1.2;${randomString(40)};network/wifi;model/iPhone8,1;addressid/2308460611;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` -} -function randomString(e) { - e = e || 32; - let t = "abcdef0123456789", a = t.length, n = ""; - for (i = 0; i < e; i++) - n += t.charAt(Math.floor(Math.random() * a)); - return n -} - - -function joinShop() { - if(!$.joinVenderId) return - return new Promise(async resolve => { - $.shopactivityId = '' - await $.wait(1000) - await getshopactivityId() - let activityId = `` - if($.shopactivityId) activityId = `,"activityId":${$.shopactivityId}` - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${$.joinVenderId}","shopId":"${$.joinVenderId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0${activityId},"channel":401}&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - // console.log(data) - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success === true){ - console.log(res.message) - if(res.result && res.result.giftInfo){ - for(let i of res.result.giftInfo.giftList){ - console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) - } - } - }else if(typeof res == 'object' && res.message){ - console.log(`${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function getshopactivityId() { - return new Promise(resolve => { - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=%7B%22venderId%22%3A%22${$.joinVenderId}%22%2C%22channel%22%3A401%7D&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success == true){ - // console.log($.toStr(res.result)) - console.log(`入会:${res.result.shopMemberCardInfo.venderCardName || ''}`) - $.shopactivityId = res.result.interestsRuleList && res.result.interestsRuleList[0] && res.result.interestsRuleList[0].interestsInfo && res.result.interestsRuleList[0].interestsInfo.activityId || '' - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -function jsonParse(str) { - if (typeof str == "string") { - try { - return JSON.parse(str); - } catch (e) { - console.log(e); - $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') - return []; - } - } -} - - -// 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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} - diff --git a/gua_opencard117.js b/gua_opencard117.js deleted file mode 100644 index ee1a19ad2..000000000 --- a/gua_opencard117.js +++ /dev/null @@ -1,786 +0,0 @@ -/* -3.2~3.8 诠“饰”你的每一面 [gua_opencard117.js] -新增开卡脚本 -一次性脚本 - -1.邀请一人20豆 -2.开2组(共6张) 成功开1组 获得1次抽奖 -3.抽奖 (默认不抽奖 如需抽奖请设置环境变量[guaopencard_draw117]为"3" - 填写要抽奖的次数 不足已自身次数为准 - -第一个账号助力作者 其他依次助力CK1 -第一个CK失效会退出脚本 - -默认脚本不执行 -如需执行脚本请设置环境变量 -guaopencard117="true" -每个账号之间延迟 100=延迟100秒 0=延迟0秒会使用每3个账号延迟60秒 -guaopenwait_All 所有 -guaopenwait117="0" - - -All变量适用 -———————————————— -入口:[ 3.2~3.8 诠“饰”你的每一面 (https://lzdz1-isv.isvjcloud.com/dingzhi/fashion/union/activity?activityId=dz3438d88c47209a29355c6192b127&shareUuid=84ff5751ce664ce28c236d9fddcc44e2)] - -请求太频繁会被黑ip -过10分钟再执行 - -cron:30 2 7,8 3 * -============Quantumultx=============== -[task_local] -#3.2~3.8 诠“饰”你的每一面 -30 2 7,8 3 * https://raw.githubusercontent.com/smiek2121/scripts/master/gua_opencard117.js, tag=3.2~3.8 诠“饰”你的每一面, enabled=true - -*/ -let guaopencard_addSku = "false" -let guaopencard = "false" -let guaopenwait = "0" -let guaopencard_draw = "0" - -const $ = new Env('3.2~3.8 诠“饰”你的每一面'); -const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; -const notify = $.isNode() ? require('./sendNotify') : ''; -let cleanCart = '' -if($.isNode()){ - try{ - const fs = require('fs'); - if (fs.existsSync('./cleancart_activity.js')) { - cleanCart = require('./cleancart_activity'); - } - }catch(e){ - } -} -//IOS等用户直接用NobyDa的jd cookie - -let cookiesArr = [], - cookie = ''; -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]) - }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; -} else { - cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); -} - -guaopencard_addSku = $.isNode() ? (process.env.guaopencard_addSku117 ? process.env.guaopencard_addSku117 : `${guaopencard_addSku}`) : ($.getdata('guaopencard_addSku117') ? $.getdata('guaopencard_addSku117') : `${guaopencard_addSku}`); -guaopencard_addSku = $.isNode() ? (process.env.guaopencard_addSku_All ? process.env.guaopencard_addSku_All : `${guaopencard_addSku}`) : ($.getdata('guaopencard_addSku_All') ? $.getdata('guaopencard_addSku_All') : `${guaopencard_addSku}`); -guaopencard = $.isNode() ? (process.env.guaopencard117 ? process.env.guaopencard117 : `${guaopencard}`) : ($.getdata('guaopencard117') ? $.getdata('guaopencard117') : `${guaopencard}`); -guaopencard = $.isNode() ? (process.env.guaopencard_All ? process.env.guaopencard_All : `${guaopencard}`) : ($.getdata('guaopencard_All') ? $.getdata('guaopencard_All') : `${guaopencard}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait117 ? process.env.guaopenwait117 : `${guaopenwait}`) : ($.getdata('guaopenwait117') ? $.getdata('guaopenwait117') : `${guaopenwait}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait_All ? process.env.guaopenwait_All : `${guaopenwait}`) : ($.getdata('guaopenwait_All') ? $.getdata('guaopenwait_All') : `${guaopenwait}`); -guaopenwait = parseInt(guaopenwait, 10) || 0 -guaopencard_draw = $.isNode() ? (process.env.guaopencard_draw117 ? process.env.guaopencard_draw117 : guaopencard_draw) : ($.getdata('guaopencard_draw117') ? $.getdata('guaopencard_draw117') : guaopencard_draw); -guaopencard_draw = $.isNode() ? (process.env.guaopencard_draw ? process.env.guaopencard_draw : guaopencard_draw) : ($.getdata('guaopencard_draw') ? $.getdata('guaopencard_draw') : guaopencard_draw); -allMessage = "" -message = "" -$.hotFlag = false -$.outFlag = false -$.activityEnd = false -let lz_jdpin_token_cookie ='' -let activityCookie ='' -!(async () => { - if ($.isNode()) { - if(guaopencard+"" != "true"){ - console.log('如需执行脚本请设置环境变量[guaopencard117]为"true"') - } - if(guaopencard+"" != "true"){ - return - } - } - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { - "open-url": "https://bean.m.jd.com/" - }); - return; - } - $.activityId = "dz3438d88c47209a29355c6192b127" - $.shareUuid = "84ff5751ce664ce28c236d9fddcc44e2" - console.log(`入口:\nhttps://lzdz1-isv.isvjcloud.com/dingzhi/fashion/union/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}`) - let shareUuidArr = [$.shareUuid,"c10a705329f04b4aa780a88b8a58c8df","65f3e4b5d5b94a1994d9233c3584c994","9a3a152906284ef696362326f185b2eb","5cc0530832f34af6a00c5caf6ef6c10e","d3f4df2fb2044c5eb6f64c5fe8ad0907","9c046d0a81114a12af3fa9b5046d40e6","7239f3cbf7e84d7b866b9e93c9250c05","6576be9680154bbba5de808e2437f51c","81f41da7973e495d85c81337fdc9b04f"] - let s = Math.floor((Math.random()*10)) - let n = 0 - if(s >= 1 && s<= 4) n = Math.floor((Math.random()*shareUuidArr.length)) - if($.time("dd") == "06") $.shareUuid = shareUuidArr[n] ? shareUuidArr[n] : $.shareUuid - - for (let i = 0; i < cookiesArr.length; i++) { - cookie = cookiesArr[i]; - if (cookie) { - $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) - $.index = i + 1; - message = "" - $.bean = 0 - $.hotFlag = false - $.nickName = ''; - console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - await getUA() - await run(); - if(i == 0 && !$.actorUuid) break - if($.outFlag || $.activityEnd) break - } - } - if($.outFlag) { - let msg = '此ip已被限制,请过10分钟后再执行脚本' - $.msg($.name, ``, `${msg}`); - if ($.isNode()) await notify.sendNotify(`${$.name}`, `${msg}`); - } -})() - .catch((e) => $.logErr(e)) - .finally(() => $.done()) - - -async function run() { - try { - $.hasEnd = true - $.endTime = 0 - lz_jdpin_token_cookie = '' - $.Token = '' - $.Pin = '' - let flag = false - await takePostRequest('isvObfuscator'); - if($.Token == ''){ - console.log('获取[token]失败!') - return - } - await getCk() - if (activityCookie == '') { - console.log(`获取cookie失败`); return; - } - if($.activityEnd === true){ - console.log('活动结束') - return - } - if($.outFlag){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - return - } - await takePostRequest('getSimpleActInfoVo'); - await takePostRequest('getMyPing'); - if(!$.Pin){ - console.log('获取[Pin]失败!') - return - } - await takePostRequest('accessLogWithAD'); - await takePostRequest('getUserInfo'); - await takePostRequest('activityContent'); - if($.hotFlag) return - if(!$.actorUuid){ - console.log('获取不到[actorUuid]退出执行,请重新执行') - return - } - if($.hasEnd === true || Date.now() > $.endTime){ - $.activityEnd = true - console.log('活动结束') - return - } - await takePostRequest('drawContent'); - await $.wait(1000) - $.openList = [] - $.allOpenCard = false - await takePostRequest('checkOpenCard'); - console.log($.actorUuid) - // return - if($.allOpenCard == false){ - console.log('开卡任务') - for(o of $.openList){ - $.openCard = false - if(o.openStatus == false){ - flag = true - $.joinVenderId = o.venderId - await joinShop() - if($.errorJoinShop && $.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log('重新开卡') - await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) - await joinShop() - } - await takePostRequest('drawContent'); - await takePostRequest('checkOpenCard'); - await $.wait(parseInt(Math.random() * 2000 + 3000, 10)) - } - } - await takePostRequest('activityContent'); - }else{ - console.log('已全部开卡') - } - if(flag){ - await takePostRequest('activityContent'); - } - if(guaopencard_draw+"" !== "0"){ - $.runFalag = true - let count = parseInt($.score/1) - guaopencard_draw = parseInt(guaopencard_draw, 10) - if(count > guaopencard_draw) count = guaopencard_draw - console.log(`抽奖次数为:${count}`) - for(m=1;count--;m++){ - console.log(`第${m}次抽奖`) - await takePostRequest('抽奖'); - if($.runFalag == false) break - if(Number(count) <= 0) break - if(m >= 10){ - console.log("抽奖太多次,多余的次数请再执行脚本") - break - } - await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) - } - }else console.log('如需抽奖请设置环境变量[guaopencard_draw117]为"3" 3为次数'); - await $.wait(parseInt(Math.random() * 1000 + 2000, 10)) - await takePostRequest('getDrawRecordHasCoupon'); - await takePostRequest('getShareRecord'); - if($.outFlag){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - return - } - console.log($.actorUuid) - console.log(`当前助力:${$.shareUuid}`) - if($.index == 1){ - $.shareUuid = $.actorUuid - console.log(`后面的号都会助力:${$.shareUuid}`) - } - await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) - if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) - if(guaopenwait){ - if($.index != cookiesArr.length){ - console.log(`等待${guaopenwait}秒`) - await $.wait(parseInt(guaopenwait, 10) * 1000) - } - }else{ - if($.index % 3 == 0) console.log('休息1分钟,别被黑ip了\n可持续发展') - if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 60000, 10)) - } - } catch (e) { - console.log(e) - } -} - -async function takePostRequest(type) { - if($.outFlag) return - let domain = 'https://lzdz1-isv.isvjcloud.com'; - let body = ``; - let method = 'POST' - let admJson = '' - switch (type) { - case 'isvObfuscator': - url = `https://api.m.jd.com/client.action?functionId=isvObfuscator`; - body = `body=%7B%22url%22%3A%22https%3A//lzdz1-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&uuid=0846724fe8d803b8e84ebd14b3ba7fac6df80e7a&client=apple&clientVersion=10.1.4&st=1634616247215&sv=120&sign=91a16ae2feb0bd0e1ea48d99e7953c58`; - break; - case 'getSimpleActInfoVo': - url = `${domain}/dz/common/getSimpleActInfoVo`; - body = `activityId=${$.activityId}`; - break; - case 'getMyPing': - url = `${domain}/customer/getMyPing`; - body = `userId=${$.shopId || $.venderId || ''}&token=${$.Token}&fromType=APP`; - break; - case 'accessLogWithAD': - url = `${domain}/common/accessLogWithAD`; - let pageurl = `${domain}/drawCenter/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}` - body = `venderId=${$.shopId || $.venderId || ''}&code=99&pin=${encodeURIComponent($.Pin)}&activityId=${$.activityId}&pageUrl=${encodeURIComponent(pageurl)}&subType=app&adSource=` - break; - case 'getUserInfo': - url = `${domain}/wxActionCommon/getUserInfo`; - body = `pin=${encodeURIComponent($.Pin)}`; - break; - case 'activityContent': - url = `${domain}/dingzhi/fashion/union/activityContent`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&pinImg=${encodeURIComponent($.attrTouXiang)}&nick=${encodeURIComponent($.nickname)}&cjyxPin=&cjhyPin=&shareUuid=${$.shareUuid}` - break; - case 'drawContent': - url = `${domain}/dingzhi/taskact/common/drawContent`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}` - break; - case 'checkOpenCard': - url = `${domain}/dingzhi/fashion/union/initOpenCard`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&shareUuid=${$.shareUuid}` - break; - case 'startDraw': - url = `${domain}/dingzhi/dz/openCard/startDraw`; - body = `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.Pin)}${$.startDraw && '&type='+$.startDraw || ''}` - break; - case 'followShop': - url = `${domain}/dingzhi/dz/openCard/followShop`; - // url = `${domain}/dingzhi/dz/openCard/saveTask`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&shareUuid=${$.shareUuid}&taskType=23&taskValue=${$.followShopValue}` - break; - case 'viewVideo': - case 'visitSku': - case 'toShop': - case 'addSku': - url = `${domain}/dingzhi/fashion/union/saveTask`; - let taskType = '' - let taskValue = '' - if(type == 'viewVideo'){ - taskType = 31 - taskValue = 31 - }else if(type == 'visitSku'){ - taskType = 5 - taskValue = $.visitSkuValue || 5 - }else if(type == 'toShop'){ - taskType = 14 - taskValue = $.toShopValue || 14 - }else if(type == 'addSku'){ - taskType = 21 - taskValue = 21 - } - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${taskValue}` - break; - case 'getDrawRecordHasCoupon': - url = `${domain}/dingzhi/taskact/common/getDrawRecordHasCoupon`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'getShareRecord': - url = `${domain}/dingzhi/taskact/common/getShareRecord`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case '抽奖': - url = `${domain}/dingzhi/fashion/union/draw`; - body = `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.Pin)}` - break; - default: - console.log(`错误${type}`); - } - let myRequest = getPostRequest(url, body, method); - // console.log(myRequest) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - setActivityCookie(resp) - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err,err)}`) - console.log(`${type} API请求失败,请检查网路重试`) - } else { - dealReturn(type, data); - } - } catch (e) { - // console.log(data); - console.log(e, resp) - } finally { - resolve(); - } - }) - }) - } - -async function dealReturn(type, data) { - let res = '' - try { - if(type != 'accessLogWithAD' || type != 'drawContent'){ - if(data){ - res = JSON.parse(data); - } - } - } catch (e) { - console.log(`${type} 执行任务异常`); - console.log(data); - $.runFalag = false; - } - try { - switch (type) { - case 'isvObfuscator': - if(typeof res == 'object'){ - if(res.errcode == 0){ - if(typeof res.token != 'undefined') $.Token = res.token - }else if(res.message){ - console.log(`isvObfuscator ${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - break; - case 'getSimpleActInfoVo': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(typeof res.data.shopId != 'undefined') $.shopId = res.data.shopId - if(typeof res.data.venderId != 'undefined') $.venderId = res.data.venderId - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getMyPing': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(res.data && typeof res.data.secretPin != 'undefined') $.Pin = res.data.secretPin - if(res.data && typeof res.data.nickname != 'undefined') $.nickname = res.data.nickname - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getUserInfo': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(res.data && typeof res.data.yunMidImageUrl != 'undefined') $.attrTouXiang = res.data.yunMidImageUrl || "https://img10.360buyimg.com/imgzone/jfs/t1/7020/27/13511/6142/5c5138d8E4df2e764/5a1216a3a5043c5d.png" - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'activityContent': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - $.endTime = res.data.endTime || 0 - $.hasEnd = res.data.hasEnd || false - $.actorUuid = res.data.actorUuid || '' - $.addSku = res.data.sukAddCart || '' - $.score = res.data.score || '' - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'checkOpenCard': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - let cardList1 = res.data.cardList1 || [] - let cardList2 = res.data.cardList2 || [] - let cardList = res.data.cardList || [] - let openInfo = res.data.openInfo || [] - $.openList = [...cardList,...cardList1,...cardList2,...openInfo] - $.allOpenCard = res.data.allOpenCard || false - $.openCardScore1 = res.data.score1 || 0 - $.openCardScore2 = res.data.score2 || 0 - $.drawScore = res.data.drawScore || 0 - if(res.data.beans || res.data.addBeanNum) console.log(`开卡获得:${res.data.beans || res.data.addBeanNum}豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'startDraw': - case 'followShop': - case 'viewVideo': - case 'visitSku': - case 'toShop': - case 'addSku': - case '抽奖': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(typeof res.data == 'object'){ - let msg = '' - let title = '抽奖' - if(res.data.addBeanNum && res.data.sendStatus){ - msg = `${res.data.addBeanNum}京豆` - }else if(res.data.taskbeanNum && res.data.taskCouponStatus){ - msg = `${res.data.taskbeanNum}京豆` - } - if(type == 'followShop'){ - title = '关注' - if(res.data.beanNumMember && res.data.assistSendStatus){ - msg += ` 额外获得:${res.data.beanNumMember}京豆` - } - }else if(type == 'addSku'){ - title = '加购' - }else if(type == 'viewVideo'){ - title = '热门文章' - }else if(type == 'toShop'){ - title = '浏览店铺' - }else if(type == 'visitSku'){ - title = '浏览商品' - }else{ - msg = res.data.drawOk == true && (res.data.drawInfoType == 6 && res.data.name || '') || '空气💨' - } - if(!msg){ - msg = '空气💨' - } - console.log(`${title}获得:${msg || data}`) - }else{ - console.log(`${type} ${data}`) - } - }else if(res.errorMessage){ - $.runFalag = false; - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getDrawRecordHasCoupon': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - console.log(`我的奖品:`) - let num = 0 - let value = 0 - let typeArr = { - "dayShareBeans":"邀请", - "dayBeSharedBeans":"被邀请", - "openCardBeans":"开卡", - "saveTaskBeans23":"关注", - "saveTaskBeans12":"逛店铺", - "saveTaskBeans21":"加购", - } - for(let i in res.data){ - let item = res.data[i] - if(item.drawId == 'dayShareBeans'){ - num++ - value = item.infoName.replace('京豆','') - }else{ - console.log(`${item.infoType != 10 && item.drawId && (typeArr[item.drawId] || item.drawId)+':' || item.value && item.value +':' || ''}${item.infoName}`) - } - } - if(num > 0) console.log(`邀请好友(${num}):${num*parseInt(value, 10) || 30}京豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getShareRecord': - if(typeof res == 'object'){ - if(res.result && res.result === true && res.data){ - $.ShareCount = res.data.length - $.log(`=========== 你邀请了:${res.data.length}个`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'accessLogWithAD': - case 'drawContent': - break; - default: - console.log(`${type}-> ${data}`); - } - if(typeof res == 'object'){ - if(res.errorMessage){ - if(res.errorMessage.indexOf('火爆') >-1 ){ - $.hotFlag = true - } - } - } - } catch (e) { - console.log(e) - } -} - -function getPostRequest(url, body, method="POST") { - let headers = { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Content-Type": "application/x-www-form-urlencoded", - "Cookie": cookie, - "User-Agent": $.UA, - "X-Requested-With": "XMLHttpRequest" - } - if(url.indexOf('https://lzdz1-isv.isvjcloud.com') > -1){ - headers["Referer"] = `https://lzdz1-isv.isvjcloud.com/dingzhi/fashion/union/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}` - headers["Cookie"] = `${lz_jdpin_token_cookie && lz_jdpin_token_cookie || ''}${$.Pin && "AUTH_C_USER=" + $.Pin + ";" || ""}${activityCookie}` - } - // console.log(headers) - // console.log(headers.Cookie) - return {url: url, method: method, headers: headers, body: body, timeout:30000}; -} - -function getCk() { - return new Promise(resolve => { - let get = { - url:`https://lzdz1-isv.isvjcloud.com/dingzhi/fashion/union/activity?activityId=${$.activityId}&shareUuid=${$.shareUuid}`, - followRedirect:false, - headers: { - "User-Agent": $.UA, - }, - timeout:30000 - } - $.get(get, async(err, resp, data) => { - try { - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err)}`) - console.log(`${$.name} cookie API请求失败,请检查网路重试`) - } else { - let end = data.match(/(活动已经结束)/) && data.match(/(活动已经结束)/)[1] || '' - if(end){ - $.activityEnd = true - console.log('活动已结束') - } - setActivityCookie(resp) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function setActivityCookie(resp){ - let LZ_TOKEN_KEY = '' - let LZ_TOKEN_VALUE = '' - let lz_jdpin_token = '' - let setcookies = resp && resp['headers'] && (resp['headers']['set-cookie'] || resp['headers']['Set-Cookie'] || '') || '' - let setcookie = '' - if(setcookies){ - if(typeof setcookies != 'object'){ - setcookie = setcookies.split(',') - }else setcookie = setcookies - for (let ck of setcookie) { - let name = ck.split(";")[0].trim() - if(name.split("=")[1]){ - // console.log(name.replace(/ /g,'')) - if(name.indexOf('LZ_TOKEN_KEY=')>-1) LZ_TOKEN_KEY = name.replace(/ /g,'')+';' - if(name.indexOf('LZ_TOKEN_VALUE=')>-1) LZ_TOKEN_VALUE = name.replace(/ /g,'')+';' - if(name.indexOf('lz_jdpin_token=')>-1) lz_jdpin_token = ''+name.replace(/ /g,'')+';' - } - } - } - if(LZ_TOKEN_KEY && LZ_TOKEN_VALUE) activityCookie = `${LZ_TOKEN_KEY} ${LZ_TOKEN_VALUE}` - if(lz_jdpin_token) lz_jdpin_token_cookie = lz_jdpin_token -} - -async function getUA(){ - $.UA = `jdapp;iPhone;10.1.4;13.1.2;${randomString(40)};network/wifi;model/iPhone8,1;addressid/2308460611;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` -} -function randomString(e) { - e = e || 32; - let t = "abcdef0123456789", a = t.length, n = ""; - for (i = 0; i < e; i++) - n += t.charAt(Math.floor(Math.random() * a)); - return n -} - -function joinShop() { - if(!$.joinVenderId) return - return new Promise(async resolve => { - $.shopactivityId = '' - $.errorJoinShop = '' - await $.wait(1000) - await getshopactivityId() - let activityId = `` - if($.shopactivityId) activityId = `,"activityId":${$.shopactivityId}` - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${$.joinVenderId}","shopId":"${$.joinVenderId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0${activityId},"channel":401}&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - // console.log(data) - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success === true){ - console.log(res.message) - $.errorJoinShop = res.message - if(res.result && res.result.giftInfo){ - for(let i of res.result.giftInfo.giftList){ - console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) - } - } - }else if(typeof res == 'object' && res.message){ - $.errorJoinShop = res.message - console.log(`${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function getshopactivityId() { - return new Promise(resolve => { - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=%7B%22venderId%22%3A%22${$.joinVenderId}%22%2C%22channel%22%3A401%7D&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success == true){ - // console.log($.toStr(res.result)) - console.log(`入会:${res.result.shopMemberCardInfo.venderCardName || ''}`) - $.shopactivityId = res.result.interestsRuleList && res.result.interestsRuleList[0] && res.result.interestsRuleList[0].interestsInfo && res.result.interestsRuleList[0].interestsInfo.activityId || '' - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -function jsonParse(str) { - if (typeof str == "string") { - try { - return JSON.parse(str); - } catch (e) { - console.log(e); - $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') - return []; - } - } -} - - -// 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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} - diff --git a/gua_opencard118.js b/gua_opencard118.js deleted file mode 100644 index b40ab753f..000000000 --- a/gua_opencard118.js +++ /dev/null @@ -1,665 +0,0 @@ -/* -海蓝之谜邀请入会有礼 [gua_opencard118.js] -新增开卡脚本 -一次性脚本 - -1.每邀请满3人50豆 -2.开1张卡 -3.已开卡的不算有效人数 - -第一个账号助力作者 其他依次助力CK1 -第一个CK失效会退出脚本 - -默认脚本不执行 -如需执行脚本请设置环境变量 -guaopencard118="true" -每个账号之间延迟 100=延迟100秒 0=延迟0秒会使用每3个账号延迟60秒 -guaopenwait_All 所有 -guaopenwait118="0" - - -All变量适用 -———————————————— -入口:[ 海蓝之谜邀请入会有礼 (https://lzkjdz-isv.isvjcloud.com/m/1000410747/99/2203100041074702/?helpUuid=76f9a4f1df2e42fd98c05997c0c9bc7d)] - -请求太频繁会被黑ip -过10分钟再执行 - -cron:30 1 16-31/3 3 * -============Quantumultx=============== -[task_local] -#海蓝之谜邀请入会有礼 -30 1 16-31/3 3 * https://raw.githubusercontent.com/smiek2121/scripts/master/gua_opencard118.js, tag=海蓝之谜邀请入会有礼, enabled=true - -*/ -let guaopencard = "false" -let guaopenwait = "0" - -const $ = new Env('海蓝之谜邀请入会有礼'); -const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; -const notify = $.isNode() ? require('./sendNotify') : ''; -//IOS等用户直接用NobyDa的jd cookie - -let cookiesArr = [], - cookie = ''; -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]) - }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; -} else { - cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); -} - -guaopencard = $.isNode() ? (process.env.guaopencard118 ? process.env.guaopencard118 : `${guaopencard}`) : ($.getdata('guaopencard118') ? $.getdata('guaopencard118') : `${guaopencard}`); -guaopencard = $.isNode() ? (process.env.guaopencard_All ? process.env.guaopencard_All : `${guaopencard}`) : ($.getdata('guaopencard_All') ? $.getdata('guaopencard_All') : `${guaopencard}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait118 ? process.env.guaopenwait118 : `${guaopenwait}`) : ($.getdata('guaopenwait118') ? $.getdata('guaopenwait118') : `${guaopenwait}`); -guaopenwait = $.isNode() ? (process.env.guaopenwait_All ? process.env.guaopenwait_All : `${guaopenwait}`) : ($.getdata('guaopenwait_All') ? $.getdata('guaopenwait_All') : `${guaopenwait}`); -guaopenwait = parseInt(guaopenwait, 10) || 0 -allMessage = "" -message = "" -$.hotFlag = false -$.outFlag = false -$.activityEnd = false -let lz_jdpin_token_cookie ='' -let activityCookie ='' -!(async () => { - if ($.isNode()) { - if(guaopencard+"" != "true"){ - console.log('如需执行脚本请设置环境变量[guaopencard118]为"true"') - } - if(guaopencard+"" != "true"){ - return - } - } - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { - "open-url": "https://bean.m.jd.com/" - }); - return; - } - $.activityId = "2203100041074702" - $.shareUuid = "76f9a4f1df2e42fd98c05997c0c9bc7d" - console.log(`入口:\nhttps://lzkjdz-isv.isvjcloud.com/m/1000410747/99/${$.activityId}/?helpUuid=${$.shareUuid}`) - let shareUuidArr = [$.shareUuid,"0b040fd16d334886a60c9194ed39e156","76f9a4f1df2e42fd98c05997c0c9bc7d","d52668543e964836af3bcf9b62a908ce","6668e423b315482284cd4dd8c08e85f0","b10938a3b47c451793edbab377e83d5c","5dc7f645b7cb436fb1be649aeb346059","cb09c5068c894ecd8dd83e3a4c0e151f","5899b188f737424197406bbcfefda7a9","23aa9b317397423ebc152277aff1f5d4","2761691b20fb49cbba0b2db2ca6ffcb0","0420d21c7e164d898bb48d7ef3215ce9"] - let s = Math.floor((Math.random()*10)) - let n = 0 - if(s >= 1 && s<= 5) n = Math.floor((Math.random()*shareUuidArr.length)) - $.shareUuid = shareUuidArr[n] ? shareUuidArr[n] : $.shareUuid - - for (let i = 0; i < cookiesArr.length; i++) { - cookie = cookiesArr[i]; - if (cookie) { - $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) - $.index = i + 1; - message = "" - $.bean = 0 - $.hotFlag = false - $.nickName = ''; - console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - await getUA() - await run(); - if(i == 0 && !$.actorUuid) break - if($.outFlag || $.activityEnd) break - } - } - if($.outFlag) { - let msg = '此ip已被限制,请过10分钟后再执行脚本' - $.msg($.name, ``, `${msg}`); - if ($.isNode()) await notify.sendNotify(`${$.name}`, `${msg}`); - } -})() - .catch((e) => $.logErr(e)) - .finally(() => $.done()) - - -async function run() { - try { - // $.hasEnd = true - $.endTime = 0 - lz_jdpin_token_cookie = '' - $.Token = '' - $.Pin = '' - let flag = false - await takePostRequest('isvObfuscator'); - if($.Token == ''){ - console.log('获取[token]失败!') - return - } - await getCk() - if (activityCookie == '') { - console.log(`获取cookie失败`); return; - } - if($.activityEnd === true){ - console.log('活动结束') - return - } - if($.outFlag){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - return - } - await takePostRequest('getMyPing'); - if(!$.Pin){ - console.log('获取[Pin]失败!') - return - } - await takePostRequest('accessLogWithAD'); - await takePostRequest('getOpenCardStatusWithOutSelf'); - await takePostRequest('activityContent'); - await getSimpleActInfoVo() - if($.hasEnd === true || Date.now() > $.endTime || Date.now()< $.startTimes){ - $.activityEnd = true - console.log('不在活动范围内') - return - } - if($.hotFlag) return - if(!$.actorUuid){ - console.log('获取不到[actorUuid]退出执行,请重新执行') - return - } - if($.openStatus == 0){ - console.log('开卡') - $.joinVenderId = 1000410747 - await joinShop() - if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log('第1次 重新开卡') - await $.wait(parseInt(Math.random() * 2000 + 3000, 10)) - await joinShop() - } - if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log('第2次 重新开卡') - await $.wait(parseInt(Math.random() * 2000 + 4000, 10)) - await joinShop() - } - if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log('第3次 重新开卡') - await $.wait(parseInt(Math.random() * 2000 + 4000, 10)) - await joinShop() - } - if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log("开卡失败❌ ,重新执行脚本") - } - await takePostRequest('activityContent'); - } - console.log($.openStatus === 1 ? "已开卡" : $.openStatus === 0 ? "未开卡" : "未知-"+$.openStatus) - console.log($.helpStatus === 2 ? "助力成功" : $.helpStatus === 3 ? "已助力" : $.helpStatus === 4 ? "助力他人" : $.helpStatus === 1 ? "未助力" : $.helpStatus === 5 ? "已开卡 无法助力" : "未知-"+$.helpStatus) - console.log(`【账号${$.index}】助力人数:${$.assistCount}`) - console.log($.actorUuid) - console.log(`当前助力:${$.shareUuid}`) - if($.index == 1){ - $.shareUuid = $.actorUuid - console.log(`后面的号都会助力:${$.shareUuid}`) - } - if(guaopenwait){ - if($.index != cookiesArr.length){ - console.log(`等待${guaopenwait}秒`) - await $.wait(parseInt(guaopenwait, 10) * 1000) - } - }else{ - if($.index % 3 == 0) console.log('休息1分钟,别被黑ip了\n可持续发展') - if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 60000, 10)) - } - } catch (e) { - console.log(e) - } -} - -async function takePostRequest(type) { - if ($.outFlag) return - let domain = 'https://lzkjdz-isv.isvjcloud.com'; - let body = ``; - let method = 'POST' - let admJson = '' - switch (type) { - case 'isvObfuscator': - url = `https://api.m.jd.com/client.action?functionId=isvObfuscator`; - body = `body=%7B%22url%22%3A%22https%3A//lzkjdz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&uuid=9a79133855e4ed42e83cda6c58b51881c4519236&client=apple&clientVersion=10.1.4&st=1647263148203&sv=102&sign=53ee02a59dece3c480e3fcb067c49954`; - break; - case 'getMyPing': - url = `${domain}/customer/getMyPing`; - body = `token=${$.Token}&fromType=APP&userId=1000410747&pin=`; - break; - case 'getSimpleActInfoVo': - url = `${domain}/common/brand/getSimpleActInfoVo`; - body = `activityId=${$.activityId}`; - break; - case 'accessLogWithAD': - url = `${domain}/common/accessLogWithAD`; - let pageurl = `https://lzkjdz-isv.isvjcloud.com/m/1000410747/99/2203100041074702/?helpUuid=${$.shareUuid}` - body = `venderId=1000410747&code=99&pin=${encodeURIComponent($.Pin)}&activityId=${$.activityId}&pageUrl=${encodeURIComponent(pageurl)}` - break; - case 'getOpenCardStatusWithOutSelf': - url = `${domain}/crmCard/common/coupon/getOpenCardStatusWithOutSelf`; - body = `venderId=1000410747&activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}`; - break; - case 'activityContent': - url = `${domain}/lamer/invite/activityContent`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&shareUuid=${$.shareUuid}` - break; - case 'getDrawRecordHasCoupon': - url = `${domain}/dingzhi/taskact/common/getDrawRecordHasCoupon`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - case 'getShareRecord': - url = `${domain}/dingzhi/taskact/common/getShareRecord`; - body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` - break; - default: - console.log(`错误${type}`); - } - let myRequest = getPostRequest(url, body, method); - // console.log(myRequest) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - setActivityCookie(resp) - if (err) { - if (resp && typeof resp.statusCode != 'undefined') { - if (resp.statusCode == 493) { - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err, err)}`) - console.log(`${type} API请求失败,请检查网路重试`) - } else { - dealReturn(type, data); - } - } catch (e) { - // console.log(data); - console.log(e, resp) - } finally { - resolve(); - } - }) - }) -} - -async function dealReturn(type, data) { - let res = '' - try { - if(type != 'accessLogWithAD' || type != 'drawContent'){ - if(data){ - res = JSON.parse(data); - } - } - } catch (e) { - console.log(`${type} 执行任务异常`); - console.log(data); - $.runFalag = false; - } - try { - switch (type) { - case 'isvObfuscator': - if(typeof res == 'object'){ - if(res.errcode == 0){ - if(typeof res.token != 'undefined') $.Token = res.token - }else if(res.message){ - console.log(`isvObfuscator ${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - break; - case 'getMyPing': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - if(res.data && typeof res.data.secretPin != 'undefined') $.Pin = res.data.secretPin - if(res.data && typeof res.data.nickname != 'undefined') $.nickname = res.data.nickname - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'activityContent': - if(typeof res == 'object'){ - // console.log(data) - if(res.result && res.result === true){ - $.actorUuid = res.data.customerId || '' - $.helpStatus = res.data.helpStatus || '' - $.openStatus = res.data.openStatus || '' - $.assistCount = res.data.assistCount || 0 - if(res.data.sendBeanNum) console.log(`获得${res.data.sendBeanNum}豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getOpenCardStatusWithOutSelf': - if(typeof res == 'object'){ - if(res.isOk){ - $.allOpenCard = res.openCard || false - }else if(res.errorMessage || res.msg){ - console.log(`${type} ${res.errorMessage || res.msg || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getDrawRecordHasCoupon': - if(typeof res == 'object'){ - if(res.result && res.result === true){ - console.log(`我的奖品:`) - let num = 0 - let value = 0 - let typeArr = { - "dayShareBeans":"邀请", - "dayBeSharedBeans":"被邀请", - "openCardBeans":"开卡", - "saveTaskBeans23":"关注", - "saveTaskBeans12":"逛店铺", - "saveTaskBeans21":"加购", - } - for(let i in res.data){ - let item = res.data[i] - if(item.drawId == 'dayShareBeans'){ - num++ - value = item.infoName.replace('京豆','') - }else{ - console.log(`${item.infoType != 10 && item.drawId && (typeArr[item.drawId] || item.drawId)+':' || item.value && item.value +':' || ''}${item.infoName}`) - } - } - if(num > 0) console.log(`邀请好友(${num}):${num*parseInt(value, 10) || 30}京豆`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'getShareRecord': - if(typeof res == 'object'){ - if(res.result && res.result === true && res.data){ - $.ShareCount = res.data.length - $.log(`=========== 你邀请了:${res.data.length}个`) - }else if(res.errorMessage){ - console.log(`${type} ${res.errorMessage || ''}`) - }else{ - console.log(`${type} ${data}`) - } - }else{ - console.log(`${type} ${data}`) - } - break; - case 'accessLogWithAD': - case 'drawContent': - break; - default: - console.log(`${type}-> ${data}`); - } - if(typeof res == 'object'){ - if(res.errorMessage){ - if(res.errorMessage.indexOf('火爆') >-1 ){ - $.hotFlag = true - } - } - } - } catch (e) { - console.log(e) - } -} - -function getPostRequest(url, body, method="POST") { - let headers = { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Content-Type": "application/x-www-form-urlencoded", - "Cookie": cookie, - "User-Agent": $.UA, - "X-Requested-With": "XMLHttpRequest" - } - if(url.indexOf('https://lzkjdz-isv.isvjcloud.com') > -1){ - headers["Referer"] = `https://lzkjdz-isv.isvjcloud.com/m/1000410747/99/2203100041074702/?helpUuid=${$.shareUuid}` - headers["Cookie"] = `${lz_jdpin_token_cookie && lz_jdpin_token_cookie || ''}${$.Pin && "AUTH_C_USER=" + $.Pin + ";" || ""}${activityCookie}` - } - // console.log(headers) - // console.log(headers.Cookie) - return {url: url, method: method, headers: headers, body: body, timeout:30000}; -} - -function getSimpleActInfoVo() { - return new Promise(resolve => { - let get = { - url:`https://lzkjdz-isv.isvjcloud.com/common/brand/getSimpleActInfoVo?activityId=2203100041074702`, - headers: { - "Accept": "application/json, text/plain, */*", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Content-Type": "application/x-www-form-urlencoded", - "Cookie": cookie, - "Referer": `https://lzkjdz-isv.isvjcloud.com/m/1000410747/99/2203100041074702/?helpUuid=${$.shareUuid}`, - "User-Agent": $.UA, - }, - timeout:30000 - } - $.get(get, async(err, resp, data) => { - try { - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err)}`) - console.log(`${$.name} cookie API请求失败,请检查网路重试`) - } else { - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.result && res.result === true){ - $.endTime = res.data.endTime || 0 - $.startTimes = res.data.startTime || Date.now() - }else if(res.errorMessage){ - console.log(`${res.errorMessage || ''}`) - }else{ - console.log(`${data}`) - } - }else{ - console.log(`${data}`) - } - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function getCk() { - return new Promise(resolve => { - let get = { - url:`https://lzkjdz-isv.isvjcloud.com/wxCommonInfo/token`, - headers: { - "Accept": "application/json, text/plain, */*", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Content-Type": "application/x-www-form-urlencoded", - "Cookie": cookie, - "Referer": `https://lzkjdz-isv.isvjcloud.com/m/1000410747/99/2203100041074702/?helpUuid=${$.shareUuid}`, - "User-Agent": $.UA, - }, - timeout:30000 - } - $.get(get, async(err, resp, data) => { - try { - if (err) { - if(resp && typeof resp.statusCode != 'undefined'){ - if(resp.statusCode == 493){ - console.log('此ip已被限制,请过10分钟后再执行脚本\n') - $.outFlag = true - } - } - console.log(`${$.toStr(err)}`) - console.log(`${$.name} cookie API请求失败,请检查网路重试`) - } else { - let end = data.match(/(活动已经结束)/) && data.match(/(活动已经结束)/)[1] || '' - if(end){ - $.activityEnd = true - console.log('活动已结束') - } - setActivityCookie(resp) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function setActivityCookie(resp){ - let LZ_TOKEN_KEY = '' - let LZ_TOKEN_VALUE = '' - let lz_jdpin_token = '' - let setcookies = resp && resp['headers'] && (resp['headers']['set-cookie'] || resp['headers']['Set-Cookie'] || '') || '' - let setcookie = '' - if(setcookies){ - if(typeof setcookies != 'object'){ - setcookie = setcookies.split(',') - }else setcookie = setcookies - for (let ck of setcookie) { - let name = ck.split(";")[0].trim() - if(name.split("=")[1]){ - // console.log(name.replace(/ /g,'')) - if(name.indexOf('LZ_TOKEN_KEY=')>-1) LZ_TOKEN_KEY = name.replace(/ /g,'')+';' - if(name.indexOf('LZ_TOKEN_VALUE=')>-1) LZ_TOKEN_VALUE = name.replace(/ /g,'')+';' - if(name.indexOf('lz_jdpin_token=')>-1) lz_jdpin_token = ''+name.replace(/ /g,'')+';' - } - } - } - if(LZ_TOKEN_KEY && LZ_TOKEN_VALUE) activityCookie = `${LZ_TOKEN_KEY} ${LZ_TOKEN_VALUE}` - if(lz_jdpin_token) lz_jdpin_token_cookie = lz_jdpin_token -} - -async function getUA(){ - $.UA = `jdapp;iPhone;10.1.4;13.1.2;${randomString(40)};network/wifi;model/iPhone8,1;addressid/2308460611;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` -} -function randomString(e) { - e = e || 32; - let t = "abcdef0123456789", a = t.length, n = ""; - for (i = 0; i < e; i++) - n += t.charAt(Math.floor(Math.random() * a)); - return n -} - -function joinShop() { - if(!$.joinVenderId) return - return new Promise(async resolve => { - $.shopactivityId = '' - $.errorJoinShop = '' - await $.wait(1000) - await getshopactivityId() - let activityId = `` - if($.shopactivityId) activityId = `,"activityId":${$.shopactivityId}` - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${$.joinVenderId}","shopId":"${$.joinVenderId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0${activityId},"channel":401}&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - // console.log(data) - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success === true){ - console.log(res.message) - $.errorJoinShop = res.message - if(res.result && res.result.giftInfo){ - for(let i of res.result.giftInfo.giftList){ - console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) - } - } - }else if(typeof res == 'object' && res.message){ - $.errorJoinShop = res.message - console.log(`${res.message || ''}`) - }else{ - console.log(data) - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function getshopactivityId() { - return new Promise(resolve => { - const options = { - url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=%7B%22venderId%22%3A%22${$.joinVenderId}%22%2C%22channel%22%3A401%7D&client=H5&clientVersion=9.2.0&uuid=88888`, - headers: { - 'Content-Type': 'text/plain; Charset=UTF-8', - 'Origin': 'https://api.m.jd.com', - 'Host': 'api.m.jd.com', - 'accept': '*/*', - 'User-Agent': $.UA, - 'content-type': 'application/x-www-form-urlencoded', - 'Cookie': cookie - } - } - $.get(options, async (err, resp, data) => { - try { - let res = $.toObj(data,data); - if(typeof res == 'object'){ - if(res.success == true){ - // console.log($.toStr(res.result)) - console.log(`入会:${res.result.shopMemberCardInfo.venderCardName || ''}`) - $.shopactivityId = res.result.interestsRuleList && res.result.interestsRuleList[0] && res.result.interestsRuleList[0].interestsInfo && res.result.interestsRuleList[0].interestsInfo.activityId || '' - } - }else{ - console.log(data) - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -function jsonParse(str) { - if (typeof str == "string") { - try { - return JSON.parse(str); - } catch (e) { - console.log(e); - $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') - return []; - } - } -} - - -// 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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} - diff --git a/jd_CkSeq.js b/jd_CkSeq.js index 79a5be2ba..3f592184d 100644 --- a/jd_CkSeq.js +++ b/jd_CkSeq.js @@ -68,12 +68,11 @@ if (UidFileexists) { cookie = cookiesArr[i]; var tempptpin = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); var intSeq = inArray(tempptpin, arrEnvPtPin); - if (intSeq != -1) { - intSeq += 1; + if (intSeq != -1) { arrCkPtPin.push(tempptpin); - strCk += "【"+intSeq + "】" + tempptpin ; - if (arrEnvOnebyOne[i]) { - strCk += "(账号已启用一对一推送)" + strCk += "【"+(intSeq+1) + "】" + tempptpin ; + if (arrEnvOnebyOne[intSeq]) { + strCk += "(已启用一对一推送)" } strCk +="\n"; } @@ -86,14 +85,14 @@ if (UidFileexists) { if (intSeq == -1) { strNoFoundCk += "【" + (i + 1) + "】" + tempptpin; if (arrEnvStatus[i] == 1) { - strNoFoundCk += "(状态已禁用)" + strNoFoundCk += "(已禁用)" if ($.isNode() && WP_APP_TOKEN_ONE) { await notify.sendNotifybyWxPucher("账号下线通知", strNotify, tempptpin); await $.wait(1000); } } if (arrEnvOnebyOne[i]) { - strNoFoundCk += "(账号已启用一对一推送)" + strNoFoundCk += "(已启用一对一推送)" } strNoFoundCk += "\n"; @@ -118,7 +117,7 @@ if (UidFileexists) { function inArray(search, array) { var lnSeq = -1; - for (var i in array) { + for (let i = 0; i < array.length; i++) { if (array[i] == search) { lnSeq = i; } @@ -126,6 +125,7 @@ function inArray(search, array) { return parseInt(lnSeq); } + function getuuid(strRemark, PtPin) { var strTempuuid = ""; if (strRemark) { diff --git a/jd_lzdz1_customized2.js b/jd_lzdz1_customized2.js deleted file mode 100644 index a5f11e655..000000000 --- a/jd_lzdz1_customized2.js +++ /dev/null @@ -1,536 +0,0 @@ -/* -精致宅家 春尚焕新 -*/ -const $ = new Env("精致宅家 春尚焕新"); -const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; -const notify = $.isNode() ? require("./sendNotify") : ""; -let cookiesArr = [], cookie = "", message = ""; -let ownCode = null; -let authorCodeList = []; -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]); - }); - if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; -} else { - let cookiesData = $.getdata("CookiesJD") || "[]"; - cookiesData = JSON.parse(cookiesData); - cookiesArr = cookiesData.map((item) => item.cookie); - cookiesArr.reverse(); - cookiesArr.push(...[$.getdata("CookieJD2"), $.getdata("CookieJD")]); - cookiesArr.reverse(); - cookiesArr = cookiesArr.filter((item) => !!item); -} -!(async () => { - $.getAuthorCodeListerr = false; - if (!cookiesArr[0]) { - $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/bean/signIndex.action", { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - return; - } - authorCodeList = await getAuthorCodeList('https://gitee.com/fatelight/Code/raw/master/lzdz2.json') - if ($.getAuthorCodeListerr === false) { - authorCodeList = [ - '3f8b04988ff24da59980aa1efb1a4d25', - ] - } - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i]; - originCookie = cookiesArr[i]; - newCookie = ""; - $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]); - $.index = i + 1; - $.isLogin = true; - $.nickName = ""; - await checkCookie(); - console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - // if ($.isNode()) { - // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - // } - continue; - } - $.bean = 0; - $.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1); - $.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - // authorCodeList = [ - // "3f8b04988ff24da59980aa1efb1a4d25", - // ]; - // $.authorCode = authorCodeList[random(0, authorCodeList.length)]; - $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] - $.authorNum = `${random(1000000, 9999999)}`; - $.randomCode = random(1000000, 9999999); - $.activityId = "dz6054741f4dfaa17788a046da6c1c"; - $.activityShopId = "1000351442"; - $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/womenWear/union/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=null&shareuserid4minipg=${encodeURIComponent($.secretPin)}&shopid=${$.activityShopId}&sid=&un_area=`; - await member(); - await $.wait(1000); - if ($.bean > 0) { - message += `\n【京东账号${$.index}】${$.nickName || $.UserName} \n └ 获得 ${$.bean} 京豆。`; - } - } - } - if (message !== "") { - if ($.isNode()) { - await notify.sendNotify($.name, message, "", `\n`); - } else { - $.msg($.name, "有点儿收获", message); - } - } -})() - .catch((e) => { - $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); - }) - .finally(() => { - $.done(); - }); - -async function member() { - $.token = null; - $.secretPin = null; - $.openCardActivityId = null; - lz_cookie = {}; - await getFirstLZCK(); - await getToken(); - await task("dz/common/getSimpleActInfoVo", `activityId=${$.activityId}`, 1); - if ($.token) { - await getMyPing(); - if ($.secretPin) { - console.log("去助力 -> " + $.authorCode); - await taskaccessLog("common/accessLogWithAD", `venderId=${$.activityShopId}&code=99&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=null`, 1); - await task("wxActionCommon/getUserInfo", `pin=${encodeURIComponent($.secretPin)}`, 1); - if ($.index === 1) { - await task("/womenWear/union/activityContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&shareUuid=${encodeURIComponent($.authorCode)}`, 0, 1); - } else { - await task("/womenWear/union/activityContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&shareUuid=${encodeURIComponent($.authorCode)}`); - } - $.log("关注店铺"); - await task("womenWear/union/saveTask", `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}&taskType=23&taskValue=1&shareUuid=${encodeURIComponent($.authorCode)}`); - await task("womenWear/union/saveTask", `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}&taskType=21&taskValue=&shareUuid=${encodeURIComponent($.authorCode)}`); - await task("taskact/common/drawContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - await task("womenWear/union/initOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}`); - $.log("加入店铺会员"); - if ($.openCardList) { - for (const vo of $.openCardList) { - // console.log(vo) - $.log(`>>> 去加入${vo.name} ${vo.venderId}`); - if (vo.openStatus == 0) { - await getShopOpenCardInfo({ venderId: `${vo.venderId}`, channel: "401" }, vo.venderId); - await bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: $.openCardActivityId, channel: 401 }, vo.venderId); - await $.wait(1000); - } else { - $.log(`>>> 已经是会员`); - } - } - } else { - $.log("没有获取到对应的任务。\n"); - } - await task("womenWear/union/initOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}`); - console.log("去助力 -> " + $.authorCode); - await task("linkgame/assist/status", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - await task("linkgame/assist", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - - await task("womenWear/union/draw", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); - // await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - - // await task('linkgame/task/info', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - // console.log('任务 -> ') - // await $.wait(2000) - // await task('opencard/addCart', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await $.wait(2000) - // await task('linkgame/sendAllCoupon', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await getFirstLZCK() - // await getToken(); - // console.log('抽奖 -> ') - // await $.wait(2000) - // await task('linkgame/draw', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - // console.log('100 -> ') - // await getFirstLZCK() - // await getToken(); - // await $.wait(2000) - // await task('linkgame/draw/record', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - } - } -} - -function task(function_id, body, isCommon = 0, own = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.result) { - switch (function_id) { - case "dz/common/getSimpleActInfoVo": - $.jdActivityId = data.data.jdActivityId; - $.venderId = data.data.venderId; - $.activityType = data.data.activityType; - // console.log($.venderId) - break; - case "wxActionCommon/getUserInfo": - break; - case "/womenWear/union/activityContent": - if (!data.data.hasEnd) { - $.log(`开启【${data.data.activityName}】活动`); - $.log("-------------------"); - if ($.index === 1) { - ownCode = data.data.actorUuid; - console.log(ownCode); - } - $.actorUuid = data.data.actorUuid; - } else { - $.log("活动已经结束"); - } - break; - case "womenWear/union/initOpenCard": - $.openCardList = data.data.openInfo; - $.openCardStatus = data.data.allOpenCard; - // console.log(data) - break; - case "womenWear/union/saveTask": - console.log(data); - break; - case "womenWear/union/draw": - console.log(data); - break; - case "opencard/addCart": - if (data.data) { - console.log(data.data); - } - break; - case "linkgame/sendAllCoupon": - if (data.data) { - console.log(data.data); - } - - break; - case "interaction/write/writePersonInfo": - console.log(data); - break; - case "linkgame/draw": - console.log(data); - break; - case "linkgame/draw/record": - console.log(data.data); - break; - case "linkgame/assist/status": - $.log(JSON.stringify(data)); - break; - case "linkgame/assist": - $.log(JSON.stringify(data)); - break; - case "opencard/help/list": - $.log(JSON.stringify(data)); - break; - default: - // $.log(JSON.stringify(data)) - break; - } - } else { - // $.log(JSON.stringify(data)) - } - } else { - // $.log("京东没有返回数据") - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function taskaccessLog(function_id, body, isCommon = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - // console.log(resp); - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie};`; - for (let sk of resp["headers"]["set-cookie"]) { - lz_cookie[sk.split(";")[0].substr(0, sk.split(";")[0].indexOf("="))] = sk.split(";")[0].substr(sk.split(";")[0].indexOf("=") + 1); - } - for (const vo of Object.keys(lz_cookie)) { - cookie += vo + "=" + lz_cookie[vo] + ";"; - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - }); - }); -} -function getAuthorCodeList(url) { - return new Promise((resolve) => { - const options = { - url: `${url}?${new Date()}`, - timeout: 10000, - headers: { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88", - }, - }; - $.get(options, async (err, resp, data) => { - try { - if (err) { - // $.log(err) - $.getAuthorCodeListerr = false; - } else { - if (data) data = JSON.parse(data); - $.getAuthorCodeListerr = true; - } - } catch (e) { - $.logErr(e, resp); - data = null; - } finally { - resolve(data); - } - }); - }); -} - -function taskUrl(function_id, body, isCommon) { - return { - url: isCommon ? `https://lzdz1-isv.isvjcloud.com/${function_id}` : `https://lzdz1-isv.isvjcloud.com/dingzhi/${function_id}`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: body, - }; -} - -function getMyPing() { - let opt = { - url: `https://lzdz1-isv.isvjcloud.com/customer/getMyPing`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: `userId=${$.activityShopId}&token=${$.token}&fromType=APP&riskType=1`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (data) { - data = JSON.parse(data); - if (data.result) { - $.log(`你好:${data.data.nickname}`); - $.pin = data.data.nickname; - $.secretPin = data.data.secretPin; - cookie = `${cookie};AUTH_C_USER=${data.data.secretPin}`; - } else { - $.log(data.errorMessage); - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function getFirstLZCK() { - return new Promise((resolve) => { - $.get( - { - url: $.activityUrl, - headers: { - "user-agent": $.isNode() ? process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : require("./USER_AGENTS").USER_AGENT : $.getdata("JDUA") ? $.getdata("JDUA") : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", - }, - }, - (err, resp, data) => { - try { - if (err) { - console.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - } - ); - }); -} -function getToken() { - let opt = { - url: `https://api.m.jd.com/client.action?functionId=isvObfuscator`, - headers: { - Host: "api.m.jd.com", - "Content-Type": "application/x-www-form-urlencoded", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)", - "Accept-Language": "zh-Hans-CN;q=1", - "Accept-Encoding": "gzip, deflate, br", - }, - body: `body=%7B%22url%22%3A%20%22https%3A//lzkj-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=hjudwgohxzVu96krv&client=apple&clientVersion=9.4.0&st=1620476162000&sv=111&sign=f9d1b7e3b943b6a136d54fe4f892af05`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.code === "0") { - $.token = data.token; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function random(min, max) { - return Math.floor(Math.random() * (max - min)) + min; -} -function getUUID(format = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", UpperCase = 0) { - return format.replace(/[xy]/g, function (c) { - var r = (Math.random() * 16) | 0, - v = c == "x" ? r : (r & 0x3) | 0x8; - if (UpperCase) { - uuid = v.toString(36).toUpperCase(); - } else { - uuid = v.toString(36); - } - return uuid; - }); -} -function checkCookie() { - const options = { - url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", - headers: { - Host: "me-api.jd.com", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", - "Accept-Language": "zh-cn", - Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br", - }, - }; - return new Promise((resolve) => { - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.retcode === "1001") { - $.isLogin = false; //cookie过期 - return; - } - if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (e) { - $.logErr(e); - } finally { - resolve(); - } - }); - }); -} -// prettier-ignore -var _0xode='jsjiami.com.v6',_0xode_=['‮_0xode'],_0x5bce=[_0xode,'\x53\x45\x70\x6a\x54\x6b\x73\x3d','\x61\x6d\x4e\x52\x54\x33\x45\x3d','\x59\x6b\x5a\x7a\x53\x6b\x73\x3d','\x61\x30\x52\x55\x54\x47\x49\x3d','\x5a\x6d\x78\x76\x62\x33\x49\x3d','\x54\x6e\x70\x71\x64\x47\x30\x3d','\x63\x6d\x46\x75\x5a\x47\x39\x74','\x62\x47\x56\x75\x5a\x33\x52\x6f','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x4a\x74\x5a\x58\x4e\x7a\x59\x57\x64\x6c','\x62\x57\x56\x7a\x63\x32\x46\x6e\x5a\x51\x3d\x3d','\x65\x6d\x31\x51\x56\x45\x34\x3d','\x52\x57\x5a\x6a\x65\x6c\x4d\x3d','\x64\x33\x70\x49\x65\x47\x49\x3d','\x52\x30\x4a\x44\x65\x55\x30\x3d','\x4f\x47\x46\x6b\x5a\x6d\x49\x3d','\x61\x6d\x52\x66\x63\x32\x68\x76\x63\x46\x39\x74\x5a\x57\x31\x69\x5a\x58\x49\x3d','\x4f\x53\x34\x79\x4c\x6a\x41\x3d','\x61\x6d\x52\x7a\x61\x57\x64\x75\x4c\x6d\x4e\x6d','\x59\x58\x42\x77\x62\x47\x6c\x6a\x59\x58\x52\x70\x62\x32\x34\x76\x61\x6e\x4e\x76\x62\x67\x3d\x3d','\x61\x55\x4a\x43\x62\x30\x6f\x3d','\x63\x48\x64\x68\x59\x6d\x30\x3d','\x53\x57\x46\x44\x62\x46\x6b\x3d','\x5a\x47\x78\x6e\x55\x6d\x59\x3d','\x62\x32\x46\x4a\x55\x31\x59\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x6a\x5a\x47\x34\x75\x62\x6e\x6f\x75\x62\x48\x55\x76\x5a\x32\x56\x30\x61\x44\x56\x7a\x64\x41\x3d\x3d','\x54\x6b\x64\x30\x59\x6b\x59\x3d','\x63\x47\x39\x7a\x64\x41\x3d\x3d','\x59\x58\x42\x77\x62\x48\x6b\x3d','\x64\x45\x6c\x78\x65\x45\x77\x3d','\x65\x6b\x46\x35\x65\x58\x55\x3d','\x5a\x56\x70\x42\x64\x55\x73\x3d','\x62\x45\x5a\x45\x62\x46\x59\x3d','\x5a\x30\x74\x56\x65\x6e\x49\x3d','\x59\x58\x42\x70\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74','\x4b\x69\x38\x71','\x61\x32\x56\x6c\x63\x43\x31\x68\x62\x47\x6c\x32\x5a\x51\x3d\x3d','\x65\x6d\x67\x74\x59\x32\x34\x3d','\x5a\x33\x70\x70\x63\x43\x77\x67\x5a\x47\x56\x6d\x62\x47\x46\x30\x5a\x53\x77\x67\x59\x6e\x49\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x39\x68\x63\x48\x42\x70\x5a\x44\x31\x71\x5a\x46\x39\x7a\x61\x47\x39\x77\x58\x32\x31\x6c\x62\x57\x4a\x6c\x63\x69\x5a\x6d\x64\x57\x35\x6a\x64\x47\x6c\x76\x62\x6b\x6c\x6b\x50\x57\x64\x6c\x64\x46\x4e\x6f\x62\x33\x42\x50\x63\x47\x56\x75\x51\x32\x46\x79\x5a\x45\x6c\x75\x5a\x6d\x38\x6d\x59\x6d\x39\x6b\x65\x54\x30\x3d','\x52\x6c\x68\x70\x52\x48\x6b\x3d','\x63\x33\x52\x79\x61\x57\x35\x6e\x61\x57\x5a\x35','\x4a\x6d\x4e\x73\x61\x57\x56\x75\x64\x44\x31\x49\x4e\x53\x5a\x6a\x62\x47\x6c\x6c\x62\x6e\x52\x57\x5a\x58\x4a\x7a\x61\x57\x39\x75\x50\x54\x6b\x75\x4d\x69\x34\x77\x4a\x6e\x56\x31\x61\x57\x51\x39\x4f\x44\x67\x34\x4f\x44\x67\x3d','\x62\x57\x74\x4f\x59\x57\x4d\x3d','\x52\x32\x4e\x78\x61\x56\x63\x3d','\x54\x47\x70\x55\x63\x33\x41\x3d','\x61\x6d\x52\x68\x63\x48\x41\x37\x61\x56\x42\x6f\x62\x32\x35\x6c\x4f\x7a\x6b\x75\x4e\x53\x34\x30\x4f\x7a\x45\x7a\x4c\x6a\x59\x37','\x56\x56\x56\x4a\x52\x41\x3d\x3d','\x4f\x32\x35\x6c\x64\x48\x64\x76\x63\x6d\x73\x76\x64\x32\x6c\x6d\x61\x54\x74\x42\x52\x45\x6c\x45\x4c\x77\x3d\x3d','\x51\x55\x52\x4a\x52\x41\x3d\x3d','\x4f\x32\x31\x76\x5a\x47\x56\x73\x4c\x32\x6c\x51\x61\x47\x39\x75\x5a\x54\x45\x77\x4c\x44\x4d\x37\x59\x57\x52\x6b\x63\x6d\x56\x7a\x63\x32\x6c\x6b\x4c\x7a\x41\x37\x59\x58\x42\x77\x51\x6e\x56\x70\x62\x47\x51\x76\x4d\x54\x59\x33\x4e\x6a\x59\x34\x4f\x32\x70\x6b\x55\x33\x56\x77\x63\x47\x39\x79\x64\x45\x52\x68\x63\x6d\x74\x4e\x62\x32\x52\x6c\x4c\x7a\x41\x37\x54\x57\x39\x36\x61\x57\x78\x73\x59\x53\x38\x31\x4c\x6a\x41\x67\x4b\x47\x6c\x51\x61\x47\x39\x75\x5a\x54\x73\x67\x51\x31\x42\x56\x49\x47\x6c\x51\x61\x47\x39\x75\x5a\x53\x42\x50\x55\x79\x41\x78\x4d\x31\x38\x32\x49\x47\x78\x70\x61\x32\x55\x67\x54\x57\x46\x6a\x49\x45\x39\x54\x49\x46\x67\x70\x49\x45\x46\x77\x63\x47\x78\x6c\x56\x32\x56\x69\x53\x32\x6c\x30\x4c\x7a\x59\x77\x4e\x53\x34\x78\x4c\x6a\x45\x31\x49\x43\x68\x4c\x53\x46\x52\x4e\x54\x43\x77\x67\x62\x47\x6c\x72\x5a\x53\x42\x48\x5a\x57\x4e\x72\x62\x79\x6b\x67\x54\x57\x39\x69\x61\x57\x78\x6c\x4c\x7a\x45\x31\x52\x54\x45\x30\x4f\x44\x74\x7a\x64\x58\x42\x77\x62\x33\x4a\x30\x53\x6b\x52\x54\x53\x46\x64\x4c\x4c\x7a\x45\x3d','\x64\x33\x70\x79\x61\x31\x41\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x7a\x61\x47\x39\x77\x62\x57\x56\x74\x59\x6d\x56\x79\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74\x4c\x33\x4e\x6f\x62\x33\x42\x6a\x59\x58\x4a\x6b\x4c\x7a\x39\x32\x5a\x57\x35\x6b\x5a\x58\x4a\x4a\x5a\x44\x30\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x67\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x56\x6e\x46\x73\x56\x6b\x6f\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x56\x63\x6d\x77\x3d','\x56\x55\x39\x73\x62\x45\x4d\x3d','\x56\x48\x70\x6f\x51\x6e\x4d\x3d','\x59\x56\x64\x5a\x53\x6c\x67\x3d','\x65\x48\x6c\x4e\x64\x57\x45\x3d','\x5a\x57\x35\x32','\x55\x30\x6c\x48\x54\x6c\x39\x56\x55\x6b\x77\x3d','\x5a\x32\x56\x30','\x55\x6c\x70\x43\x62\x45\x73\x3d','\x51\x30\x52\x74\x5a\x55\x63\x3d','\x54\x55\x78\x43\x63\x45\x6b\x3d','\x62\x47\x39\x6e','\x63\x47\x46\x79\x63\x32\x55\x3d','\x63\x33\x56\x6a\x59\x32\x56\x7a\x63\x77\x3d\x3d','\x63\x6d\x56\x7a\x64\x57\x78\x30','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x55\x6e\x56\x73\x5a\x55\x78\x70\x63\x33\x51\x3d','\x62\x33\x42\x6c\x62\x6b\x4e\x68\x63\x6d\x52\x42\x59\x33\x52\x70\x64\x6d\x6c\x30\x65\x55\x6c\x6b','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x53\x57\x35\x6d\x62\x77\x3d\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x4a\x5a\x41\x3d\x3d','\x52\x47\x31\x35\x61\x48\x55\x3d','\x59\x56\x70\x51\x59\x57\x34\x3d','\x59\x58\x42\x33\x52\x6d\x30\x3d','\x65\x46\x56\x42\x64\x31\x63\x3d','\x54\x30\x5a\x6d\x52\x58\x55\x3d','\x52\x31\x68\x4c\x54\x31\x45\x3d','\x61\x6c\x5a\x53\x64\x6c\x6f\x3d','\x64\x32\x35\x4d\x52\x30\x30\x3d','\x62\x33\x42\x5a\x51\x32\x59\x3d','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x49\x3d','\x64\x45\x4a\x79\x52\x32\x38\x3d','\x55\x6d\x6c\x68\x52\x56\x63\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x38\x3d','\x56\x30\x64\x30\x53\x30\x73\x3d','\x64\x33\x46\x6f\x59\x57\x38\x3d','\x52\x31\x46\x30\x52\x6b\x55\x3d','\x51\x6b\x78\x34\x51\x57\x49\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x51\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x54\x56\x46\x45\x5a\x6d\x30\x3d','\x52\x30\x39\x4b\x61\x6d\x55\x3d','\x61\x31\x6c\x47\x53\x6c\x45\x3d','\x61\x57\x56\x6b\x51\x55\x73\x3d','\x61\x6d\x31\x72\x54\x45\x49\x3d','\x54\x32\x46\x33\x59\x32\x63\x3d','\x65\x55\x64\x78\x59\x6d\x49\x3d','\x53\x32\x70\x70\x62\x58\x4d\x3d','\x56\x45\x52\x57\x53\x45\x59\x3d','\x56\x31\x4e\x49\x53\x6e\x4d\x3d','\x53\x47\x56\x53\x65\x45\x45\x3d','\x52\x55\x78\x79\x54\x6c\x51\x3d','\x57\x6b\x52\x45\x56\x57\x59\x3d','\x64\x58\x64\x35\x55\x6b\x6b\x3d','\x59\x6c\x64\x49\x51\x57\x77\x3d','\x5a\x30\x35\x78\x53\x6d\x34\x3d','\x52\x6b\x4a\x79\x53\x6d\x49\x3d','\x53\x6b\x68\x58\x55\x45\x63\x3d','\x64\x58\x4e\x5a\x65\x56\x6f\x3d','\x54\x46\x4e\x54\x65\x48\x67\x3d','\x54\x48\x4e\x4a\x65\x6b\x30\x3d','\x62\x47\x5a\x69\x65\x6b\x6f\x3d','\x5a\x48\x4e\x79\x63\x55\x38\x3d','\x62\x47\x39\x6e\x52\x58\x4a\x79','\x5a\x45\x46\x42\x5a\x30\x45\x3d','\x51\x42\x59\x67\x6a\x73\x6a\x53\x69\x61\x6d\x69\x74\x4a\x52\x4e\x2e\x63\x6f\x6d\x66\x54\x2e\x76\x74\x36\x4e\x67\x67\x3d\x3d'];if(function(_0x15a272,_0x516b6a,_0x4dd628){function _0x4485e5(_0x3c702f,_0x2622f0,_0x1e7f7d,_0x34d687,_0x19a000,_0x186734){_0x2622f0=_0x2622f0>>0x8,_0x19a000='po';var _0x34e09c='shift',_0x2629da='push',_0x186734='‮';if(_0x2622f0<_0x3c702f){while(--_0x3c702f){_0x34d687=_0x15a272[_0x34e09c]();if(_0x2622f0===_0x3c702f&&_0x186734==='‮'&&_0x186734['length']===0x1){_0x2622f0=_0x34d687,_0x1e7f7d=_0x15a272[_0x19a000+'p']();}else if(_0x2622f0&&_0x1e7f7d['replace'](/[QBYgStJRNfTtNgg=]/g,'')===_0x2622f0){_0x15a272[_0x2629da](_0x34d687);}}_0x15a272[_0x2629da](_0x15a272[_0x34e09c]());}return 0xd874a;};return _0x4485e5(++_0x516b6a,_0x4dd628)>>_0x516b6a^_0x4dd628;}(_0x5bce,0x91,0x9100),_0x5bce){_0xode_=_0x5bce['length']^0x91;};function _0x14c9(_0x4701f8,_0x11a1c1){_0x4701f8=~~'0x'['concat'](_0x4701f8['slice'](0x1));var _0x1331d9=_0x5bce[_0x4701f8];if(_0x14c9['WGWLGh']===undefined&&'‮'['length']===0x1){(function(){var _0x5a4c3d=function(){var _0x2c6ed1;try{_0x2c6ed1=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x324599){_0x2c6ed1=window;}return _0x2c6ed1;};var _0x1631b1=_0x5a4c3d();var _0x593b41='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x1631b1['atob']||(_0x1631b1['atob']=function(_0x18444a){var _0x3a683c=String(_0x18444a)['replace'](/=+$/,'');for(var _0xc7b9d7=0x0,_0x1bc799,_0x7d79af,_0x5a84b3=0x0,_0x4e49ab='';_0x7d79af=_0x3a683c['charAt'](_0x5a84b3++);~_0x7d79af&&(_0x1bc799=_0xc7b9d7%0x4?_0x1bc799*0x40+_0x7d79af:_0x7d79af,_0xc7b9d7++%0x4)?_0x4e49ab+=String['fromCharCode'](0xff&_0x1bc799>>(-0x2*_0xc7b9d7&0x6)):0x0){_0x7d79af=_0x593b41['indexOf'](_0x7d79af);}return _0x4e49ab;});}());_0x14c9['sUNWyz']=function(_0x5c4f2c){var _0x82ac57=atob(_0x5c4f2c);var _0x545da4=[];for(var _0x2ea7d6=0x0,_0x3edb2d=_0x82ac57['length'];_0x2ea7d6<_0x3edb2d;_0x2ea7d6++){_0x545da4+='%'+('00'+_0x82ac57['charCodeAt'](_0x2ea7d6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x545da4);};_0x14c9['dThVyS']={};_0x14c9['WGWLGh']=!![];}var _0x2f65e7=_0x14c9['dThVyS'][_0x4701f8];if(_0x2f65e7===undefined){_0x1331d9=_0x14c9['sUNWyz'](_0x1331d9);_0x14c9['dThVyS'][_0x4701f8]=_0x1331d9;}else{_0x1331d9=_0x2f65e7;}return _0x1331d9;};function getShopOpenCardInfo(_0x28beec,_0x1334ea){var _0x6cf197={'\x52\x5a\x42\x6c\x4b':function(_0x1c184c,_0x537af3){return _0x1c184c!==_0x537af3;},'\x43\x44\x6d\x65\x47':_0x14c9('‫0'),'\x4d\x4c\x42\x70\x49':_0x14c9('‫1'),'\x44\x6d\x79\x68\x75':function(_0x277d5c){return _0x277d5c();},'\x54\x7a\x68\x42\x73':function(_0xde51b5,_0x1748b4){return _0xde51b5===_0x1748b4;},'\x61\x57\x59\x4a\x58':_0x14c9('‮2'),'\x78\x79\x4d\x75\x61':_0x14c9('‫3'),'\x46\x58\x69\x44\x79':function(_0x10e2ee,_0x35354b){return _0x10e2ee(_0x35354b);},'\x6d\x6b\x4e\x61\x63':_0x14c9('‮4'),'\x47\x63\x71\x69\x57':_0x14c9('‫5'),'\x4c\x6a\x54\x73\x70':_0x14c9('‮6'),'\x77\x7a\x72\x6b\x50':_0x14c9('‮7'),'\x56\x71\x6c\x56\x4a':function(_0x9710d4,_0x43a323){return _0x9710d4(_0x43a323);},'\x55\x4f\x6c\x6c\x43':_0x14c9('‫8')};let _0x14d980={'\x75\x72\x6c':_0x14c9('‮9')+_0x6cf197[_0x14c9('‮a')](encodeURIComponent,JSON[_0x14c9('‫b')](_0x28beec))+_0x14c9('‮c'),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x6cf197[_0x14c9('‫d')],'\x41\x63\x63\x65\x70\x74':_0x6cf197[_0x14c9('‮e')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x6cf197[_0x14c9('‫f')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x6cf197[_0x14c9('‮15')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x1334ea+_0x14c9('‮17')+_0x6cf197[_0x14c9('‮18')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x6cf197[_0x14c9('‫1a')]}};return new Promise(_0x15ba0a=>{if(_0x6cf197[_0x14c9('‫1b')](_0x6cf197[_0x14c9('‫1c')],_0x6cf197[_0x14c9('‫1d')])){Host=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{$[_0x14c9('‫20')](_0x14d980,(_0x45fcbf,_0x5cda91,_0x4f16e6)=>{if(_0x6cf197[_0x14c9('‮21')](_0x6cf197[_0x14c9('‫22')],_0x6cf197[_0x14c9('‫23')])){try{if(_0x45fcbf){console[_0x14c9('‮24')](_0x45fcbf);}else{res=JSON[_0x14c9('‮25')](_0x4f16e6);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}}catch(_0x1069d5){console[_0x14c9('‮24')](_0x1069d5);}finally{_0x6cf197[_0x14c9('‮2c')](_0x15ba0a);}}else{$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}});}});}async function bindWithVender(_0x458f18,_0x51a5d2){var _0x1ce6ca={'\x6b\x59\x46\x4a\x51':function(_0x48eab1,_0x247bf6){return _0x48eab1*_0x247bf6;},'\x69\x65\x64\x41\x4b':function(_0x380bcb,_0x201d01){return _0x380bcb(_0x201d01);},'\x6a\x6d\x6b\x4c\x42':function(_0x281c59,_0x7919b2){return _0x281c59!==_0x7919b2;},'\x4f\x61\x77\x63\x67':_0x14c9('‫2d'),'\x79\x47\x71\x62\x62':function(_0x165cda,_0x4905e3){return _0x165cda!==_0x4905e3;},'\x4b\x6a\x69\x6d\x73':_0x14c9('‫2e'),'\x54\x44\x56\x48\x46':_0x14c9('‮2f'),'\x57\x53\x48\x4a\x73':function(_0x5cece6,_0x32ca4d){return _0x5cece6===_0x32ca4d;},'\x48\x65\x52\x78\x41':_0x14c9('‫30'),'\x45\x4c\x72\x4e\x54':_0x14c9('‫31'),'\x5a\x44\x44\x55\x66':_0x14c9('‮32'),'\x75\x77\x79\x52\x49':_0x14c9('‫33'),'\x62\x57\x48\x41\x6c':function(_0x2b4b80){return _0x2b4b80();},'\x67\x4e\x71\x4a\x6e':function(_0x37eecf,_0x4a6f6e){return _0x37eecf===_0x4a6f6e;},'\x46\x42\x72\x4a\x62':_0x14c9('‫34'),'\x74\x42\x72\x47\x6f':function(_0x3345e3,_0x292932,_0x1ccf93){return _0x3345e3(_0x292932,_0x1ccf93);},'\x52\x69\x61\x45\x57':_0x14c9('‫35'),'\x57\x47\x74\x4b\x4b':_0x14c9('‮4'),'\x77\x71\x68\x61\x6f':_0x14c9('‫5'),'\x47\x51\x74\x46\x45':_0x14c9('‮6'),'\x42\x4c\x78\x41\x62':_0x14c9('‮7'),'\x4d\x51\x44\x66\x6d':function(_0x100ab6,_0xf684c7){return _0x100ab6(_0xf684c7);},'\x47\x4f\x4a\x6a\x65':_0x14c9('‫8')};return h5st=await _0x1ce6ca[_0x14c9('‫36')](geth5st,_0x1ce6ca[_0x14c9('‮37')],_0x458f18),opt={'\x75\x72\x6c':_0x14c9('‫38')+h5st,'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x1ce6ca[_0x14c9('‫39')],'\x41\x63\x63\x65\x70\x74':_0x1ce6ca[_0x14c9('‮3a')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x1ce6ca[_0x14c9('‮3b')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x1ce6ca[_0x14c9('‮3c')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x51a5d2+_0x14c9('‫3d')+_0x1ce6ca[_0x14c9('‮3e')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x1ce6ca[_0x14c9('‮3f')]}},new Promise(_0x3a254b=>{var _0x15bfd9={'\x4e\x7a\x6a\x74\x6d':function(_0x24ea44,_0x4ba87d){return _0x1ce6ca[_0x14c9('‫40')](_0x24ea44,_0x4ba87d);},'\x4a\x48\x57\x50\x47':function(_0x58c92e,_0x1d183a){return _0x1ce6ca[_0x14c9('‫41')](_0x58c92e,_0x1d183a);},'\x75\x73\x59\x79\x5a':function(_0x1f0eb5,_0x10a768){return _0x1ce6ca[_0x14c9('‮42')](_0x1f0eb5,_0x10a768);},'\x4c\x53\x53\x78\x78':_0x1ce6ca[_0x14c9('‫43')],'\x6c\x66\x62\x7a\x4a':function(_0x1fbae4,_0x237377){return _0x1ce6ca[_0x14c9('‮44')](_0x1fbae4,_0x237377);},'\x64\x73\x72\x71\x4f':_0x1ce6ca[_0x14c9('‫45')],'\x64\x41\x41\x67\x41':function(_0x3c4670,_0x24c70b){return _0x1ce6ca[_0x14c9('‮44')](_0x3c4670,_0x24c70b);},'\x48\x4a\x63\x4e\x4b':_0x1ce6ca[_0x14c9('‫46')],'\x6a\x63\x51\x4f\x71':function(_0x2454bf,_0x34e55b){return _0x1ce6ca[_0x14c9('‫47')](_0x2454bf,_0x34e55b);},'\x62\x46\x73\x4a\x4b':_0x1ce6ca[_0x14c9('‮48')],'\x6b\x44\x54\x4c\x62':_0x1ce6ca[_0x14c9('‮49')],'\x7a\x6d\x50\x54\x4e':function(_0x5f2a7c,_0x2aaf67){return _0x1ce6ca[_0x14c9('‫47')](_0x5f2a7c,_0x2aaf67);},'\x45\x66\x63\x7a\x53':_0x1ce6ca[_0x14c9('‮4a')],'\x77\x7a\x48\x78\x62':_0x1ce6ca[_0x14c9('‫4b')],'\x47\x42\x43\x79\x4d':function(_0x48d9fa){return _0x1ce6ca[_0x14c9('‫4c')](_0x48d9fa);}};if(_0x1ce6ca[_0x14c9('‫4d')](_0x1ce6ca[_0x14c9('‮4e')],_0x1ce6ca[_0x14c9('‮4e')])){$[_0x14c9('‫20')](opt,(_0x2bd187,_0x25e56a,_0x27e117)=>{var _0x9eb65a={'\x4c\x73\x49\x7a\x4d':function(_0x2595b3,_0x1b21fa){return _0x15bfd9[_0x14c9('‫4f')](_0x2595b3,_0x1b21fa);}};if(_0x15bfd9[_0x14c9('‮50')](_0x15bfd9[_0x14c9('‮51')],_0x15bfd9[_0x14c9('‮51')])){_0x9eb65a[_0x14c9('‫52')](_0x3a254b,_0x27e117);}else{try{if(_0x15bfd9[_0x14c9('‮53')](_0x15bfd9[_0x14c9('‮54')],_0x15bfd9[_0x14c9('‮54')])){$[_0x14c9('‫55')](e,_0x25e56a);}else{if(_0x2bd187){console[_0x14c9('‮24')](_0x2bd187);}else{if(_0x15bfd9[_0x14c9('‮56')](_0x15bfd9[_0x14c9('‫57')],_0x15bfd9[_0x14c9('‫57')])){console[_0x14c9('‮24')](_0x2bd187);}else{res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(_0x15bfd9[_0x14c9('‮58')](_0x15bfd9[_0x14c9('‮59')],_0x15bfd9[_0x14c9('‮5a')])){Host=HostArr[Math[_0x14c9('‫5b')](_0x15bfd9[_0x14c9('‮5c')](Math[_0x14c9('‫5d')](),HostArr[_0x14c9('‫5e')]))];}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}}}}}}catch(_0x35edb1){console[_0x14c9('‮24')](_0x35edb1);}finally{if(_0x15bfd9[_0x14c9('‫61')](_0x15bfd9[_0x14c9('‫62')],_0x15bfd9[_0x14c9('‮63')])){res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}else{_0x15bfd9[_0x14c9('‫64')](_0x3a254b);}}}});}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}});}function geth5st(_0x336ae8,_0x5dec8f){var _0x2e38b8={'\x74\x49\x71\x78\x4c':function(_0x29a313,_0xb36afc){return _0x29a313(_0xb36afc);},'\x69\x42\x42\x6f\x4a':_0x14c9('‫65'),'\x70\x77\x61\x62\x6d':_0x14c9('‫66'),'\x49\x61\x43\x6c\x59':_0x14c9('‮67'),'\x64\x6c\x67\x52\x66':_0x14c9('‫68'),'\x6f\x61\x49\x53\x56':function(_0x15e1c6,_0x661068){return _0x15e1c6*_0x661068;},'\x4e\x47\x74\x62\x46':_0x14c9('‮69')};return new Promise(async _0xcfa8c2=>{let _0x56832e={'\x61\x70\x70\x49\x64':_0x2e38b8[_0x14c9('‫6a')],'\x62\x6f\x64\x79':{'\x61\x70\x70\x69\x64':_0x2e38b8[_0x14c9('‮6b')],'\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64':_0x336ae8,'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x5dec8f),'\x63\x6c\x69\x65\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e':_0x2e38b8[_0x14c9('‮6c')],'\x63\x6c\x69\x65\x6e\x74':'\x48\x35'},'\x63\x61\x6c\x6c\x62\x61\x63\x6b\x41\x6c\x6c':!![]};let _0x36eeef='';let _0x322029=[_0x2e38b8[_0x14c9('‫6d')]];if(process[_0x14c9('‫1e')][_0x14c9('‫1f')]){_0x36eeef=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{_0x36eeef=_0x322029[Math[_0x14c9('‫5b')](_0x2e38b8[_0x14c9('‫6e')](Math[_0x14c9('‫5d')](),_0x322029[_0x14c9('‫5e')]))];}let _0x9a07e6={'\x75\x72\x6c':_0x14c9('‮6f'),'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x56832e),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x36eeef,'Content-Type':_0x2e38b8[_0x14c9('‮70')]},'\x74\x69\x6d\x65\x6f\x75\x74':_0x2e38b8[_0x14c9('‫6e')](0x1e,0x3e8)};$[_0x14c9('‫71')](_0x9a07e6,async(_0x4d8507,_0x51c179,_0x56832e)=>{try{if(_0x4d8507){_0x56832e=await geth5st[_0x14c9('‫72')](this,arguments);}else{}}catch(_0x3cef4f){$[_0x14c9('‫55')](_0x3cef4f,_0x51c179);}finally{_0x2e38b8[_0x14c9('‮73')](_0xcfa8c2,_0x56832e);}});});};_0xode='jsjiami.com.v6'; -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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_lzdz1_customized3.js b/jd_lzdz1_customized3.js deleted file mode 100644 index 5a9813ae8..000000000 --- a/jd_lzdz1_customized3.js +++ /dev/null @@ -1,536 +0,0 @@ -/* -春日风尚 入会焕新 -*/ -const $ = new Env("春日风尚 入会焕新"); -const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; -const notify = $.isNode() ? require("./sendNotify") : ""; -let cookiesArr = [], cookie = "", message = ""; -let ownCode = null; -let authorCodeList = []; -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]); - }); - if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; -} else { - let cookiesData = $.getdata("CookiesJD") || "[]"; - cookiesData = JSON.parse(cookiesData); - cookiesArr = cookiesData.map((item) => item.cookie); - cookiesArr.reverse(); - cookiesArr.push(...[$.getdata("CookieJD2"), $.getdata("CookieJD")]); - cookiesArr.reverse(); - cookiesArr = cookiesArr.filter((item) => !!item); -} -!(async () => { - $.getAuthorCodeListerr = false; - if (!cookiesArr[0]) { - $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/bean/signIndex.action", { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - return; - } - authorCodeList = await getAuthorCodeList('https://gitee.com/fatelight/Code/raw/master/lzdz3.json') - if ($.getAuthorCodeListerr === false) { - authorCodeList = [ - '086dd4c612be4636871b79f34faf5dc2', - ] - } - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i]; - originCookie = cookiesArr[i]; - newCookie = ""; - $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]); - $.index = i + 1; - $.isLogin = true; - $.nickName = ""; - await checkCookie(); - console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - // if ($.isNode()) { - // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - // } - continue; - } - $.bean = 0; - $.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1); - $.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - // authorCodeList = [ - // "3f8b04988ff24da59980aa1efb1a4d25", - // ]; - // $.authorCode = authorCodeList[random(0, authorCodeList.length)]; - $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] - $.authorNum = `${random(1000000, 9999999)}`; - $.randomCode = random(1000000, 9999999); - $.activityId = "dz1a8e2d544da69c0cfc0ef18187ba"; - $.activityShopId = "48034"; - $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/march/fashionUnion/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=null&shareuserid4minipg=${encodeURIComponent($.secretPin)}&shopid=${$.activityShopId}&sid=&un_area=`; - await member(); - await $.wait(1000); - if ($.bean > 0) { - message += `\n【京东账号${$.index}】${$.nickName || $.UserName} \n └ 获得 ${$.bean} 京豆。`; - } - } - } - if (message !== "") { - if ($.isNode()) { - await notify.sendNotify($.name, message, "", `\n`); - } else { - $.msg($.name, "有点儿收获", message); - } - } -})() - .catch((e) => { - $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); - }) - .finally(() => { - $.done(); - }); - -async function member() { - $.token = null; - $.secretPin = null; - $.openCardActivityId = null; - lz_cookie = {}; - await getFirstLZCK(); - await getToken(); - await task("dz/common/getSimpleActInfoVo", `activityId=${$.activityId}`, 1); - if ($.token) { - await getMyPing(); - if ($.secretPin) { - console.log("去助力 -> " + $.authorCode); - await taskaccessLog("common/accessLogWithAD", `venderId=${$.activityShopId}&code=99&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=null`, 1); - await task("wxActionCommon/getUserInfo", `pin=${encodeURIComponent($.secretPin)}`, 1); - if ($.index === 1) { - await task("/march/fashionUnion/activityContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&shareUuid=${encodeURIComponent($.authorCode)}`, 0, 1); - } else { - await task("/march/fashionUnion/activityContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&shareUuid=${encodeURIComponent($.authorCode)}`); - } - $.log("关注店铺"); - await task("march/fashionUnion/saveTask", `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}&taskType=23&taskValue=1&shareUuid=${encodeURIComponent($.authorCode)}`); - await task("march/fashionUnion/saveTask", `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}&taskType=21&taskValue=&shareUuid=${encodeURIComponent($.authorCode)}`); - await task("taskact/common/drawContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - await task("march/fashionUnion/initOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}`); - $.log("加入店铺会员"); - if ($.openCardList) { - for (const vo of $.openCardList) { - // console.log(vo) - $.log(`>>> 去加入${vo.name} ${vo.venderId}`); - if (vo.openStatus == 0) { - await getShopOpenCardInfo({ venderId: `${vo.venderId}`, channel: "401" }, vo.venderId); - await bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: $.openCardActivityId, channel: 401 }, vo.venderId); - await $.wait(1000); - } else { - $.log(`>>> 已经是会员`); - } - } - } else { - $.log("没有获取到对应的任务。\n"); - } - await task("march/fashionUnion/initOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}`); - console.log("去助力 -> " + $.authorCode); - await task("linkgame/assist/status", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - await task("linkgame/assist", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - - await task("march/fashionUnion/draw", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); - // await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - - // await task('linkgame/task/info', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - // console.log('任务 -> ') - // await $.wait(2000) - // await task('opencard/addCart', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await $.wait(2000) - // await task('linkgame/sendAllCoupon', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await getFirstLZCK() - // await getToken(); - // console.log('抽奖 -> ') - // await $.wait(2000) - // await task('linkgame/draw', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - // console.log('100 -> ') - // await getFirstLZCK() - // await getToken(); - // await $.wait(2000) - // await task('linkgame/draw/record', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - } - } -} - -function task(function_id, body, isCommon = 0, own = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.result) { - switch (function_id) { - case "dz/common/getSimpleActInfoVo": - $.jdActivityId = data.data.jdActivityId; - $.venderId = data.data.venderId; - $.activityType = data.data.activityType; - // console.log($.venderId) - break; - case "wxActionCommon/getUserInfo": - break; - case "/march/fashionUnion/activityContent": - if (!data.data.hasEnd) { - $.log(`开启【${data.data.activityName}】活动`); - $.log("-------------------"); - if ($.index === 1) { - ownCode = data.data.actorUuid; - console.log(ownCode); - } - $.actorUuid = data.data.actorUuid; - } else { - $.log("活动已经结束"); - } - break; - case "march/fashionUnion/initOpenCard": - $.openCardList = data.data.openInfo; - $.openCardStatus = data.data.allOpenCard; - // console.log(data) - break; - case "march/fashionUnion/saveTask": - console.log(data); - break; - case "march/fashionUnion/draw": - console.log(data); - break; - case "opencard/addCart": - if (data.data) { - console.log(data.data); - } - break; - case "linkgame/sendAllCoupon": - if (data.data) { - console.log(data.data); - } - - break; - case "interaction/write/writePersonInfo": - console.log(data); - break; - case "linkgame/draw": - console.log(data); - break; - case "linkgame/draw/record": - console.log(data.data); - break; - case "linkgame/assist/status": - $.log(JSON.stringify(data)); - break; - case "linkgame/assist": - $.log(JSON.stringify(data)); - break; - case "opencard/help/list": - $.log(JSON.stringify(data)); - break; - default: - // $.log(JSON.stringify(data)) - break; - } - } else { - // $.log(JSON.stringify(data)) - } - } else { - // $.log("京东没有返回数据") - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function taskaccessLog(function_id, body, isCommon = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - // console.log(resp); - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie};`; - for (let sk of resp["headers"]["set-cookie"]) { - lz_cookie[sk.split(";")[0].substr(0, sk.split(";")[0].indexOf("="))] = sk.split(";")[0].substr(sk.split(";")[0].indexOf("=") + 1); - } - for (const vo of Object.keys(lz_cookie)) { - cookie += vo + "=" + lz_cookie[vo] + ";"; - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - }); - }); -} -function getAuthorCodeList(url) { - return new Promise((resolve) => { - const options = { - url: `${url}?${new Date()}`, - timeout: 10000, - headers: { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88", - }, - }; - $.get(options, async (err, resp, data) => { - try { - if (err) { - // $.log(err) - $.getAuthorCodeListerr = false; - } else { - if (data) data = JSON.parse(data); - $.getAuthorCodeListerr = true; - } - } catch (e) { - $.logErr(e, resp); - data = null; - } finally { - resolve(data); - } - }); - }); -} - -function taskUrl(function_id, body, isCommon) { - return { - url: isCommon ? `https://lzdz1-isv.isvjcloud.com/${function_id}` : `https://lzdz1-isv.isvjcloud.com/dingzhi/${function_id}`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: body, - }; -} - -function getMyPing() { - let opt = { - url: `https://lzdz1-isv.isvjcloud.com/customer/getMyPing`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: `userId=${$.activityShopId}&token=${$.token}&fromType=APP&riskType=1`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (data) { - data = JSON.parse(data); - if (data.result) { - $.log(`你好:${data.data.nickname}`); - $.pin = data.data.nickname; - $.secretPin = data.data.secretPin; - cookie = `${cookie};AUTH_C_USER=${data.data.secretPin}`; - } else { - $.log(data.errorMessage); - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function getFirstLZCK() { - return new Promise((resolve) => { - $.get( - { - url: $.activityUrl, - headers: { - "user-agent": $.isNode() ? process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : require("./USER_AGENTS").USER_AGENT : $.getdata("JDUA") ? $.getdata("JDUA") : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", - }, - }, - (err, resp, data) => { - try { - if (err) { - console.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - } - ); - }); -} -function getToken() { - let opt = { - url: `https://api.m.jd.com/client.action?functionId=isvObfuscator`, - headers: { - Host: "api.m.jd.com", - "Content-Type": "application/x-www-form-urlencoded", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)", - "Accept-Language": "zh-Hans-CN;q=1", - "Accept-Encoding": "gzip, deflate, br", - }, - body: `body=%7B%22url%22%3A%20%22https%3A//lzkj-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=hjudwgohxzVu96krv&client=apple&clientVersion=9.4.0&st=1620476162000&sv=111&sign=f9d1b7e3b943b6a136d54fe4f892af05`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.code === "0") { - $.token = data.token; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function random(min, max) { - return Math.floor(Math.random() * (max - min)) + min; -} -function getUUID(format = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", UpperCase = 0) { - return format.replace(/[xy]/g, function (c) { - var r = (Math.random() * 16) | 0, - v = c == "x" ? r : (r & 0x3) | 0x8; - if (UpperCase) { - uuid = v.toString(36).toUpperCase(); - } else { - uuid = v.toString(36); - } - return uuid; - }); -} -function checkCookie() { - const options = { - url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", - headers: { - Host: "me-api.jd.com", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", - "Accept-Language": "zh-cn", - Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br", - }, - }; - return new Promise((resolve) => { - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.retcode === "1001") { - $.isLogin = false; //cookie过期 - return; - } - if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (e) { - $.logErr(e); - } finally { - resolve(); - } - }); - }); -} -// prettier-ignore -var _0xode='jsjiami.com.v6',_0xode_=['‮_0xode'],_0x5bce=[_0xode,'\x53\x45\x70\x6a\x54\x6b\x73\x3d','\x61\x6d\x4e\x52\x54\x33\x45\x3d','\x59\x6b\x5a\x7a\x53\x6b\x73\x3d','\x61\x30\x52\x55\x54\x47\x49\x3d','\x5a\x6d\x78\x76\x62\x33\x49\x3d','\x54\x6e\x70\x71\x64\x47\x30\x3d','\x63\x6d\x46\x75\x5a\x47\x39\x74','\x62\x47\x56\x75\x5a\x33\x52\x6f','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x4a\x74\x5a\x58\x4e\x7a\x59\x57\x64\x6c','\x62\x57\x56\x7a\x63\x32\x46\x6e\x5a\x51\x3d\x3d','\x65\x6d\x31\x51\x56\x45\x34\x3d','\x52\x57\x5a\x6a\x65\x6c\x4d\x3d','\x64\x33\x70\x49\x65\x47\x49\x3d','\x52\x30\x4a\x44\x65\x55\x30\x3d','\x4f\x47\x46\x6b\x5a\x6d\x49\x3d','\x61\x6d\x52\x66\x63\x32\x68\x76\x63\x46\x39\x74\x5a\x57\x31\x69\x5a\x58\x49\x3d','\x4f\x53\x34\x79\x4c\x6a\x41\x3d','\x61\x6d\x52\x7a\x61\x57\x64\x75\x4c\x6d\x4e\x6d','\x59\x58\x42\x77\x62\x47\x6c\x6a\x59\x58\x52\x70\x62\x32\x34\x76\x61\x6e\x4e\x76\x62\x67\x3d\x3d','\x61\x55\x4a\x43\x62\x30\x6f\x3d','\x63\x48\x64\x68\x59\x6d\x30\x3d','\x53\x57\x46\x44\x62\x46\x6b\x3d','\x5a\x47\x78\x6e\x55\x6d\x59\x3d','\x62\x32\x46\x4a\x55\x31\x59\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x6a\x5a\x47\x34\x75\x62\x6e\x6f\x75\x62\x48\x55\x76\x5a\x32\x56\x30\x61\x44\x56\x7a\x64\x41\x3d\x3d','\x54\x6b\x64\x30\x59\x6b\x59\x3d','\x63\x47\x39\x7a\x64\x41\x3d\x3d','\x59\x58\x42\x77\x62\x48\x6b\x3d','\x64\x45\x6c\x78\x65\x45\x77\x3d','\x65\x6b\x46\x35\x65\x58\x55\x3d','\x5a\x56\x70\x42\x64\x55\x73\x3d','\x62\x45\x5a\x45\x62\x46\x59\x3d','\x5a\x30\x74\x56\x65\x6e\x49\x3d','\x59\x58\x42\x70\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74','\x4b\x69\x38\x71','\x61\x32\x56\x6c\x63\x43\x31\x68\x62\x47\x6c\x32\x5a\x51\x3d\x3d','\x65\x6d\x67\x74\x59\x32\x34\x3d','\x5a\x33\x70\x70\x63\x43\x77\x67\x5a\x47\x56\x6d\x62\x47\x46\x30\x5a\x53\x77\x67\x59\x6e\x49\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x39\x68\x63\x48\x42\x70\x5a\x44\x31\x71\x5a\x46\x39\x7a\x61\x47\x39\x77\x58\x32\x31\x6c\x62\x57\x4a\x6c\x63\x69\x5a\x6d\x64\x57\x35\x6a\x64\x47\x6c\x76\x62\x6b\x6c\x6b\x50\x57\x64\x6c\x64\x46\x4e\x6f\x62\x33\x42\x50\x63\x47\x56\x75\x51\x32\x46\x79\x5a\x45\x6c\x75\x5a\x6d\x38\x6d\x59\x6d\x39\x6b\x65\x54\x30\x3d','\x52\x6c\x68\x70\x52\x48\x6b\x3d','\x63\x33\x52\x79\x61\x57\x35\x6e\x61\x57\x5a\x35','\x4a\x6d\x4e\x73\x61\x57\x56\x75\x64\x44\x31\x49\x4e\x53\x5a\x6a\x62\x47\x6c\x6c\x62\x6e\x52\x57\x5a\x58\x4a\x7a\x61\x57\x39\x75\x50\x54\x6b\x75\x4d\x69\x34\x77\x4a\x6e\x56\x31\x61\x57\x51\x39\x4f\x44\x67\x34\x4f\x44\x67\x3d','\x62\x57\x74\x4f\x59\x57\x4d\x3d','\x52\x32\x4e\x78\x61\x56\x63\x3d','\x54\x47\x70\x55\x63\x33\x41\x3d','\x61\x6d\x52\x68\x63\x48\x41\x37\x61\x56\x42\x6f\x62\x32\x35\x6c\x4f\x7a\x6b\x75\x4e\x53\x34\x30\x4f\x7a\x45\x7a\x4c\x6a\x59\x37','\x56\x56\x56\x4a\x52\x41\x3d\x3d','\x4f\x32\x35\x6c\x64\x48\x64\x76\x63\x6d\x73\x76\x64\x32\x6c\x6d\x61\x54\x74\x42\x52\x45\x6c\x45\x4c\x77\x3d\x3d','\x51\x55\x52\x4a\x52\x41\x3d\x3d','\x4f\x32\x31\x76\x5a\x47\x56\x73\x4c\x32\x6c\x51\x61\x47\x39\x75\x5a\x54\x45\x77\x4c\x44\x4d\x37\x59\x57\x52\x6b\x63\x6d\x56\x7a\x63\x32\x6c\x6b\x4c\x7a\x41\x37\x59\x58\x42\x77\x51\x6e\x56\x70\x62\x47\x51\x76\x4d\x54\x59\x33\x4e\x6a\x59\x34\x4f\x32\x70\x6b\x55\x33\x56\x77\x63\x47\x39\x79\x64\x45\x52\x68\x63\x6d\x74\x4e\x62\x32\x52\x6c\x4c\x7a\x41\x37\x54\x57\x39\x36\x61\x57\x78\x73\x59\x53\x38\x31\x4c\x6a\x41\x67\x4b\x47\x6c\x51\x61\x47\x39\x75\x5a\x54\x73\x67\x51\x31\x42\x56\x49\x47\x6c\x51\x61\x47\x39\x75\x5a\x53\x42\x50\x55\x79\x41\x78\x4d\x31\x38\x32\x49\x47\x78\x70\x61\x32\x55\x67\x54\x57\x46\x6a\x49\x45\x39\x54\x49\x46\x67\x70\x49\x45\x46\x77\x63\x47\x78\x6c\x56\x32\x56\x69\x53\x32\x6c\x30\x4c\x7a\x59\x77\x4e\x53\x34\x78\x4c\x6a\x45\x31\x49\x43\x68\x4c\x53\x46\x52\x4e\x54\x43\x77\x67\x62\x47\x6c\x72\x5a\x53\x42\x48\x5a\x57\x4e\x72\x62\x79\x6b\x67\x54\x57\x39\x69\x61\x57\x78\x6c\x4c\x7a\x45\x31\x52\x54\x45\x30\x4f\x44\x74\x7a\x64\x58\x42\x77\x62\x33\x4a\x30\x53\x6b\x52\x54\x53\x46\x64\x4c\x4c\x7a\x45\x3d','\x64\x33\x70\x79\x61\x31\x41\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x7a\x61\x47\x39\x77\x62\x57\x56\x74\x59\x6d\x56\x79\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74\x4c\x33\x4e\x6f\x62\x33\x42\x6a\x59\x58\x4a\x6b\x4c\x7a\x39\x32\x5a\x57\x35\x6b\x5a\x58\x4a\x4a\x5a\x44\x30\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x67\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x56\x6e\x46\x73\x56\x6b\x6f\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x56\x63\x6d\x77\x3d','\x56\x55\x39\x73\x62\x45\x4d\x3d','\x56\x48\x70\x6f\x51\x6e\x4d\x3d','\x59\x56\x64\x5a\x53\x6c\x67\x3d','\x65\x48\x6c\x4e\x64\x57\x45\x3d','\x5a\x57\x35\x32','\x55\x30\x6c\x48\x54\x6c\x39\x56\x55\x6b\x77\x3d','\x5a\x32\x56\x30','\x55\x6c\x70\x43\x62\x45\x73\x3d','\x51\x30\x52\x74\x5a\x55\x63\x3d','\x54\x55\x78\x43\x63\x45\x6b\x3d','\x62\x47\x39\x6e','\x63\x47\x46\x79\x63\x32\x55\x3d','\x63\x33\x56\x6a\x59\x32\x56\x7a\x63\x77\x3d\x3d','\x63\x6d\x56\x7a\x64\x57\x78\x30','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x55\x6e\x56\x73\x5a\x55\x78\x70\x63\x33\x51\x3d','\x62\x33\x42\x6c\x62\x6b\x4e\x68\x63\x6d\x52\x42\x59\x33\x52\x70\x64\x6d\x6c\x30\x65\x55\x6c\x6b','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x53\x57\x35\x6d\x62\x77\x3d\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x4a\x5a\x41\x3d\x3d','\x52\x47\x31\x35\x61\x48\x55\x3d','\x59\x56\x70\x51\x59\x57\x34\x3d','\x59\x58\x42\x33\x52\x6d\x30\x3d','\x65\x46\x56\x42\x64\x31\x63\x3d','\x54\x30\x5a\x6d\x52\x58\x55\x3d','\x52\x31\x68\x4c\x54\x31\x45\x3d','\x61\x6c\x5a\x53\x64\x6c\x6f\x3d','\x64\x32\x35\x4d\x52\x30\x30\x3d','\x62\x33\x42\x5a\x51\x32\x59\x3d','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x49\x3d','\x64\x45\x4a\x79\x52\x32\x38\x3d','\x55\x6d\x6c\x68\x52\x56\x63\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x38\x3d','\x56\x30\x64\x30\x53\x30\x73\x3d','\x64\x33\x46\x6f\x59\x57\x38\x3d','\x52\x31\x46\x30\x52\x6b\x55\x3d','\x51\x6b\x78\x34\x51\x57\x49\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x51\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x54\x56\x46\x45\x5a\x6d\x30\x3d','\x52\x30\x39\x4b\x61\x6d\x55\x3d','\x61\x31\x6c\x47\x53\x6c\x45\x3d','\x61\x57\x56\x6b\x51\x55\x73\x3d','\x61\x6d\x31\x72\x54\x45\x49\x3d','\x54\x32\x46\x33\x59\x32\x63\x3d','\x65\x55\x64\x78\x59\x6d\x49\x3d','\x53\x32\x70\x70\x62\x58\x4d\x3d','\x56\x45\x52\x57\x53\x45\x59\x3d','\x56\x31\x4e\x49\x53\x6e\x4d\x3d','\x53\x47\x56\x53\x65\x45\x45\x3d','\x52\x55\x78\x79\x54\x6c\x51\x3d','\x57\x6b\x52\x45\x56\x57\x59\x3d','\x64\x58\x64\x35\x55\x6b\x6b\x3d','\x59\x6c\x64\x49\x51\x57\x77\x3d','\x5a\x30\x35\x78\x53\x6d\x34\x3d','\x52\x6b\x4a\x79\x53\x6d\x49\x3d','\x53\x6b\x68\x58\x55\x45\x63\x3d','\x64\x58\x4e\x5a\x65\x56\x6f\x3d','\x54\x46\x4e\x54\x65\x48\x67\x3d','\x54\x48\x4e\x4a\x65\x6b\x30\x3d','\x62\x47\x5a\x69\x65\x6b\x6f\x3d','\x5a\x48\x4e\x79\x63\x55\x38\x3d','\x62\x47\x39\x6e\x52\x58\x4a\x79','\x5a\x45\x46\x42\x5a\x30\x45\x3d','\x51\x42\x59\x67\x6a\x73\x6a\x53\x69\x61\x6d\x69\x74\x4a\x52\x4e\x2e\x63\x6f\x6d\x66\x54\x2e\x76\x74\x36\x4e\x67\x67\x3d\x3d'];if(function(_0x15a272,_0x516b6a,_0x4dd628){function _0x4485e5(_0x3c702f,_0x2622f0,_0x1e7f7d,_0x34d687,_0x19a000,_0x186734){_0x2622f0=_0x2622f0>>0x8,_0x19a000='po';var _0x34e09c='shift',_0x2629da='push',_0x186734='‮';if(_0x2622f0<_0x3c702f){while(--_0x3c702f){_0x34d687=_0x15a272[_0x34e09c]();if(_0x2622f0===_0x3c702f&&_0x186734==='‮'&&_0x186734['length']===0x1){_0x2622f0=_0x34d687,_0x1e7f7d=_0x15a272[_0x19a000+'p']();}else if(_0x2622f0&&_0x1e7f7d['replace'](/[QBYgStJRNfTtNgg=]/g,'')===_0x2622f0){_0x15a272[_0x2629da](_0x34d687);}}_0x15a272[_0x2629da](_0x15a272[_0x34e09c]());}return 0xd874a;};return _0x4485e5(++_0x516b6a,_0x4dd628)>>_0x516b6a^_0x4dd628;}(_0x5bce,0x91,0x9100),_0x5bce){_0xode_=_0x5bce['length']^0x91;};function _0x14c9(_0x4701f8,_0x11a1c1){_0x4701f8=~~'0x'['concat'](_0x4701f8['slice'](0x1));var _0x1331d9=_0x5bce[_0x4701f8];if(_0x14c9['WGWLGh']===undefined&&'‮'['length']===0x1){(function(){var _0x5a4c3d=function(){var _0x2c6ed1;try{_0x2c6ed1=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x324599){_0x2c6ed1=window;}return _0x2c6ed1;};var _0x1631b1=_0x5a4c3d();var _0x593b41='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x1631b1['atob']||(_0x1631b1['atob']=function(_0x18444a){var _0x3a683c=String(_0x18444a)['replace'](/=+$/,'');for(var _0xc7b9d7=0x0,_0x1bc799,_0x7d79af,_0x5a84b3=0x0,_0x4e49ab='';_0x7d79af=_0x3a683c['charAt'](_0x5a84b3++);~_0x7d79af&&(_0x1bc799=_0xc7b9d7%0x4?_0x1bc799*0x40+_0x7d79af:_0x7d79af,_0xc7b9d7++%0x4)?_0x4e49ab+=String['fromCharCode'](0xff&_0x1bc799>>(-0x2*_0xc7b9d7&0x6)):0x0){_0x7d79af=_0x593b41['indexOf'](_0x7d79af);}return _0x4e49ab;});}());_0x14c9['sUNWyz']=function(_0x5c4f2c){var _0x82ac57=atob(_0x5c4f2c);var _0x545da4=[];for(var _0x2ea7d6=0x0,_0x3edb2d=_0x82ac57['length'];_0x2ea7d6<_0x3edb2d;_0x2ea7d6++){_0x545da4+='%'+('00'+_0x82ac57['charCodeAt'](_0x2ea7d6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x545da4);};_0x14c9['dThVyS']={};_0x14c9['WGWLGh']=!![];}var _0x2f65e7=_0x14c9['dThVyS'][_0x4701f8];if(_0x2f65e7===undefined){_0x1331d9=_0x14c9['sUNWyz'](_0x1331d9);_0x14c9['dThVyS'][_0x4701f8]=_0x1331d9;}else{_0x1331d9=_0x2f65e7;}return _0x1331d9;};function getShopOpenCardInfo(_0x28beec,_0x1334ea){var _0x6cf197={'\x52\x5a\x42\x6c\x4b':function(_0x1c184c,_0x537af3){return _0x1c184c!==_0x537af3;},'\x43\x44\x6d\x65\x47':_0x14c9('‫0'),'\x4d\x4c\x42\x70\x49':_0x14c9('‫1'),'\x44\x6d\x79\x68\x75':function(_0x277d5c){return _0x277d5c();},'\x54\x7a\x68\x42\x73':function(_0xde51b5,_0x1748b4){return _0xde51b5===_0x1748b4;},'\x61\x57\x59\x4a\x58':_0x14c9('‮2'),'\x78\x79\x4d\x75\x61':_0x14c9('‫3'),'\x46\x58\x69\x44\x79':function(_0x10e2ee,_0x35354b){return _0x10e2ee(_0x35354b);},'\x6d\x6b\x4e\x61\x63':_0x14c9('‮4'),'\x47\x63\x71\x69\x57':_0x14c9('‫5'),'\x4c\x6a\x54\x73\x70':_0x14c9('‮6'),'\x77\x7a\x72\x6b\x50':_0x14c9('‮7'),'\x56\x71\x6c\x56\x4a':function(_0x9710d4,_0x43a323){return _0x9710d4(_0x43a323);},'\x55\x4f\x6c\x6c\x43':_0x14c9('‫8')};let _0x14d980={'\x75\x72\x6c':_0x14c9('‮9')+_0x6cf197[_0x14c9('‮a')](encodeURIComponent,JSON[_0x14c9('‫b')](_0x28beec))+_0x14c9('‮c'),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x6cf197[_0x14c9('‫d')],'\x41\x63\x63\x65\x70\x74':_0x6cf197[_0x14c9('‮e')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x6cf197[_0x14c9('‫f')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x6cf197[_0x14c9('‮15')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x1334ea+_0x14c9('‮17')+_0x6cf197[_0x14c9('‮18')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x6cf197[_0x14c9('‫1a')]}};return new Promise(_0x15ba0a=>{if(_0x6cf197[_0x14c9('‫1b')](_0x6cf197[_0x14c9('‫1c')],_0x6cf197[_0x14c9('‫1d')])){Host=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{$[_0x14c9('‫20')](_0x14d980,(_0x45fcbf,_0x5cda91,_0x4f16e6)=>{if(_0x6cf197[_0x14c9('‮21')](_0x6cf197[_0x14c9('‫22')],_0x6cf197[_0x14c9('‫23')])){try{if(_0x45fcbf){console[_0x14c9('‮24')](_0x45fcbf);}else{res=JSON[_0x14c9('‮25')](_0x4f16e6);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}}catch(_0x1069d5){console[_0x14c9('‮24')](_0x1069d5);}finally{_0x6cf197[_0x14c9('‮2c')](_0x15ba0a);}}else{$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}});}});}async function bindWithVender(_0x458f18,_0x51a5d2){var _0x1ce6ca={'\x6b\x59\x46\x4a\x51':function(_0x48eab1,_0x247bf6){return _0x48eab1*_0x247bf6;},'\x69\x65\x64\x41\x4b':function(_0x380bcb,_0x201d01){return _0x380bcb(_0x201d01);},'\x6a\x6d\x6b\x4c\x42':function(_0x281c59,_0x7919b2){return _0x281c59!==_0x7919b2;},'\x4f\x61\x77\x63\x67':_0x14c9('‫2d'),'\x79\x47\x71\x62\x62':function(_0x165cda,_0x4905e3){return _0x165cda!==_0x4905e3;},'\x4b\x6a\x69\x6d\x73':_0x14c9('‫2e'),'\x54\x44\x56\x48\x46':_0x14c9('‮2f'),'\x57\x53\x48\x4a\x73':function(_0x5cece6,_0x32ca4d){return _0x5cece6===_0x32ca4d;},'\x48\x65\x52\x78\x41':_0x14c9('‫30'),'\x45\x4c\x72\x4e\x54':_0x14c9('‫31'),'\x5a\x44\x44\x55\x66':_0x14c9('‮32'),'\x75\x77\x79\x52\x49':_0x14c9('‫33'),'\x62\x57\x48\x41\x6c':function(_0x2b4b80){return _0x2b4b80();},'\x67\x4e\x71\x4a\x6e':function(_0x37eecf,_0x4a6f6e){return _0x37eecf===_0x4a6f6e;},'\x46\x42\x72\x4a\x62':_0x14c9('‫34'),'\x74\x42\x72\x47\x6f':function(_0x3345e3,_0x292932,_0x1ccf93){return _0x3345e3(_0x292932,_0x1ccf93);},'\x52\x69\x61\x45\x57':_0x14c9('‫35'),'\x57\x47\x74\x4b\x4b':_0x14c9('‮4'),'\x77\x71\x68\x61\x6f':_0x14c9('‫5'),'\x47\x51\x74\x46\x45':_0x14c9('‮6'),'\x42\x4c\x78\x41\x62':_0x14c9('‮7'),'\x4d\x51\x44\x66\x6d':function(_0x100ab6,_0xf684c7){return _0x100ab6(_0xf684c7);},'\x47\x4f\x4a\x6a\x65':_0x14c9('‫8')};return h5st=await _0x1ce6ca[_0x14c9('‫36')](geth5st,_0x1ce6ca[_0x14c9('‮37')],_0x458f18),opt={'\x75\x72\x6c':_0x14c9('‫38')+h5st,'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x1ce6ca[_0x14c9('‫39')],'\x41\x63\x63\x65\x70\x74':_0x1ce6ca[_0x14c9('‮3a')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x1ce6ca[_0x14c9('‮3b')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x1ce6ca[_0x14c9('‮3c')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x51a5d2+_0x14c9('‫3d')+_0x1ce6ca[_0x14c9('‮3e')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x1ce6ca[_0x14c9('‮3f')]}},new Promise(_0x3a254b=>{var _0x15bfd9={'\x4e\x7a\x6a\x74\x6d':function(_0x24ea44,_0x4ba87d){return _0x1ce6ca[_0x14c9('‫40')](_0x24ea44,_0x4ba87d);},'\x4a\x48\x57\x50\x47':function(_0x58c92e,_0x1d183a){return _0x1ce6ca[_0x14c9('‫41')](_0x58c92e,_0x1d183a);},'\x75\x73\x59\x79\x5a':function(_0x1f0eb5,_0x10a768){return _0x1ce6ca[_0x14c9('‮42')](_0x1f0eb5,_0x10a768);},'\x4c\x53\x53\x78\x78':_0x1ce6ca[_0x14c9('‫43')],'\x6c\x66\x62\x7a\x4a':function(_0x1fbae4,_0x237377){return _0x1ce6ca[_0x14c9('‮44')](_0x1fbae4,_0x237377);},'\x64\x73\x72\x71\x4f':_0x1ce6ca[_0x14c9('‫45')],'\x64\x41\x41\x67\x41':function(_0x3c4670,_0x24c70b){return _0x1ce6ca[_0x14c9('‮44')](_0x3c4670,_0x24c70b);},'\x48\x4a\x63\x4e\x4b':_0x1ce6ca[_0x14c9('‫46')],'\x6a\x63\x51\x4f\x71':function(_0x2454bf,_0x34e55b){return _0x1ce6ca[_0x14c9('‫47')](_0x2454bf,_0x34e55b);},'\x62\x46\x73\x4a\x4b':_0x1ce6ca[_0x14c9('‮48')],'\x6b\x44\x54\x4c\x62':_0x1ce6ca[_0x14c9('‮49')],'\x7a\x6d\x50\x54\x4e':function(_0x5f2a7c,_0x2aaf67){return _0x1ce6ca[_0x14c9('‫47')](_0x5f2a7c,_0x2aaf67);},'\x45\x66\x63\x7a\x53':_0x1ce6ca[_0x14c9('‮4a')],'\x77\x7a\x48\x78\x62':_0x1ce6ca[_0x14c9('‫4b')],'\x47\x42\x43\x79\x4d':function(_0x48d9fa){return _0x1ce6ca[_0x14c9('‫4c')](_0x48d9fa);}};if(_0x1ce6ca[_0x14c9('‫4d')](_0x1ce6ca[_0x14c9('‮4e')],_0x1ce6ca[_0x14c9('‮4e')])){$[_0x14c9('‫20')](opt,(_0x2bd187,_0x25e56a,_0x27e117)=>{var _0x9eb65a={'\x4c\x73\x49\x7a\x4d':function(_0x2595b3,_0x1b21fa){return _0x15bfd9[_0x14c9('‫4f')](_0x2595b3,_0x1b21fa);}};if(_0x15bfd9[_0x14c9('‮50')](_0x15bfd9[_0x14c9('‮51')],_0x15bfd9[_0x14c9('‮51')])){_0x9eb65a[_0x14c9('‫52')](_0x3a254b,_0x27e117);}else{try{if(_0x15bfd9[_0x14c9('‮53')](_0x15bfd9[_0x14c9('‮54')],_0x15bfd9[_0x14c9('‮54')])){$[_0x14c9('‫55')](e,_0x25e56a);}else{if(_0x2bd187){console[_0x14c9('‮24')](_0x2bd187);}else{if(_0x15bfd9[_0x14c9('‮56')](_0x15bfd9[_0x14c9('‫57')],_0x15bfd9[_0x14c9('‫57')])){console[_0x14c9('‮24')](_0x2bd187);}else{res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(_0x15bfd9[_0x14c9('‮58')](_0x15bfd9[_0x14c9('‮59')],_0x15bfd9[_0x14c9('‮5a')])){Host=HostArr[Math[_0x14c9('‫5b')](_0x15bfd9[_0x14c9('‮5c')](Math[_0x14c9('‫5d')](),HostArr[_0x14c9('‫5e')]))];}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}}}}}}catch(_0x35edb1){console[_0x14c9('‮24')](_0x35edb1);}finally{if(_0x15bfd9[_0x14c9('‫61')](_0x15bfd9[_0x14c9('‫62')],_0x15bfd9[_0x14c9('‮63')])){res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}else{_0x15bfd9[_0x14c9('‫64')](_0x3a254b);}}}});}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}});}function geth5st(_0x336ae8,_0x5dec8f){var _0x2e38b8={'\x74\x49\x71\x78\x4c':function(_0x29a313,_0xb36afc){return _0x29a313(_0xb36afc);},'\x69\x42\x42\x6f\x4a':_0x14c9('‫65'),'\x70\x77\x61\x62\x6d':_0x14c9('‫66'),'\x49\x61\x43\x6c\x59':_0x14c9('‮67'),'\x64\x6c\x67\x52\x66':_0x14c9('‫68'),'\x6f\x61\x49\x53\x56':function(_0x15e1c6,_0x661068){return _0x15e1c6*_0x661068;},'\x4e\x47\x74\x62\x46':_0x14c9('‮69')};return new Promise(async _0xcfa8c2=>{let _0x56832e={'\x61\x70\x70\x49\x64':_0x2e38b8[_0x14c9('‫6a')],'\x62\x6f\x64\x79':{'\x61\x70\x70\x69\x64':_0x2e38b8[_0x14c9('‮6b')],'\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64':_0x336ae8,'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x5dec8f),'\x63\x6c\x69\x65\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e':_0x2e38b8[_0x14c9('‮6c')],'\x63\x6c\x69\x65\x6e\x74':'\x48\x35'},'\x63\x61\x6c\x6c\x62\x61\x63\x6b\x41\x6c\x6c':!![]};let _0x36eeef='';let _0x322029=[_0x2e38b8[_0x14c9('‫6d')]];if(process[_0x14c9('‫1e')][_0x14c9('‫1f')]){_0x36eeef=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{_0x36eeef=_0x322029[Math[_0x14c9('‫5b')](_0x2e38b8[_0x14c9('‫6e')](Math[_0x14c9('‫5d')](),_0x322029[_0x14c9('‫5e')]))];}let _0x9a07e6={'\x75\x72\x6c':_0x14c9('‮6f'),'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x56832e),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x36eeef,'Content-Type':_0x2e38b8[_0x14c9('‮70')]},'\x74\x69\x6d\x65\x6f\x75\x74':_0x2e38b8[_0x14c9('‫6e')](0x1e,0x3e8)};$[_0x14c9('‫71')](_0x9a07e6,async(_0x4d8507,_0x51c179,_0x56832e)=>{try{if(_0x4d8507){_0x56832e=await geth5st[_0x14c9('‫72')](this,arguments);}else{}}catch(_0x3cef4f){$[_0x14c9('‫55')](_0x3cef4f,_0x51c179);}finally{_0x2e38b8[_0x14c9('‮73')](_0xcfa8c2,_0x56832e);}});});};_0xode='jsjiami.com.v6'; -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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_lzdz1_customized5.js b/jd_lzdz1_customized5.js deleted file mode 100644 index c03621a7a..000000000 --- a/jd_lzdz1_customized5.js +++ /dev/null @@ -1,527 +0,0 @@ -/* -大牌好礼 迎春季 - -*/ -const $ = new Env("大牌好礼 迎春季"); -const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; -const notify = $.isNode() ? require('./sendNotify') : ''; -let cookiesArr = [], cookie = '', message = ''; -let ownCode = null; -let authorCodeList = [] -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]) - }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; -} else { - let cookiesData = $.getdata('CookiesJD') || "[]"; - cookiesData = JSON.parse(cookiesData); - cookiesArr = cookiesData.map(item => item.cookie); - cookiesArr.reverse(); - cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); - cookiesArr.reverse(); - cookiesArr = cookiesArr.filter(item => !!item); -} -!(async () => { - $.getAuthorCodeListerr = false - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - return; - } - // authorCodeList = await getAuthorCodeList('https://gitee.com/fatelight/Code/raw/master/lzdz1.json') - // if($.getAuthorCodeListerr === false){ - // authorCodeList = [ - // // '980f55cfc5494ff895ddf9a3b2d3ff3b', - // ] - // } - // console.log(authorCodeList) - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i] - originCookie = cookiesArr[i] - newCookie = '' - $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) - $.index = i + 1; - $.isLogin = true; - $.nickName = ''; - await checkCookie(); - console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - // if ($.isNode()) { - // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - // } - continue - } - $.bean = 0; - $.ADID = getUUID('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 1); - $.UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); - authorCodeList = [ - '3000bd151f014f07802aa623fb1dddf6', - 'a9c4b3bffa6044b78646684b98d107b2', - '2dd9a4ec3c404222a27f7dc24bbf9fda', - ] - // $.authorCode = authorCodeList[random(0, authorCodeList.length)] - $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] - $.authorNum = `${random(1000000, 9999999)}` - $.randomCode = random(1000000, 9999999) - $.activityId = 'dzlhkk068d4d0ab8a1256853002f50' - $.activityShopId = '1000004123' - $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=GG&shareuserid4minipg=${encodeURIComponent($.secretPin)}&shopid=undefined&sid=&un_area=` - await member(); - // await $.wait(5000) - if ($.bean > 0) { - message += `\n【京东账号${$.index}】${$.nickName || $.UserName} \n └ 获得 ${$.bean} 京豆。` - } - } - } - if (message !== '') { - if ($.isNode()) { - await notify.sendNotify($.name, message, '', `\n`); - } else { - $.msg($.name, '有点儿收获', message); - } - } -})() - .catch((e) => { - $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') - }) - .finally(() => { - $.done(); - }) - - -async function member() { - $.token = null; - $.secretPin = null; - $.openCardActivityId = null - lz_cookie = {}; - await getFirstLZCK() - await getToken(); - await task('dz/common/getSimpleActInfoVo', `activityId=${$.activityId}`, 1) - if ($.token) { - await getMyPing(); - if ($.secretPin) { - console.log("去助力 -> " + $.authorCode); - await taskaccessLog("common/accessLogWithAD", `venderId=${$.activityShopId}&code=99&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=GG`, 1); - await task('wxActionCommon/getUserInfo', `pin=${encodeURIComponent($.secretPin)}`, 1) - if ($.index === 1) { - await task('linkgame/activity/content', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}&adsource=GG`, 0, 1) - } else { - await task('linkgame/activity/content', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}&adsource=GG`) - } - $.log("关注店铺") - await task('opencard/follow/shop', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`) - await task('taskact/common/drawContent', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`) - await task('linkgame/checkOpenCard', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - $.log("加入店铺会员") - if ($.openCardList) { - for (const vo of $.openCardList) { - $.log(`>>> 去加入${vo.name} ${vo.venderId}`) - if (vo.status === 0) { - await getShopOpenCardInfo({ "venderId": `${vo.venderId}`, "channel": "401" }, vo.venderId) - await bindWithVender({ "venderId": `${vo.venderId}`, "bindByVerifyCodeFlag": 1, "registerExtend": {}, "writeChildFlag": 0, "activityId": $.openCardActivityId, "channel": 401 }, vo.venderId) - await $.wait(1000) - } else { - $.log(`>>> 已经是会员`) - } - } - } else { - $.log("没有获取到对应的任务。\n") - } - await task('linkgame/checkOpenCard', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - if ($.openCardStatus) { - console.log('去助力 -> ' + $.authorCode) - if ($.openCardStatus.allOpenCard) { - await task('linkgame/assist/status', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`) - await task('linkgame/assist', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`) - - } - } - // await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - - // await task('linkgame/task/info', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - // console.log('任务 -> ') - // await $.wait(2000) - // await task('opencard/addCart', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await $.wait(2000) - // await task('linkgame/sendAllCoupon', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // console.log('抽奖 -> ') - // await $.wait(2000) - // await task('opencard/draw', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - } - } -} - -function task(function_id, body, isCommon = 0, own = 0) { - return new Promise(resolve => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err) - } else { - - if (data) { - data = JSON.parse(data); - if (data.result) { - switch (function_id) { - case 'dz/common/getSimpleActInfoVo': - // console.log(data) - $.jdActivityId = data.data.jdActivityId; - $.venderId = data.data.venderId; - $.activityType = data.data.activityType; - break; - case 'wxActionCommon/getUserInfo': - break; - case 'linkgame/activity/content': - // console.log(data) - if (!data.data.hasEnd) { - $.log(`开启【${data.data.activity['name']}】活动`) - $.log("-------------------") - if ($.index === 1) { - ownCode = data.data.actor['actorUuid'] - console.log(ownCode) - } - $.actorUuid = data.data.actor['actorUuid']; - } else { - $.log("活动已经结束"); - } - break; - case 'linkgame/checkOpenCard': - $.openCardList = data.data.openCardList; - $.openCardStatus = data.data; - // console.log(data) - break; - case 'opencard/follow/shop': - console.log(data) - break; - case 'linkgame/sign': - console.log(data) - break; - case 'opencard/addCart': - if (data.data) { - console.log(data.data) - } - break; - case 'linkgame/sendAllCoupon': - if (data.data) { - console.log(data.data) - } - - break; - case 'interaction/write/writePersonInfo': - console.log(data) - break; - case 'opencard/draw': - console.log(data) - break; - case 'linkgame/assist/status': - $.log(JSON.stringify(data)) - break; - case 'linkgame/assist': - $.log(JSON.stringify(data)) - break; - case 'linkgame/help/list': - $.log(JSON.stringify(data)) - break; - default: - // $.log(JSON.stringify(data)) - break; - } - } else { - // $.log(JSON.stringify(data)) - } - } else { - // $.log("京东没有返回数据") - } - } - } catch (error) { - $.log(error) - } finally { - resolve(); - } - }) - }) -} - -function getAuthorCodeList(url) { - return new Promise(resolve => { - const options = { - url: `${url}?${new Date()}`, "timeout": 10000, headers: { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" - } - }; - $.get(options, async (err, resp, data) => { - try { - if (err) { - // $.log(err) - $.getAuthorCodeListerr = false - } else { - if (data) data = JSON.parse(data) - $.getAuthorCodeListerr = true - } - } catch (e) { - $.logErr(e, resp) - data = null; - } finally { - resolve(data); - } - }) - }) -} - -function taskUrl(function_id, body, isCommon) { - return { - url: isCommon ? `https://lzdz1-isv.isvjcloud.com/${function_id}` : `https://lzdz1-isv.isvjcloud.com/dingzhi/${function_id}`, - headers: { - Host: 'lzdz1-isv.isvjcloud.com', - Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest', - 'Accept-Language': 'zh-cn', - 'Accept-Encoding': 'gzip, deflate, br', - 'Content-Type': 'application/x-www-form-urlencoded', - Origin: 'https://lzdz1-isv.isvjcloud.com', - 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: 'keep-alive', - Referer: $.activityUrl, - Cookie: cookie - }, - body: body - - } -} -function taskaccessLog(function_id, body, isCommon = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - // console.log(resp); - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie};`; - for (let sk of resp["headers"]["set-cookie"]) { - lz_cookie[sk.split(";")[0].substr(0, sk.split(";")[0].indexOf("="))] = sk.split(";")[0].substr(sk.split(";")[0].indexOf("=") + 1); - } - for (const vo of Object.keys(lz_cookie)) { - cookie += vo + "=" + lz_cookie[vo] + ";"; - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - }); - }); -} -function getMyPing() { - let opt = { - url: `https://lzdz1-isv.isvjcloud.com/customer/getMyPing`, - headers: { - Host: 'lzdz1-isv.isvjcloud.com', - Accept: 'application/json', - 'X-Requested-With': 'XMLHttpRequest', - 'Accept-Language': 'zh-cn', - 'Accept-Encoding': 'gzip, deflate, br', - 'Content-Type': 'application/x-www-form-urlencoded', - Origin: 'https://lzdz1-isv.isvjcloud.com', - 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: 'keep-alive', - Referer: $.activityUrl, - Cookie: cookie, - }, - body: `userId=${$.activityShopId}&token=${$.token}&fromType=APP&riskType=1` - } - return new Promise(resolve => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err) - } else { - if (resp['headers']['set-cookie']) { - cookie = `${originCookie}` - if ($.isNode()) { - for (let sk of resp['headers']['set-cookie']) { - cookie = `${cookie}${sk.split(";")[0]};` - } - } else { - for (let ck of resp['headers']['Set-Cookie'].split(',')) { - cookie = `${cookie}${ck.split(";")[0]};` - } - } - } - if (resp['headers']['Set-Cookie']) { - cookie = `${originCookie}` - if ($.isNode()) { - for (let sk of resp['headers']['set-cookie']) { - cookie = `${cookie}${sk.split(";")[0]};` - } - } else { - for (let ck of resp['headers']['Set-Cookie'].split(',')) { - cookie = `${cookie}${ck.split(";")[0]};` - } - } - } - if (data) { - data = JSON.parse(data) - if (data.result) { - $.log(`你好:${data.data.nickname}`) - $.pin = data.data.nickname; - $.secretPin = data.data.secretPin; - cookie = `${cookie};AUTH_C_USER=${data.data.secretPin}` - } else { - $.log(data.errorMessage) - } - } else { - $.log("京东返回了空数据") - } - } - } catch (error) { - $.log(error) - } finally { - resolve(); - } - - }) - }) -} -function getFirstLZCK() { - return new Promise(resolve => { - $.get({ url: $.activityUrl ,headers:{"user-agent":$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}}, (err, resp, data) => { - try { - if (err) { - console.log(err) - } else { - if (resp['headers']['set-cookie']) { - cookie = `${originCookie}` - if ($.isNode()) { - for (let sk of resp['headers']['set-cookie']) { - cookie = `${cookie}${sk.split(";")[0]};` - } - } else { - for (let ck of resp['headers']['Set-Cookie'].split(',')) { - cookie = `${cookie}${ck.split(";")[0]};` - } - } - } - if (resp['headers']['Set-Cookie']) { - cookie = `${originCookie}` - if ($.isNode()) { - for (let sk of resp['headers']['set-cookie']) { - cookie = `${cookie}${sk.split(";")[0]};` - } - } else { - for (let ck of resp['headers']['Set-Cookie'].split(',')) { - cookie = `${cookie}${ck.split(";")[0]};` - } - } - } - } - } catch (error) { - console.log(error) - } finally { - resolve(); - } - }) - }) -} -function getToken() { - let opt = { - url: `https://api.m.jd.com/client.action?functionId=isvObfuscator`, - headers: { - Host: 'api.m.jd.com', - 'Content-Type': 'application/x-www-form-urlencoded', - Accept: '*/*', - Connection: 'keep-alive', - Cookie: cookie, - 'User-Agent': 'JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)', - 'Accept-Language': 'zh-Hans-CN;q=1', - 'Accept-Encoding': 'gzip, deflate, br', - }, - body: `body=%7B%22url%22%3A%20%22https%3A//lzkj-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=hjudwgohxzVu96krv&client=apple&clientVersion=9.4.0&st=1620476162000&sv=111&sign=f9d1b7e3b943b6a136d54fe4f892af05` - } - return new Promise(resolve => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err) - } else { - if (data) { - data = JSON.parse(data); - if (data.code === "0") { - $.token = data.token - } - } else { - $.log("京东返回了空数据") - } - } - } catch (error) { - $.log(error) - } finally { - resolve(); - } - }) - }) -} -function random(min, max) { - - return Math.floor(Math.random() * (max - min)) + min; - -} -function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { - return format.replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); - if (UpperCase) { - uuid = v.toString(36).toUpperCase(); - } else { - uuid = v.toString(36) - } - return uuid; - }); -} -function checkCookie() { - const options = { - url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", - headers: { - "Host": "me-api.jd.com", - "Accept": "*/*", - "Connection": "keep-alive", - "Cookie": cookie, - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", - "Accept-Language": "zh-cn", - "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br", - } - }; - return new Promise(resolve => { - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err) - } else { - if (data) { - data = JSON.parse(data); - if (data.retcode === "1001") { - $.isLogin = false; //cookie过期 - return; - } - if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - $.log('京东返回了空数据'); - } - } - } catch (e) { - $.logErr(e) - } finally { - resolve(); - } - }) - }) -} -// prettier-ignore -var _0xode='jsjiami.com.v6',_0xode_=['‮_0xode'],_0x5bce=[_0xode,'\x53\x45\x70\x6a\x54\x6b\x73\x3d','\x61\x6d\x4e\x52\x54\x33\x45\x3d','\x59\x6b\x5a\x7a\x53\x6b\x73\x3d','\x61\x30\x52\x55\x54\x47\x49\x3d','\x5a\x6d\x78\x76\x62\x33\x49\x3d','\x54\x6e\x70\x71\x64\x47\x30\x3d','\x63\x6d\x46\x75\x5a\x47\x39\x74','\x62\x47\x56\x75\x5a\x33\x52\x6f','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x4a\x74\x5a\x58\x4e\x7a\x59\x57\x64\x6c','\x62\x57\x56\x7a\x63\x32\x46\x6e\x5a\x51\x3d\x3d','\x65\x6d\x31\x51\x56\x45\x34\x3d','\x52\x57\x5a\x6a\x65\x6c\x4d\x3d','\x64\x33\x70\x49\x65\x47\x49\x3d','\x52\x30\x4a\x44\x65\x55\x30\x3d','\x4f\x47\x46\x6b\x5a\x6d\x49\x3d','\x61\x6d\x52\x66\x63\x32\x68\x76\x63\x46\x39\x74\x5a\x57\x31\x69\x5a\x58\x49\x3d','\x4f\x53\x34\x79\x4c\x6a\x41\x3d','\x61\x6d\x52\x7a\x61\x57\x64\x75\x4c\x6d\x4e\x6d','\x59\x58\x42\x77\x62\x47\x6c\x6a\x59\x58\x52\x70\x62\x32\x34\x76\x61\x6e\x4e\x76\x62\x67\x3d\x3d','\x61\x55\x4a\x43\x62\x30\x6f\x3d','\x63\x48\x64\x68\x59\x6d\x30\x3d','\x53\x57\x46\x44\x62\x46\x6b\x3d','\x5a\x47\x78\x6e\x55\x6d\x59\x3d','\x62\x32\x46\x4a\x55\x31\x59\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x6a\x5a\x47\x34\x75\x62\x6e\x6f\x75\x62\x48\x55\x76\x5a\x32\x56\x30\x61\x44\x56\x7a\x64\x41\x3d\x3d','\x54\x6b\x64\x30\x59\x6b\x59\x3d','\x63\x47\x39\x7a\x64\x41\x3d\x3d','\x59\x58\x42\x77\x62\x48\x6b\x3d','\x64\x45\x6c\x78\x65\x45\x77\x3d','\x65\x6b\x46\x35\x65\x58\x55\x3d','\x5a\x56\x70\x42\x64\x55\x73\x3d','\x62\x45\x5a\x45\x62\x46\x59\x3d','\x5a\x30\x74\x56\x65\x6e\x49\x3d','\x59\x58\x42\x70\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74','\x4b\x69\x38\x71','\x61\x32\x56\x6c\x63\x43\x31\x68\x62\x47\x6c\x32\x5a\x51\x3d\x3d','\x65\x6d\x67\x74\x59\x32\x34\x3d','\x5a\x33\x70\x70\x63\x43\x77\x67\x5a\x47\x56\x6d\x62\x47\x46\x30\x5a\x53\x77\x67\x59\x6e\x49\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x39\x68\x63\x48\x42\x70\x5a\x44\x31\x71\x5a\x46\x39\x7a\x61\x47\x39\x77\x58\x32\x31\x6c\x62\x57\x4a\x6c\x63\x69\x5a\x6d\x64\x57\x35\x6a\x64\x47\x6c\x76\x62\x6b\x6c\x6b\x50\x57\x64\x6c\x64\x46\x4e\x6f\x62\x33\x42\x50\x63\x47\x56\x75\x51\x32\x46\x79\x5a\x45\x6c\x75\x5a\x6d\x38\x6d\x59\x6d\x39\x6b\x65\x54\x30\x3d','\x52\x6c\x68\x70\x52\x48\x6b\x3d','\x63\x33\x52\x79\x61\x57\x35\x6e\x61\x57\x5a\x35','\x4a\x6d\x4e\x73\x61\x57\x56\x75\x64\x44\x31\x49\x4e\x53\x5a\x6a\x62\x47\x6c\x6c\x62\x6e\x52\x57\x5a\x58\x4a\x7a\x61\x57\x39\x75\x50\x54\x6b\x75\x4d\x69\x34\x77\x4a\x6e\x56\x31\x61\x57\x51\x39\x4f\x44\x67\x34\x4f\x44\x67\x3d','\x62\x57\x74\x4f\x59\x57\x4d\x3d','\x52\x32\x4e\x78\x61\x56\x63\x3d','\x54\x47\x70\x55\x63\x33\x41\x3d','\x61\x6d\x52\x68\x63\x48\x41\x37\x61\x56\x42\x6f\x62\x32\x35\x6c\x4f\x7a\x6b\x75\x4e\x53\x34\x30\x4f\x7a\x45\x7a\x4c\x6a\x59\x37','\x56\x56\x56\x4a\x52\x41\x3d\x3d','\x4f\x32\x35\x6c\x64\x48\x64\x76\x63\x6d\x73\x76\x64\x32\x6c\x6d\x61\x54\x74\x42\x52\x45\x6c\x45\x4c\x77\x3d\x3d','\x51\x55\x52\x4a\x52\x41\x3d\x3d','\x4f\x32\x31\x76\x5a\x47\x56\x73\x4c\x32\x6c\x51\x61\x47\x39\x75\x5a\x54\x45\x77\x4c\x44\x4d\x37\x59\x57\x52\x6b\x63\x6d\x56\x7a\x63\x32\x6c\x6b\x4c\x7a\x41\x37\x59\x58\x42\x77\x51\x6e\x56\x70\x62\x47\x51\x76\x4d\x54\x59\x33\x4e\x6a\x59\x34\x4f\x32\x70\x6b\x55\x33\x56\x77\x63\x47\x39\x79\x64\x45\x52\x68\x63\x6d\x74\x4e\x62\x32\x52\x6c\x4c\x7a\x41\x37\x54\x57\x39\x36\x61\x57\x78\x73\x59\x53\x38\x31\x4c\x6a\x41\x67\x4b\x47\x6c\x51\x61\x47\x39\x75\x5a\x54\x73\x67\x51\x31\x42\x56\x49\x47\x6c\x51\x61\x47\x39\x75\x5a\x53\x42\x50\x55\x79\x41\x78\x4d\x31\x38\x32\x49\x47\x78\x70\x61\x32\x55\x67\x54\x57\x46\x6a\x49\x45\x39\x54\x49\x46\x67\x70\x49\x45\x46\x77\x63\x47\x78\x6c\x56\x32\x56\x69\x53\x32\x6c\x30\x4c\x7a\x59\x77\x4e\x53\x34\x78\x4c\x6a\x45\x31\x49\x43\x68\x4c\x53\x46\x52\x4e\x54\x43\x77\x67\x62\x47\x6c\x72\x5a\x53\x42\x48\x5a\x57\x4e\x72\x62\x79\x6b\x67\x54\x57\x39\x69\x61\x57\x78\x6c\x4c\x7a\x45\x31\x52\x54\x45\x30\x4f\x44\x74\x7a\x64\x58\x42\x77\x62\x33\x4a\x30\x53\x6b\x52\x54\x53\x46\x64\x4c\x4c\x7a\x45\x3d','\x64\x33\x70\x79\x61\x31\x41\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x7a\x61\x47\x39\x77\x62\x57\x56\x74\x59\x6d\x56\x79\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74\x4c\x33\x4e\x6f\x62\x33\x42\x6a\x59\x58\x4a\x6b\x4c\x7a\x39\x32\x5a\x57\x35\x6b\x5a\x58\x4a\x4a\x5a\x44\x30\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x67\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x56\x6e\x46\x73\x56\x6b\x6f\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x56\x63\x6d\x77\x3d','\x56\x55\x39\x73\x62\x45\x4d\x3d','\x56\x48\x70\x6f\x51\x6e\x4d\x3d','\x59\x56\x64\x5a\x53\x6c\x67\x3d','\x65\x48\x6c\x4e\x64\x57\x45\x3d','\x5a\x57\x35\x32','\x55\x30\x6c\x48\x54\x6c\x39\x56\x55\x6b\x77\x3d','\x5a\x32\x56\x30','\x55\x6c\x70\x43\x62\x45\x73\x3d','\x51\x30\x52\x74\x5a\x55\x63\x3d','\x54\x55\x78\x43\x63\x45\x6b\x3d','\x62\x47\x39\x6e','\x63\x47\x46\x79\x63\x32\x55\x3d','\x63\x33\x56\x6a\x59\x32\x56\x7a\x63\x77\x3d\x3d','\x63\x6d\x56\x7a\x64\x57\x78\x30','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x55\x6e\x56\x73\x5a\x55\x78\x70\x63\x33\x51\x3d','\x62\x33\x42\x6c\x62\x6b\x4e\x68\x63\x6d\x52\x42\x59\x33\x52\x70\x64\x6d\x6c\x30\x65\x55\x6c\x6b','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x53\x57\x35\x6d\x62\x77\x3d\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x4a\x5a\x41\x3d\x3d','\x52\x47\x31\x35\x61\x48\x55\x3d','\x59\x56\x70\x51\x59\x57\x34\x3d','\x59\x58\x42\x33\x52\x6d\x30\x3d','\x65\x46\x56\x42\x64\x31\x63\x3d','\x54\x30\x5a\x6d\x52\x58\x55\x3d','\x52\x31\x68\x4c\x54\x31\x45\x3d','\x61\x6c\x5a\x53\x64\x6c\x6f\x3d','\x64\x32\x35\x4d\x52\x30\x30\x3d','\x62\x33\x42\x5a\x51\x32\x59\x3d','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x49\x3d','\x64\x45\x4a\x79\x52\x32\x38\x3d','\x55\x6d\x6c\x68\x52\x56\x63\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x38\x3d','\x56\x30\x64\x30\x53\x30\x73\x3d','\x64\x33\x46\x6f\x59\x57\x38\x3d','\x52\x31\x46\x30\x52\x6b\x55\x3d','\x51\x6b\x78\x34\x51\x57\x49\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x51\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x54\x56\x46\x45\x5a\x6d\x30\x3d','\x52\x30\x39\x4b\x61\x6d\x55\x3d','\x61\x31\x6c\x47\x53\x6c\x45\x3d','\x61\x57\x56\x6b\x51\x55\x73\x3d','\x61\x6d\x31\x72\x54\x45\x49\x3d','\x54\x32\x46\x33\x59\x32\x63\x3d','\x65\x55\x64\x78\x59\x6d\x49\x3d','\x53\x32\x70\x70\x62\x58\x4d\x3d','\x56\x45\x52\x57\x53\x45\x59\x3d','\x56\x31\x4e\x49\x53\x6e\x4d\x3d','\x53\x47\x56\x53\x65\x45\x45\x3d','\x52\x55\x78\x79\x54\x6c\x51\x3d','\x57\x6b\x52\x45\x56\x57\x59\x3d','\x64\x58\x64\x35\x55\x6b\x6b\x3d','\x59\x6c\x64\x49\x51\x57\x77\x3d','\x5a\x30\x35\x78\x53\x6d\x34\x3d','\x52\x6b\x4a\x79\x53\x6d\x49\x3d','\x53\x6b\x68\x58\x55\x45\x63\x3d','\x64\x58\x4e\x5a\x65\x56\x6f\x3d','\x54\x46\x4e\x54\x65\x48\x67\x3d','\x54\x48\x4e\x4a\x65\x6b\x30\x3d','\x62\x47\x5a\x69\x65\x6b\x6f\x3d','\x5a\x48\x4e\x79\x63\x55\x38\x3d','\x62\x47\x39\x6e\x52\x58\x4a\x79','\x5a\x45\x46\x42\x5a\x30\x45\x3d','\x51\x42\x59\x67\x6a\x73\x6a\x53\x69\x61\x6d\x69\x74\x4a\x52\x4e\x2e\x63\x6f\x6d\x66\x54\x2e\x76\x74\x36\x4e\x67\x67\x3d\x3d'];if(function(_0x15a272,_0x516b6a,_0x4dd628){function _0x4485e5(_0x3c702f,_0x2622f0,_0x1e7f7d,_0x34d687,_0x19a000,_0x186734){_0x2622f0=_0x2622f0>>0x8,_0x19a000='po';var _0x34e09c='shift',_0x2629da='push',_0x186734='‮';if(_0x2622f0<_0x3c702f){while(--_0x3c702f){_0x34d687=_0x15a272[_0x34e09c]();if(_0x2622f0===_0x3c702f&&_0x186734==='‮'&&_0x186734['length']===0x1){_0x2622f0=_0x34d687,_0x1e7f7d=_0x15a272[_0x19a000+'p']();}else if(_0x2622f0&&_0x1e7f7d['replace'](/[QBYgStJRNfTtNgg=]/g,'')===_0x2622f0){_0x15a272[_0x2629da](_0x34d687);}}_0x15a272[_0x2629da](_0x15a272[_0x34e09c]());}return 0xd874a;};return _0x4485e5(++_0x516b6a,_0x4dd628)>>_0x516b6a^_0x4dd628;}(_0x5bce,0x91,0x9100),_0x5bce){_0xode_=_0x5bce['length']^0x91;};function _0x14c9(_0x4701f8,_0x11a1c1){_0x4701f8=~~'0x'['concat'](_0x4701f8['slice'](0x1));var _0x1331d9=_0x5bce[_0x4701f8];if(_0x14c9['WGWLGh']===undefined&&'‮'['length']===0x1){(function(){var _0x5a4c3d=function(){var _0x2c6ed1;try{_0x2c6ed1=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x324599){_0x2c6ed1=window;}return _0x2c6ed1;};var _0x1631b1=_0x5a4c3d();var _0x593b41='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x1631b1['atob']||(_0x1631b1['atob']=function(_0x18444a){var _0x3a683c=String(_0x18444a)['replace'](/=+$/,'');for(var _0xc7b9d7=0x0,_0x1bc799,_0x7d79af,_0x5a84b3=0x0,_0x4e49ab='';_0x7d79af=_0x3a683c['charAt'](_0x5a84b3++);~_0x7d79af&&(_0x1bc799=_0xc7b9d7%0x4?_0x1bc799*0x40+_0x7d79af:_0x7d79af,_0xc7b9d7++%0x4)?_0x4e49ab+=String['fromCharCode'](0xff&_0x1bc799>>(-0x2*_0xc7b9d7&0x6)):0x0){_0x7d79af=_0x593b41['indexOf'](_0x7d79af);}return _0x4e49ab;});}());_0x14c9['sUNWyz']=function(_0x5c4f2c){var _0x82ac57=atob(_0x5c4f2c);var _0x545da4=[];for(var _0x2ea7d6=0x0,_0x3edb2d=_0x82ac57['length'];_0x2ea7d6<_0x3edb2d;_0x2ea7d6++){_0x545da4+='%'+('00'+_0x82ac57['charCodeAt'](_0x2ea7d6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x545da4);};_0x14c9['dThVyS']={};_0x14c9['WGWLGh']=!![];}var _0x2f65e7=_0x14c9['dThVyS'][_0x4701f8];if(_0x2f65e7===undefined){_0x1331d9=_0x14c9['sUNWyz'](_0x1331d9);_0x14c9['dThVyS'][_0x4701f8]=_0x1331d9;}else{_0x1331d9=_0x2f65e7;}return _0x1331d9;};function getShopOpenCardInfo(_0x28beec,_0x1334ea){var _0x6cf197={'\x52\x5a\x42\x6c\x4b':function(_0x1c184c,_0x537af3){return _0x1c184c!==_0x537af3;},'\x43\x44\x6d\x65\x47':_0x14c9('‫0'),'\x4d\x4c\x42\x70\x49':_0x14c9('‫1'),'\x44\x6d\x79\x68\x75':function(_0x277d5c){return _0x277d5c();},'\x54\x7a\x68\x42\x73':function(_0xde51b5,_0x1748b4){return _0xde51b5===_0x1748b4;},'\x61\x57\x59\x4a\x58':_0x14c9('‮2'),'\x78\x79\x4d\x75\x61':_0x14c9('‫3'),'\x46\x58\x69\x44\x79':function(_0x10e2ee,_0x35354b){return _0x10e2ee(_0x35354b);},'\x6d\x6b\x4e\x61\x63':_0x14c9('‮4'),'\x47\x63\x71\x69\x57':_0x14c9('‫5'),'\x4c\x6a\x54\x73\x70':_0x14c9('‮6'),'\x77\x7a\x72\x6b\x50':_0x14c9('‮7'),'\x56\x71\x6c\x56\x4a':function(_0x9710d4,_0x43a323){return _0x9710d4(_0x43a323);},'\x55\x4f\x6c\x6c\x43':_0x14c9('‫8')};let _0x14d980={'\x75\x72\x6c':_0x14c9('‮9')+_0x6cf197[_0x14c9('‮a')](encodeURIComponent,JSON[_0x14c9('‫b')](_0x28beec))+_0x14c9('‮c'),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x6cf197[_0x14c9('‫d')],'\x41\x63\x63\x65\x70\x74':_0x6cf197[_0x14c9('‮e')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x6cf197[_0x14c9('‫f')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x6cf197[_0x14c9('‮15')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x1334ea+_0x14c9('‮17')+_0x6cf197[_0x14c9('‮18')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x6cf197[_0x14c9('‫1a')]}};return new Promise(_0x15ba0a=>{if(_0x6cf197[_0x14c9('‫1b')](_0x6cf197[_0x14c9('‫1c')],_0x6cf197[_0x14c9('‫1d')])){Host=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{$[_0x14c9('‫20')](_0x14d980,(_0x45fcbf,_0x5cda91,_0x4f16e6)=>{if(_0x6cf197[_0x14c9('‮21')](_0x6cf197[_0x14c9('‫22')],_0x6cf197[_0x14c9('‫23')])){try{if(_0x45fcbf){console[_0x14c9('‮24')](_0x45fcbf);}else{res=JSON[_0x14c9('‮25')](_0x4f16e6);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}}catch(_0x1069d5){console[_0x14c9('‮24')](_0x1069d5);}finally{_0x6cf197[_0x14c9('‮2c')](_0x15ba0a);}}else{$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}});}});}async function bindWithVender(_0x458f18,_0x51a5d2){var _0x1ce6ca={'\x6b\x59\x46\x4a\x51':function(_0x48eab1,_0x247bf6){return _0x48eab1*_0x247bf6;},'\x69\x65\x64\x41\x4b':function(_0x380bcb,_0x201d01){return _0x380bcb(_0x201d01);},'\x6a\x6d\x6b\x4c\x42':function(_0x281c59,_0x7919b2){return _0x281c59!==_0x7919b2;},'\x4f\x61\x77\x63\x67':_0x14c9('‫2d'),'\x79\x47\x71\x62\x62':function(_0x165cda,_0x4905e3){return _0x165cda!==_0x4905e3;},'\x4b\x6a\x69\x6d\x73':_0x14c9('‫2e'),'\x54\x44\x56\x48\x46':_0x14c9('‮2f'),'\x57\x53\x48\x4a\x73':function(_0x5cece6,_0x32ca4d){return _0x5cece6===_0x32ca4d;},'\x48\x65\x52\x78\x41':_0x14c9('‫30'),'\x45\x4c\x72\x4e\x54':_0x14c9('‫31'),'\x5a\x44\x44\x55\x66':_0x14c9('‮32'),'\x75\x77\x79\x52\x49':_0x14c9('‫33'),'\x62\x57\x48\x41\x6c':function(_0x2b4b80){return _0x2b4b80();},'\x67\x4e\x71\x4a\x6e':function(_0x37eecf,_0x4a6f6e){return _0x37eecf===_0x4a6f6e;},'\x46\x42\x72\x4a\x62':_0x14c9('‫34'),'\x74\x42\x72\x47\x6f':function(_0x3345e3,_0x292932,_0x1ccf93){return _0x3345e3(_0x292932,_0x1ccf93);},'\x52\x69\x61\x45\x57':_0x14c9('‫35'),'\x57\x47\x74\x4b\x4b':_0x14c9('‮4'),'\x77\x71\x68\x61\x6f':_0x14c9('‫5'),'\x47\x51\x74\x46\x45':_0x14c9('‮6'),'\x42\x4c\x78\x41\x62':_0x14c9('‮7'),'\x4d\x51\x44\x66\x6d':function(_0x100ab6,_0xf684c7){return _0x100ab6(_0xf684c7);},'\x47\x4f\x4a\x6a\x65':_0x14c9('‫8')};return h5st=await _0x1ce6ca[_0x14c9('‫36')](geth5st,_0x1ce6ca[_0x14c9('‮37')],_0x458f18),opt={'\x75\x72\x6c':_0x14c9('‫38')+h5st,'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x1ce6ca[_0x14c9('‫39')],'\x41\x63\x63\x65\x70\x74':_0x1ce6ca[_0x14c9('‮3a')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x1ce6ca[_0x14c9('‮3b')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x14c9('‮10')+$[_0x14c9('‫11')]+_0x14c9('‮12')+$[_0x14c9('‮13')]+_0x14c9('‮14'),'Accept-Language':_0x1ce6ca[_0x14c9('‮3c')],'\x52\x65\x66\x65\x72\x65\x72':_0x14c9('‮16')+_0x51a5d2+_0x14c9('‫3d')+_0x1ce6ca[_0x14c9('‮3e')](encodeURIComponent,$[_0x14c9('‫19')]),'Accept-Encoding':_0x1ce6ca[_0x14c9('‮3f')]}},new Promise(_0x3a254b=>{var _0x15bfd9={'\x4e\x7a\x6a\x74\x6d':function(_0x24ea44,_0x4ba87d){return _0x1ce6ca[_0x14c9('‫40')](_0x24ea44,_0x4ba87d);},'\x4a\x48\x57\x50\x47':function(_0x58c92e,_0x1d183a){return _0x1ce6ca[_0x14c9('‫41')](_0x58c92e,_0x1d183a);},'\x75\x73\x59\x79\x5a':function(_0x1f0eb5,_0x10a768){return _0x1ce6ca[_0x14c9('‮42')](_0x1f0eb5,_0x10a768);},'\x4c\x53\x53\x78\x78':_0x1ce6ca[_0x14c9('‫43')],'\x6c\x66\x62\x7a\x4a':function(_0x1fbae4,_0x237377){return _0x1ce6ca[_0x14c9('‮44')](_0x1fbae4,_0x237377);},'\x64\x73\x72\x71\x4f':_0x1ce6ca[_0x14c9('‫45')],'\x64\x41\x41\x67\x41':function(_0x3c4670,_0x24c70b){return _0x1ce6ca[_0x14c9('‮44')](_0x3c4670,_0x24c70b);},'\x48\x4a\x63\x4e\x4b':_0x1ce6ca[_0x14c9('‫46')],'\x6a\x63\x51\x4f\x71':function(_0x2454bf,_0x34e55b){return _0x1ce6ca[_0x14c9('‫47')](_0x2454bf,_0x34e55b);},'\x62\x46\x73\x4a\x4b':_0x1ce6ca[_0x14c9('‮48')],'\x6b\x44\x54\x4c\x62':_0x1ce6ca[_0x14c9('‮49')],'\x7a\x6d\x50\x54\x4e':function(_0x5f2a7c,_0x2aaf67){return _0x1ce6ca[_0x14c9('‫47')](_0x5f2a7c,_0x2aaf67);},'\x45\x66\x63\x7a\x53':_0x1ce6ca[_0x14c9('‮4a')],'\x77\x7a\x48\x78\x62':_0x1ce6ca[_0x14c9('‫4b')],'\x47\x42\x43\x79\x4d':function(_0x48d9fa){return _0x1ce6ca[_0x14c9('‫4c')](_0x48d9fa);}};if(_0x1ce6ca[_0x14c9('‫4d')](_0x1ce6ca[_0x14c9('‮4e')],_0x1ce6ca[_0x14c9('‮4e')])){$[_0x14c9('‫20')](opt,(_0x2bd187,_0x25e56a,_0x27e117)=>{var _0x9eb65a={'\x4c\x73\x49\x7a\x4d':function(_0x2595b3,_0x1b21fa){return _0x15bfd9[_0x14c9('‫4f')](_0x2595b3,_0x1b21fa);}};if(_0x15bfd9[_0x14c9('‮50')](_0x15bfd9[_0x14c9('‮51')],_0x15bfd9[_0x14c9('‮51')])){_0x9eb65a[_0x14c9('‫52')](_0x3a254b,_0x27e117);}else{try{if(_0x15bfd9[_0x14c9('‮53')](_0x15bfd9[_0x14c9('‮54')],_0x15bfd9[_0x14c9('‮54')])){$[_0x14c9('‫55')](e,_0x25e56a);}else{if(_0x2bd187){console[_0x14c9('‮24')](_0x2bd187);}else{if(_0x15bfd9[_0x14c9('‮56')](_0x15bfd9[_0x14c9('‫57')],_0x15bfd9[_0x14c9('‫57')])){console[_0x14c9('‮24')](_0x2bd187);}else{res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(_0x15bfd9[_0x14c9('‮58')](_0x15bfd9[_0x14c9('‮59')],_0x15bfd9[_0x14c9('‮5a')])){Host=HostArr[Math[_0x14c9('‫5b')](_0x15bfd9[_0x14c9('‮5c')](Math[_0x14c9('‫5d')](),HostArr[_0x14c9('‫5e')]))];}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}}}}}}catch(_0x35edb1){console[_0x14c9('‮24')](_0x35edb1);}finally{if(_0x15bfd9[_0x14c9('‫61')](_0x15bfd9[_0x14c9('‫62')],_0x15bfd9[_0x14c9('‮63')])){res=JSON[_0x14c9('‮25')](_0x27e117);if(res[_0x14c9('‫26')]){if(res[_0x14c9('‮27')][_0x14c9('‮28')]){$[_0x14c9('‮29')]=res[_0x14c9('‮27')][_0x14c9('‮28')][0x0][_0x14c9('‮2a')][_0x14c9('‮2b')];}}}else{_0x15bfd9[_0x14c9('‫64')](_0x3a254b);}}}});}else{console[_0x14c9('‮24')](res);$[_0x14c9('‫5f')]=res[_0x14c9('‮60')];}});}function geth5st(_0x336ae8,_0x5dec8f){var _0x2e38b8={'\x74\x49\x71\x78\x4c':function(_0x29a313,_0xb36afc){return _0x29a313(_0xb36afc);},'\x69\x42\x42\x6f\x4a':_0x14c9('‫65'),'\x70\x77\x61\x62\x6d':_0x14c9('‫66'),'\x49\x61\x43\x6c\x59':_0x14c9('‮67'),'\x64\x6c\x67\x52\x66':_0x14c9('‫68'),'\x6f\x61\x49\x53\x56':function(_0x15e1c6,_0x661068){return _0x15e1c6*_0x661068;},'\x4e\x47\x74\x62\x46':_0x14c9('‮69')};return new Promise(async _0xcfa8c2=>{let _0x56832e={'\x61\x70\x70\x49\x64':_0x2e38b8[_0x14c9('‫6a')],'\x62\x6f\x64\x79':{'\x61\x70\x70\x69\x64':_0x2e38b8[_0x14c9('‮6b')],'\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64':_0x336ae8,'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x5dec8f),'\x63\x6c\x69\x65\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e':_0x2e38b8[_0x14c9('‮6c')],'\x63\x6c\x69\x65\x6e\x74':'\x48\x35'},'\x63\x61\x6c\x6c\x62\x61\x63\x6b\x41\x6c\x6c':!![]};let _0x36eeef='';let _0x322029=[_0x2e38b8[_0x14c9('‫6d')]];if(process[_0x14c9('‫1e')][_0x14c9('‫1f')]){_0x36eeef=process[_0x14c9('‫1e')][_0x14c9('‫1f')];}else{_0x36eeef=_0x322029[Math[_0x14c9('‫5b')](_0x2e38b8[_0x14c9('‫6e')](Math[_0x14c9('‫5d')](),_0x322029[_0x14c9('‫5e')]))];}let _0x9a07e6={'\x75\x72\x6c':_0x14c9('‮6f'),'\x62\x6f\x64\x79':JSON[_0x14c9('‫b')](_0x56832e),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x36eeef,'Content-Type':_0x2e38b8[_0x14c9('‮70')]},'\x74\x69\x6d\x65\x6f\x75\x74':_0x2e38b8[_0x14c9('‫6e')](0x1e,0x3e8)};$[_0x14c9('‫71')](_0x9a07e6,async(_0x4d8507,_0x51c179,_0x56832e)=>{try{if(_0x4d8507){_0x56832e=await geth5st[_0x14c9('‫72')](this,arguments);}else{}}catch(_0x3cef4f){$[_0x14c9('‫55')](_0x3cef4f,_0x51c179);}finally{_0x2e38b8[_0x14c9('‮73')](_0xcfa8c2,_0x56832e);}});});};_0xode='jsjiami.com.v6'; -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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_lzdz1_customized9.js b/jd_lzdz1_customized9.js deleted file mode 100644 index 8b0c887c9..000000000 --- a/jd_lzdz1_customized9.js +++ /dev/null @@ -1,541 +0,0 @@ -/* -约惠春天 好物来袭 -*/ -const $ = new Env("约惠春天 好物来袭"); -const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; -const notify = $.isNode() ? require("./sendNotify") : ""; -let cookiesArr = [], cookie = "", message = ""; -let ownCode = null; -let authorCodeList = []; -if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - cookiesArr.push(jdCookieNode[item]); - }); - if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; -} else { - let cookiesData = $.getdata("CookiesJD") || "[]"; - cookiesData = JSON.parse(cookiesData); - cookiesArr = cookiesData.map((item) => item.cookie); - cookiesArr.reverse(); - cookiesArr.push(...[$.getdata("CookieJD2"), $.getdata("CookieJD")]); - cookiesArr.reverse(); - cookiesArr = cookiesArr.filter((item) => !!item); -} -!(async () => { - $.getAuthorCodeListerr = false; - if (!cookiesArr[0]) { - $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/bean/signIndex.action", { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - return; - } - // authorCodeList = await getAuthorCodeList('https://gitee.com/fatelight/code/raw/master/lzdz112.json') - // if ($.getAuthorCodeListerr === false) { - // authorCodeList = [ - // '917746a95cae46618c8f6b0ff55dfbc2', - // ] - // } - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i]; - originCookie = cookiesArr[i]; - newCookie = ""; - $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]); - $.index = i + 1; - $.isLogin = true; - $.nickName = ""; - await checkCookie(); - console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); - // if ($.isNode()) { - // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - // } - continue; - } - $.bean = 0; - $.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1); - $.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - authorCodeList = [ - "83d7976c2c6a43c29c6031d2c339b404", - '438636e19e2d448c819415fef086a858', - 'cf5c5fd7d6af44659c1ae464b3ab1f5d', - '7aee91c9f025430ca0fac6eb13ed9608', - ]; - // $.authorCode = authorCodeList[random(0, authorCodeList.length)]; - $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] - $.authorNum = `${random(1000000, 9999999)}`; - $.randomCode = random(1000000, 9999999); - $.activityId = "dzlhkkb306433997033e689d45c00a"; - $.activityShopId = "1000013205"; - $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=null&shareuserid4minipg=null&shopid=undefined&lng=00.000000&lat=00.000000&sid=&un_area=`; - await member(); - await $.wait(1000); - if ($.bean > 0) { - message += `\n【京东账号${$.index}】${$.nickName || $.UserName} \n └ 获得 ${$.bean} 京豆。`; - } - } - } - if (message !== "") { - if ($.isNode()) { - await notify.sendNotify($.name, message, "", `\n`); - } else { - $.msg($.name, "有点儿收获", message); - } - } -})() - .catch((e) => { - $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); - }) - .finally(() => { - $.done(); - }); - -async function member() { - $.token = null; - $.secretPin = null; - $.openCardActivityId = null; - lz_cookie = {}; - await getFirstLZCK(); - await getToken(); - await task("dz/common/getSimpleActInfoVo", `activityId=${$.activityId}`, 1); - if ($.token) { - await getMyPing(); - if ($.secretPin) { - console.log("去助力 -> " + $.authorCode); - await taskaccessLog("common/accessLogWithAD", `venderId=${$.activityShopId}&code=99&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=null`, 1); - await task("wxActionCommon/getUserInfo", `pin=${encodeURIComponent($.secretPin)}`, 1); - if ($.index === 1) { - await task("linkgame/activity/content", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}`, 0, 1); - } else { - await task("linkgame/activity/content", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}`); - } - $.log("关注店铺"); - await task("opencard/follow/shop", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - await task("taskact/common/drawContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - await task("linkgame/task/opencard/info", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); - $.log("加入店铺会员"); - if ($.openCardList) { - for (const vo of $.openCardList) { - // console.log(vo) - $.log(`>>> 去加入${vo.name} ${vo.venderId}`); - await task("crm/pageVisit/insertCrmPageVisit", `venderId=1000000576&elementId=入会跳转&pageId=dzlhkk068d4d0ab8a6609723002f50&pin=${encodeURIComponent($.secretPin)}`, 1); - await $.wait(500); - await getFirstLZCK(); - await getToken(); - if (vo.status == 0) { - await getShopOpenCardInfo({ venderId: `${vo.venderId}`, channel: "401" }, vo.venderId); - await bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: $.openCardActivityId, channel: 401 }, vo.venderId); - await $.wait(1000); - } else { - $.log(`>>> 已经是会员`); - } - } - } else { - $.log("没有获取到对应的任务。\n"); - } - await task("linkgame/checkOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); - console.log("去助力 -> " + $.authorCode); - await task("linkgame/assist/status", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - await task("linkgame/assist", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); - // await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - - // await task('linkgame/task/info', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) - // console.log('任务 -> ') - // await $.wait(2000) - // await task('opencard/addCart', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await $.wait(2000) - // await task('linkgame/sendAllCoupon', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); - // await getFirstLZCK() - // await getToken(); - // console.log('抽奖 -> ') - // await $.wait(2000) - // await task('linkgame/draw', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - // console.log('100 -> ') - // await getFirstLZCK() - // await getToken(); - // await $.wait(2000) - // await task('linkgame/draw/record', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); - } - } -} - -function task(function_id, body, isCommon = 0, own = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.result) { - switch (function_id) { - case "dz/common/getSimpleActInfoVo": - $.jdActivityId = data.data.jdActivityId; - $.venderId = data.data.venderId; - $.activityType = data.data.activityType; - // console.log($.venderId) - break; - case "wxActionCommon/getUserInfo": - break; - case "linkgame/activity/content": - if (!data.data.hasEnd) { - $.log(`开启【${data.data.activity["name"]}】活动`); - $.log("-------------------"); - if ($.index === 1) { - ownCode = data.data.actor["actorUuid"]; - console.log(ownCode); - } - $.actorUuid = data.data.actor["actorUuid"]; - } else { - $.log("活动已经结束"); - } - break; - case "linkgame/task/opencard/info": - $.openCardList = data.data.followShopList; - $.openCardStatus = data.data; - // console.log(data) - break; - case "opencard/follow/shop": - console.log(data); - break; - case "linkgame/sign": - console.log(data); - break; - case "opencard/addCart": - if (data.data) { - console.log(data.data); - } - break; - case "linkgame/sendAllCoupon": - if (data.data) { - console.log(data.data); - } - - break; - case "interaction/write/writePersonInfo": - console.log(data); - break; - case "linkgame/draw": - console.log(data); - break; - case "linkgame/draw/record": - console.log(data.data); - break; - case "linkgame/assist/status": - $.log(JSON.stringify(data)); - break; - case "linkgame/assist": - $.log(JSON.stringify(data)); - break; - case "opencard/help/list": - $.log(JSON.stringify(data)); - break; - default: - // $.log(JSON.stringify(data)) - break; - } - } else { - // $.log(JSON.stringify(data)) - } - } else { - // $.log("京东没有返回数据") - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function taskaccessLog(function_id, body, isCommon = 0) { - return new Promise((resolve) => { - $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - // console.log(resp); - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie};`; - for (let sk of resp["headers"]["set-cookie"]) { - lz_cookie[sk.split(";")[0].substr(0, sk.split(";")[0].indexOf("="))] = sk.split(";")[0].substr(sk.split(";")[0].indexOf("=") + 1); - } - for (const vo of Object.keys(lz_cookie)) { - cookie += vo + "=" + lz_cookie[vo] + ";"; - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - }); - }); -} - -function getAuthorCodeList(url) { - return new Promise((resolve) => { - const options = { - url: `${url}?${new Date()}`, - timeout: 10000, - headers: { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88", - }, - }; - $.get(options, async (err, resp, data) => { - try { - if (err) { - // $.log(err) - $.getAuthorCodeListerr = false; - } else { - if (data) data = JSON.parse(data); - $.getAuthorCodeListerr = true; - } - } catch (e) { - $.logErr(e, resp); - data = null; - } finally { - resolve(data); - } - }); - }); -} - -function taskUrl(function_id, body, isCommon) { - return { - url: isCommon ? `https://lzdz1-isv.isvjcloud.com/${function_id}` : `https://lzdz1-isv.isvjcloud.com/dingzhi/${function_id}`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: body, - }; -} - -function getMyPing() { - let opt = { - url: `https://lzdz1-isv.isvjcloud.com/customer/getMyPing`, - headers: { - Host: "lzdz1-isv.isvjcloud.com", - Accept: "application/json", - "X-Requested-With": "XMLHttpRequest", - "Accept-Language": "zh-cn", - "Accept-Encoding": "gzip, deflate, br", - "Content-Type": "application/x-www-form-urlencoded", - Origin: "https://lzdz1-isv.isvjcloud.com", - "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, - Connection: "keep-alive", - Referer: $.activityUrl, - Cookie: cookie, - }, - body: `userId=${$.activityShopId}&token=${$.token}&fromType=APP&riskType=1`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (data) { - data = JSON.parse(data); - if (data.result) { - $.log(`你好:${data.data.nickname}`); - $.pin = data.data.nickname; - $.secretPin = data.data.secretPin; - cookie = `${cookie};AUTH_C_USER=${data.data.secretPin}`; - } else { - $.log(data.errorMessage); - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function getFirstLZCK() { - return new Promise((resolve) => { - $.get( - { - url: $.activityUrl, - headers: { - "user-agent": $.isNode() ? process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : require("./USER_AGENTS").USER_AGENT : $.getdata("JDUA") ? $.getdata("JDUA") : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", - }, - }, - (err, resp, data) => { - try { - if (err) { - console.log(err); - } else { - if (resp["headers"]["set-cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - if (resp["headers"]["Set-Cookie"]) { - cookie = `${originCookie}`; - if ($.isNode()) { - for (let sk of resp["headers"]["set-cookie"]) { - cookie = `${cookie}${sk.split(";")[0]};`; - } - } else { - for (let ck of resp["headers"]["Set-Cookie"].split(",")) { - cookie = `${cookie}${ck.split(";")[0]};`; - } - } - } - } - } catch (error) { - console.log(error); - } finally { - resolve(); - } - } - ); - }); -} -function getToken() { - let opt = { - url: `https://api.m.jd.com/client.action?functionId=isvObfuscator`, - headers: { - Host: "api.m.jd.com", - "Content-Type": "application/x-www-form-urlencoded", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)", - "Accept-Language": "zh-Hans-CN;q=1", - "Accept-Encoding": "gzip, deflate, br", - }, - body: `body=%7B%22url%22%3A%20%22https%3A//lzkj-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=hjudwgohxzVu96krv&client=apple&clientVersion=9.4.0&st=1620476162000&sv=111&sign=f9d1b7e3b943b6a136d54fe4f892af05`, - }; - return new Promise((resolve) => { - $.post(opt, (err, resp, data) => { - try { - if (err) { - $.log(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.code === "0") { - $.token = data.token; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (error) { - $.log(error); - } finally { - resolve(); - } - }); - }); -} -function random(min, max) { - return Math.floor(Math.random() * (max - min)) + min; -} -function getUUID(format = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", UpperCase = 0) { - return format.replace(/[xy]/g, function (c) { - var r = (Math.random() * 16) | 0, - v = c == "x" ? r : (r & 0x3) | 0x8; - if (UpperCase) { - uuid = v.toString(36).toUpperCase(); - } else { - uuid = v.toString(36); - } - return uuid; - }); -} -function checkCookie() { - const options = { - url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", - headers: { - Host: "me-api.jd.com", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", - "Accept-Language": "zh-cn", - Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br", - }, - }; - return new Promise((resolve) => { - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err); - } else { - if (data) { - data = JSON.parse(data); - if (data.retcode === "1001") { - $.isLogin = false; //cookie过期 - return; - } - if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - $.log("京东返回了空数据"); - } - } - } catch (e) { - $.logErr(e); - } finally { - resolve(); - } - }); - }); -} -// prettier-ignore -var _0xod7='jsjiami.com.v6',_0xod7_=['‮_0xod7'],_0x1acd=[_0xod7,'\x53\x33\x4a\x54\x56\x32\x4d\x3d','\x54\x47\x4e\x4c\x62\x6e\x6b\x3d','\x62\x47\x39\x6e','\x63\x47\x46\x79\x63\x32\x55\x3d','\x63\x33\x56\x6a\x59\x32\x56\x7a\x63\x77\x3d\x3d','\x63\x6d\x56\x7a\x64\x57\x78\x30','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x55\x6e\x56\x73\x5a\x55\x78\x70\x63\x33\x51\x3d','\x62\x33\x42\x6c\x62\x6b\x4e\x68\x63\x6d\x52\x42\x59\x33\x52\x70\x64\x6d\x6c\x30\x65\x55\x6c\x6b','\x61\x57\x35\x30\x5a\x58\x4a\x6c\x63\x33\x52\x7a\x53\x57\x35\x6d\x62\x77\x3d\x3d','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x4a\x5a\x41\x3d\x3d','\x56\x45\x56\x4a\x59\x57\x38\x3d','\x55\x6d\x78\x6d\x59\x32\x4d\x3d','\x63\x45\x39\x31\x52\x6b\x4d\x3d','\x64\x6e\x5a\x75\x57\x45\x4d\x3d','\x62\x33\x64\x32\x5a\x47\x55\x3d','\x59\x33\x70\x4b\x62\x47\x67\x3d','\x51\x55\x64\x59\x59\x30\x6b\x3d','\x54\x30\x4a\x58\x55\x45\x59\x3d','\x56\x57\x6c\x55\x51\x33\x63\x3d','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x49\x3d','\x52\x57\x52\x36\x62\x57\x67\x3d','\x55\x48\x56\x58\x62\x6b\x59\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x38\x3d','\x52\x33\x5a\x75\x55\x6c\x55\x3d','\x52\x6c\x5a\x71\x53\x30\x55\x3d','\x56\x47\x35\x69\x63\x30\x73\x3d','\x61\x6e\x6c\x47\x54\x31\x41\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x51\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x59\x55\x78\x36\x61\x31\x63\x3d','\x56\x6d\x74\x75\x62\x33\x51\x3d','\x54\x56\x6c\x6f\x54\x45\x4d\x3d','\x62\x58\x64\x34\x52\x47\x30\x3d','\x65\x6c\x5a\x70\x59\x57\x34\x3d','\x52\x55\x46\x4a\x51\x6b\x45\x3d','\x53\x57\x70\x7a\x59\x6b\x6f\x3d','\x56\x55\x74\x79\x61\x46\x55\x3d','\x56\x32\x74\x69\x53\x45\x77\x3d','\x54\x46\x4a\x49\x61\x6b\x77\x3d','\x54\x30\x4e\x44\x54\x6e\x63\x3d','\x56\x31\x70\x7a\x57\x56\x6f\x3d','\x56\x33\x4e\x72\x63\x48\x67\x3d','\x61\x56\x42\x6b\x5a\x58\x67\x3d','\x51\x6e\x64\x6c\x55\x31\x63\x3d','\x65\x57\x35\x5a\x63\x58\x49\x3d','\x63\x47\x74\x50\x64\x58\x4d\x3d','\x57\x6d\x56\x5a\x62\x6c\x67\x3d','\x61\x56\x68\x4e\x54\x33\x6b\x3d','\x62\x56\x5a\x33\x65\x56\x67\x3d','\x55\x47\x4a\x50\x51\x55\x49\x3d','\x54\x33\x68\x74\x56\x57\x59\x3d','\x62\x55\x31\x52\x61\x33\x59\x3d','\x53\x57\x4a\x45\x62\x56\x45\x3d','\x59\x6d\x6c\x75\x5a\x46\x64\x70\x64\x47\x68\x57\x5a\x57\x35\x6b\x5a\x58\x4a\x74\x5a\x58\x4e\x7a\x59\x57\x64\x6c','\x62\x57\x56\x7a\x63\x32\x46\x6e\x5a\x51\x3d\x3d','\x5a\x57\x35\x32','\x55\x30\x6c\x48\x54\x6c\x39\x56\x55\x6b\x77\x3d','\x59\x6d\x52\x6e\x63\x30\x30\x3d','\x57\x6b\x74\x34\x53\x6b\x34\x3d','\x59\x30\x56\x51\x63\x6d\x4d\x3d','\x65\x45\x64\x72\x54\x47\x38\x3d','\x5a\x45\x74\x57\x64\x6d\x67\x3d','\x51\x58\x68\x73\x63\x6d\x6f\x3d','\x4f\x47\x46\x6b\x5a\x6d\x49\x3d','\x61\x6d\x52\x66\x63\x32\x68\x76\x63\x46\x39\x74\x5a\x57\x31\x69\x5a\x58\x49\x3d','\x4f\x53\x34\x79\x4c\x6a\x41\x3d','\x61\x6d\x52\x7a\x61\x57\x64\x75\x4c\x6d\x4e\x6d','\x59\x58\x42\x77\x62\x47\x6c\x6a\x59\x58\x52\x70\x62\x32\x34\x76\x61\x6e\x4e\x76\x62\x67\x3d\x3d','\x64\x6c\x6c\x43\x5a\x45\x67\x3d','\x51\x6b\x31\x47\x61\x33\x6b\x3d','\x61\x58\x56\x36\x61\x31\x45\x3d','\x5a\x30\x68\x33\x52\x58\x6f\x3d','\x55\x32\x56\x4d\x52\x6e\x45\x3d','\x52\x57\x35\x59\x65\x6c\x6b\x3d','\x55\x48\x70\x34\x63\x55\x67\x3d','\x54\x6c\x52\x42\x55\x56\x41\x3d','\x61\x30\x56\x78\x65\x6e\x45\x3d','\x61\x6c\x5a\x59\x63\x48\x45\x3d','\x51\x57\x31\x4f\x63\x6b\x6b\x3d','\x63\x57\x6c\x43\x64\x32\x63\x3d','\x5a\x6d\x78\x76\x62\x33\x49\x3d','\x62\x46\x6c\x57\x65\x47\x73\x3d','\x63\x6d\x46\x75\x5a\x47\x39\x74','\x62\x47\x56\x75\x5a\x33\x52\x6f','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x6a\x5a\x47\x34\x75\x62\x6e\x6f\x75\x62\x48\x55\x76\x5a\x32\x56\x30\x61\x44\x56\x7a\x64\x41\x3d\x3d','\x52\x47\x5a\x61\x62\x32\x67\x3d','\x57\x45\x4e\x36\x62\x6e\x59\x3d','\x63\x47\x39\x7a\x64\x41\x3d\x3d','\x53\x6b\x64\x4a\x53\x6b\x6f\x3d','\x59\x30\x78\x31\x57\x56\x63\x3d','\x53\x6d\x56\x74\x64\x6b\x67\x3d','\x56\x46\x4e\x6c\x59\x55\x59\x3d','\x5a\x6c\x64\x6d\x54\x31\x51\x3d','\x59\x58\x42\x77\x62\x48\x6b\x3d','\x65\x6b\x39\x49\x64\x45\x67\x3d','\x56\x46\x70\x75\x51\x6d\x6f\x3d','\x62\x47\x39\x6e\x52\x58\x4a\x79','\x61\x30\x64\x42\x55\x55\x51\x3d','\x56\x46\x6c\x48\x57\x48\x6f\x3d','\x59\x58\x42\x70\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74','\x4b\x69\x38\x71','\x61\x32\x56\x6c\x63\x43\x31\x68\x62\x47\x6c\x32\x5a\x51\x3d\x3d','\x65\x6d\x67\x74\x59\x32\x34\x3d','\x5a\x33\x70\x70\x63\x43\x77\x67\x5a\x47\x56\x6d\x62\x47\x46\x30\x5a\x53\x77\x67\x59\x6e\x49\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x68\x63\x47\x6b\x75\x62\x53\x35\x71\x5a\x43\x35\x6a\x62\x32\x30\x76\x59\x32\x78\x70\x5a\x57\x35\x30\x4c\x6d\x46\x6a\x64\x47\x6c\x76\x62\x6a\x39\x68\x63\x48\x42\x70\x5a\x44\x31\x71\x5a\x46\x39\x7a\x61\x47\x39\x77\x58\x32\x31\x6c\x62\x57\x4a\x6c\x63\x69\x5a\x6d\x64\x57\x35\x6a\x64\x47\x6c\x76\x62\x6b\x6c\x6b\x50\x57\x64\x6c\x64\x46\x4e\x6f\x62\x33\x42\x50\x63\x47\x56\x75\x51\x32\x46\x79\x5a\x45\x6c\x75\x5a\x6d\x38\x6d\x59\x6d\x39\x6b\x65\x54\x30\x3d','\x65\x47\x52\x75\x51\x6c\x49\x3d','\x63\x33\x52\x79\x61\x57\x35\x6e\x61\x57\x5a\x35','\x4a\x6d\x4e\x73\x61\x57\x56\x75\x64\x44\x31\x49\x4e\x53\x5a\x6a\x62\x47\x6c\x6c\x62\x6e\x52\x57\x5a\x58\x4a\x7a\x61\x57\x39\x75\x50\x54\x6b\x75\x4d\x69\x34\x77\x4a\x6e\x56\x31\x61\x57\x51\x39\x4f\x44\x67\x34\x4f\x44\x67\x3d','\x55\x6b\x70\x46\x55\x33\x6f\x3d','\x62\x48\x5a\x6c\x64\x6e\x67\x3d','\x59\x31\x68\x71\x63\x6e\x41\x3d','\x61\x6d\x52\x68\x63\x48\x41\x37\x61\x56\x42\x6f\x62\x32\x35\x6c\x4f\x7a\x6b\x75\x4e\x53\x34\x30\x4f\x7a\x45\x7a\x4c\x6a\x59\x37','\x56\x56\x56\x4a\x52\x41\x3d\x3d','\x4f\x32\x35\x6c\x64\x48\x64\x76\x63\x6d\x73\x76\x64\x32\x6c\x6d\x61\x54\x74\x42\x52\x45\x6c\x45\x4c\x77\x3d\x3d','\x51\x55\x52\x4a\x52\x41\x3d\x3d','\x4f\x32\x31\x76\x5a\x47\x56\x73\x4c\x32\x6c\x51\x61\x47\x39\x75\x5a\x54\x45\x77\x4c\x44\x4d\x37\x59\x57\x52\x6b\x63\x6d\x56\x7a\x63\x32\x6c\x6b\x4c\x7a\x41\x37\x59\x58\x42\x77\x51\x6e\x56\x70\x62\x47\x51\x76\x4d\x54\x59\x33\x4e\x6a\x59\x34\x4f\x32\x70\x6b\x55\x33\x56\x77\x63\x47\x39\x79\x64\x45\x52\x68\x63\x6d\x74\x4e\x62\x32\x52\x6c\x4c\x7a\x41\x37\x54\x57\x39\x36\x61\x57\x78\x73\x59\x53\x38\x31\x4c\x6a\x41\x67\x4b\x47\x6c\x51\x61\x47\x39\x75\x5a\x54\x73\x67\x51\x31\x42\x56\x49\x47\x6c\x51\x61\x47\x39\x75\x5a\x53\x42\x50\x55\x79\x41\x78\x4d\x31\x38\x32\x49\x47\x78\x70\x61\x32\x55\x67\x54\x57\x46\x6a\x49\x45\x39\x54\x49\x46\x67\x70\x49\x45\x46\x77\x63\x47\x78\x6c\x56\x32\x56\x69\x53\x32\x6c\x30\x4c\x7a\x59\x77\x4e\x53\x34\x78\x4c\x6a\x45\x31\x49\x43\x68\x4c\x53\x46\x52\x4e\x54\x43\x77\x67\x62\x47\x6c\x72\x5a\x53\x42\x48\x5a\x57\x4e\x72\x62\x79\x6b\x67\x54\x57\x39\x69\x61\x57\x78\x6c\x4c\x7a\x45\x31\x52\x54\x45\x30\x4f\x44\x74\x7a\x64\x58\x42\x77\x62\x33\x4a\x30\x53\x6b\x52\x54\x53\x46\x64\x4c\x4c\x7a\x45\x3d','\x61\x57\x4a\x49\x5a\x48\x45\x3d','\x61\x48\x52\x30\x63\x48\x4d\x36\x4c\x79\x39\x7a\x61\x47\x39\x77\x62\x57\x56\x74\x59\x6d\x56\x79\x4c\x6d\x30\x75\x61\x6d\x51\x75\x59\x32\x39\x74\x4c\x33\x4e\x6f\x62\x33\x42\x6a\x59\x58\x4a\x6b\x4c\x7a\x39\x32\x5a\x57\x35\x6b\x5a\x58\x4a\x4a\x5a\x44\x30\x3d','\x66\x53\x5a\x6a\x61\x47\x46\x75\x62\x6d\x56\x73\x50\x54\x67\x77\x4d\x53\x5a\x79\x5a\x58\x52\x31\x63\x6d\x35\x56\x63\x6d\x77\x39','\x59\x57\x4e\x30\x61\x58\x5a\x70\x64\x48\x6c\x56\x63\x6d\x77\x3d','\x5a\x55\x64\x48\x65\x6e\x67\x3d','\x61\x58\x46\x34\x57\x55\x38\x3d','\x59\x56\x52\x6b\x65\x6d\x55\x3d','\x62\x56\x52\x51\x65\x55\x63\x3d','\x5a\x32\x56\x30','\x6a\x6b\x73\x6a\x45\x69\x48\x61\x6d\x69\x64\x53\x2e\x63\x54\x6f\x6d\x43\x2e\x76\x36\x68\x6c\x45\x45\x56\x50\x75\x56\x3d\x3d'];if(function(_0x47dca4,_0x2e45a0,_0x2d0d38){function _0x358c40(_0x4e0fee,_0x44d395,_0x5f1629,_0x6d2cae,_0x379df8,_0x59c1d4){_0x44d395=_0x44d395>>0x8,_0x379df8='po';var _0x24e0cd='shift',_0x197297='push',_0x59c1d4='‮';if(_0x44d395<_0x4e0fee){while(--_0x4e0fee){_0x6d2cae=_0x47dca4[_0x24e0cd]();if(_0x44d395===_0x4e0fee&&_0x59c1d4==='‮'&&_0x59c1d4['length']===0x1){_0x44d395=_0x6d2cae,_0x5f1629=_0x47dca4[_0x379df8+'p']();}else if(_0x44d395&&_0x5f1629['replace'](/[kEHdSTChlEEVPuV=]/g,'')===_0x44d395){_0x47dca4[_0x197297](_0x6d2cae);}}_0x47dca4[_0x197297](_0x47dca4[_0x24e0cd]());}return 0xdaf2e;};return _0x358c40(++_0x2e45a0,_0x2d0d38)>>_0x2e45a0^_0x2d0d38;}(_0x1acd,0x1d5,0x1d500),_0x1acd){_0xod7_=_0x1acd['length']^0x1d5;};function _0x27de(_0x4ab799,_0x2148e0){_0x4ab799=~~'0x'['concat'](_0x4ab799['slice'](0x1));var _0x38aa70=_0x1acd[_0x4ab799];if(_0x27de['HEabFd']===undefined&&'‮'['length']===0x1){(function(){var _0x48587b=function(){var _0x226fa7;try{_0x226fa7=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x302471){_0x226fa7=window;}return _0x226fa7;};var _0x2dcb25=_0x48587b();var _0x5d0b0e='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2dcb25['atob']||(_0x2dcb25['atob']=function(_0x41138d){var _0x37290e=String(_0x41138d)['replace'](/=+$/,'');for(var _0x1da2f9=0x0,_0x27e844,_0x496c4d,_0x55ec30=0x0,_0x46993b='';_0x496c4d=_0x37290e['charAt'](_0x55ec30++);~_0x496c4d&&(_0x27e844=_0x1da2f9%0x4?_0x27e844*0x40+_0x496c4d:_0x496c4d,_0x1da2f9++%0x4)?_0x46993b+=String['fromCharCode'](0xff&_0x27e844>>(-0x2*_0x1da2f9&0x6)):0x0){_0x496c4d=_0x5d0b0e['indexOf'](_0x496c4d);}return _0x46993b;});}());_0x27de['ciicrd']=function(_0x35e622){var _0x1ca022=atob(_0x35e622);var _0x460af0=[];for(var _0x27de2b=0x0,_0x1b5b31=_0x1ca022['length'];_0x27de2b<_0x1b5b31;_0x27de2b++){_0x460af0+='%'+('00'+_0x1ca022['charCodeAt'](_0x27de2b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x460af0);};_0x27de['qeLOEi']={};_0x27de['HEabFd']=!![];}var _0x4e1a4f=_0x27de['qeLOEi'][_0x4ab799];if(_0x4e1a4f===undefined){_0x38aa70=_0x27de['ciicrd'](_0x38aa70);_0x27de['qeLOEi'][_0x4ab799]=_0x38aa70;}else{_0x38aa70=_0x4e1a4f;}return _0x38aa70;};function getShopOpenCardInfo(_0x2dfe13,_0x2a9c59){var _0x169e2b={'\x69\x71\x78\x59\x4f':function(_0x237960,_0x2865f7){return _0x237960===_0x2865f7;},'\x61\x54\x64\x7a\x65':_0x27de('‮0'),'\x6d\x54\x50\x79\x47':function(_0x5db734){return _0x5db734();},'\x78\x64\x6e\x42\x52':function(_0x27ef1f,_0x2696d1){return _0x27ef1f(_0x2696d1);},'\x52\x4a\x45\x53\x7a':_0x27de('‫1'),'\x6c\x76\x65\x76\x78':_0x27de('‫2'),'\x63\x58\x6a\x72\x70':_0x27de('‫3'),'\x69\x62\x48\x64\x71':_0x27de('‮4'),'\x65\x47\x47\x7a\x78':_0x27de('‫5')};let _0x4540b3={'\x75\x72\x6c':_0x27de('‮6')+_0x169e2b[_0x27de('‮7')](encodeURIComponent,JSON[_0x27de('‫8')](_0x2dfe13))+_0x27de('‮9'),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x169e2b[_0x27de('‮a')],'\x41\x63\x63\x65\x70\x74':_0x169e2b[_0x27de('‮b')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x169e2b[_0x27de('‫c')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x27de('‫d')+$[_0x27de('‫e')]+_0x27de('‫f')+$[_0x27de('‫10')]+_0x27de('‫11'),'Accept-Language':_0x169e2b[_0x27de('‫12')],'\x52\x65\x66\x65\x72\x65\x72':_0x27de('‮13')+_0x2a9c59+_0x27de('‮14')+_0x169e2b[_0x27de('‮7')](encodeURIComponent,$[_0x27de('‫15')]),'Accept-Encoding':_0x169e2b[_0x27de('‮16')]}};return new Promise(_0x24d014=>{var _0x45d140={'\x4b\x72\x53\x57\x63':function(_0x564cc4,_0x316683){return _0x169e2b[_0x27de('‫17')](_0x564cc4,_0x316683);},'\x4c\x63\x4b\x6e\x79':_0x169e2b[_0x27de('‫18')],'\x54\x45\x49\x61\x6f':function(_0x32cebc){return _0x169e2b[_0x27de('‫19')](_0x32cebc);}};$[_0x27de('‫1a')](_0x4540b3,(_0x497df1,_0x18ad2f,_0x1d037c)=>{if(_0x45d140[_0x27de('‮1b')](_0x45d140[_0x27de('‮1c')],_0x45d140[_0x27de('‮1c')])){try{if(_0x497df1){console[_0x27de('‫1d')](_0x497df1);}else{res=JSON[_0x27de('‫1e')](_0x1d037c);if(res[_0x27de('‮1f')]){if(res[_0x27de('‮20')][_0x27de('‮21')]){$[_0x27de('‮22')]=res[_0x27de('‮20')][_0x27de('‮21')][0x0][_0x27de('‫23')][_0x27de('‮24')];}}}}catch(_0x487efd){console[_0x27de('‫1d')](_0x487efd);}finally{_0x45d140[_0x27de('‮25')](_0x24d014);}}else{console[_0x27de('‫1d')](_0x497df1);}});});}async function bindWithVender(_0x4bf9aa,_0x5a230c){var _0x5180ad={'\x4d\x59\x68\x4c\x43':function(_0x396660){return _0x396660();},'\x6d\x77\x78\x44\x6d':function(_0x4b2169,_0x405a0d){return _0x4b2169!==_0x405a0d;},'\x7a\x56\x69\x61\x6e':_0x27de('‫26'),'\x45\x41\x49\x42\x41':_0x27de('‫27'),'\x49\x6a\x73\x62\x4a':function(_0xcf4ea9,_0x3221b8){return _0xcf4ea9===_0x3221b8;},'\x55\x4b\x72\x68\x55':_0x27de('‫28'),'\x57\x6b\x62\x48\x4c':_0x27de('‫29'),'\x4c\x52\x48\x6a\x4c':_0x27de('‮2a'),'\x4f\x43\x43\x4e\x77':_0x27de('‫2b'),'\x57\x5a\x73\x59\x5a':_0x27de('‫2c'),'\x57\x73\x6b\x70\x78':_0x27de('‮2d'),'\x45\x64\x7a\x6d\x68':function(_0x148959,_0x176008,_0x319ba8){return _0x148959(_0x176008,_0x319ba8);},'\x50\x75\x57\x6e\x46':_0x27de('‮2e'),'\x47\x76\x6e\x52\x55':_0x27de('‫1'),'\x46\x56\x6a\x4b\x45':_0x27de('‫2'),'\x54\x6e\x62\x73\x4b':_0x27de('‫3'),'\x6a\x79\x46\x4f\x50':_0x27de('‮4'),'\x61\x4c\x7a\x6b\x57':function(_0x3768db,_0x1db8ba){return _0x3768db(_0x1db8ba);},'\x56\x6b\x6e\x6f\x74':_0x27de('‫5')};return h5st=await _0x5180ad[_0x27de('‮2f')](geth5st,_0x5180ad[_0x27de('‮30')],_0x4bf9aa),opt={'\x75\x72\x6c':_0x27de('‮31')+h5st,'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x5180ad[_0x27de('‮32')],'\x41\x63\x63\x65\x70\x74':_0x5180ad[_0x27de('‫33')],'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x5180ad[_0x27de('‮34')],'\x43\x6f\x6f\x6b\x69\x65':cookie,'User-Agent':_0x27de('‫d')+$[_0x27de('‫e')]+_0x27de('‫f')+$[_0x27de('‫10')]+_0x27de('‫11'),'Accept-Language':_0x5180ad[_0x27de('‫35')],'\x52\x65\x66\x65\x72\x65\x72':_0x27de('‮13')+_0x5a230c+_0x27de('‮36')+_0x5180ad[_0x27de('‮37')](encodeURIComponent,$[_0x27de('‫15')]),'Accept-Encoding':_0x5180ad[_0x27de('‫38')]}},new Promise(_0x2c2848=>{var _0x1f470d={'\x69\x50\x64\x65\x78':function(_0x4c0bea){return _0x5180ad[_0x27de('‫39')](_0x4c0bea);},'\x42\x77\x65\x53\x57':function(_0x240905,_0x2118e5){return _0x5180ad[_0x27de('‫3a')](_0x240905,_0x2118e5);},'\x79\x6e\x59\x71\x72':_0x5180ad[_0x27de('‫3b')],'\x70\x6b\x4f\x75\x73':_0x5180ad[_0x27de('‮3c')],'\x5a\x65\x59\x6e\x58':function(_0x2ff734,_0x50b6d9){return _0x5180ad[_0x27de('‮3d')](_0x2ff734,_0x50b6d9);},'\x69\x58\x4d\x4f\x79':_0x5180ad[_0x27de('‫3e')],'\x6d\x56\x77\x79\x58':function(_0x43cb7f,_0x5f0fa8){return _0x5180ad[_0x27de('‮3d')](_0x43cb7f,_0x5f0fa8);},'\x50\x62\x4f\x41\x42':_0x5180ad[_0x27de('‫3f')],'\x4f\x78\x6d\x55\x66':_0x5180ad[_0x27de('‫40')],'\x49\x62\x44\x6d\x51':_0x5180ad[_0x27de('‫41')],'\x62\x64\x67\x73\x4d':_0x5180ad[_0x27de('‫42')],'\x5a\x4b\x78\x4a\x4e':_0x5180ad[_0x27de('‮43')]};$[_0x27de('‫1a')](opt,(_0x311afb,_0x3b7aab,_0x4c2873)=>{var _0x53384e={'\x6d\x4d\x51\x6b\x76':function(_0x26e196){return _0x1f470d[_0x27de('‫44')](_0x26e196);}};try{if(_0x1f470d[_0x27de('‮45')](_0x1f470d[_0x27de('‫46')],_0x1f470d[_0x27de('‮47')])){if(_0x311afb){if(_0x1f470d[_0x27de('‫48')](_0x1f470d[_0x27de('‫49')],_0x1f470d[_0x27de('‫49')])){console[_0x27de('‫1d')](_0x311afb);}else{console[_0x27de('‫1d')](error);}}else{if(_0x1f470d[_0x27de('‮4a')](_0x1f470d[_0x27de('‫4b')],_0x1f470d[_0x27de('‮4c')])){_0x53384e[_0x27de('‮4d')](_0x2c2848);}else{res=JSON[_0x27de('‫1e')](_0x4c2873);if(res[_0x27de('‮1f')]){if(_0x1f470d[_0x27de('‮4a')](_0x1f470d[_0x27de('‫4e')],_0x1f470d[_0x27de('‫4e')])){console[_0x27de('‫1d')](res);$[_0x27de('‫4f')]=res[_0x27de('‮50')];}else{console[_0x27de('‫1d')](_0x311afb);}}}}}else{Host=process[_0x27de('‮51')][_0x27de('‫52')];}}catch(_0x317968){if(_0x1f470d[_0x27de('‮4a')](_0x1f470d[_0x27de('‮53')],_0x1f470d[_0x27de('‮53')])){console[_0x27de('‫1d')](_0x317968);}else{$[_0x27de('‮22')]=res[_0x27de('‮20')][_0x27de('‮21')][0x0][_0x27de('‫23')][_0x27de('‮24')];}}finally{if(_0x1f470d[_0x27de('‮45')](_0x1f470d[_0x27de('‫54')],_0x1f470d[_0x27de('‫54')])){_0x1f470d[_0x27de('‫44')](_0x2c2848);}else{_0x1f470d[_0x27de('‫44')](_0x2c2848);}}});});}function geth5st(_0x1c2dc4,_0x38bbf9){var _0xad3eae={'\x76\x59\x42\x64\x48':function(_0xb6682a,_0x1dbeb1){return _0xb6682a===_0x1dbeb1;},'\x42\x4d\x46\x6b\x79':_0x27de('‮55'),'\x69\x75\x7a\x6b\x51':function(_0x521e0c,_0x1ffbd9){return _0x521e0c!==_0x1ffbd9;},'\x67\x48\x77\x45\x7a':_0x27de('‮56'),'\x53\x65\x4c\x46\x71':_0x27de('‮57'),'\x45\x6e\x58\x7a\x59':function(_0x4fa54e,_0x1f1dc2){return _0x4fa54e===_0x1f1dc2;},'\x50\x7a\x78\x71\x48':_0x27de('‮58'),'\x4e\x54\x41\x51\x50':function(_0x3fd51b,_0x32a444){return _0x3fd51b(_0x32a444);},'\x6b\x45\x71\x7a\x71':_0x27de('‫59'),'\x6a\x56\x58\x70\x71':_0x27de('‫5a'),'\x41\x6d\x4e\x72\x49':_0x27de('‮5b'),'\x71\x69\x42\x77\x67':_0x27de('‫5c'),'\x6c\x59\x56\x78\x6b':function(_0x2a05e2,_0x15824){return _0x2a05e2*_0x15824;},'\x44\x66\x5a\x6f\x68':_0x27de('‫5d'),'\x58\x43\x7a\x6e\x76':function(_0x46d10b,_0x5b5da1){return _0x46d10b*_0x5b5da1;}};return new Promise(async _0x573221=>{var _0x1c0efb={'\x4a\x47\x49\x4a\x4a':function(_0x30195c,_0x3fe97e){return _0xad3eae[_0x27de('‮5e')](_0x30195c,_0x3fe97e);},'\x63\x4c\x75\x59\x57':_0xad3eae[_0x27de('‫5f')],'\x4a\x65\x6d\x76\x48':function(_0x41b061,_0x2c0980){return _0xad3eae[_0x27de('‫60')](_0x41b061,_0x2c0980);},'\x54\x53\x65\x61\x46':_0xad3eae[_0x27de('‫61')],'\x66\x57\x66\x4f\x54':_0xad3eae[_0x27de('‮62')],'\x7a\x4f\x48\x74\x48':function(_0x1029f8,_0x21337a){return _0xad3eae[_0x27de('‮63')](_0x1029f8,_0x21337a);},'\x54\x5a\x6e\x42\x6a':_0xad3eae[_0x27de('‫64')],'\x6b\x47\x41\x51\x44':function(_0x1b9d1f,_0x3ee921){return _0xad3eae[_0x27de('‫65')](_0x1b9d1f,_0x3ee921);}};let _0x23db17={'\x61\x70\x70\x49\x64':_0xad3eae[_0x27de('‫66')],'\x62\x6f\x64\x79':{'\x61\x70\x70\x69\x64':_0xad3eae[_0x27de('‫67')],'\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64':_0x1c2dc4,'\x62\x6f\x64\x79':JSON[_0x27de('‫8')](_0x38bbf9),'\x63\x6c\x69\x65\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e':_0xad3eae[_0x27de('‫68')],'\x63\x6c\x69\x65\x6e\x74':'\x48\x35','\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64':$[_0x27de('‮24')]},'\x63\x61\x6c\x6c\x62\x61\x63\x6b\x41\x6c\x6c':!![]};let _0x2402da='';let _0x25911c=[_0xad3eae[_0x27de('‮69')]];if(process[_0x27de('‮51')][_0x27de('‫52')]){_0x2402da=process[_0x27de('‮51')][_0x27de('‫52')];}else{_0x2402da=_0x25911c[Math[_0x27de('‫6a')](_0xad3eae[_0x27de('‫6b')](Math[_0x27de('‫6c')](),_0x25911c[_0x27de('‮6d')]))];}let _0x5f5ad9={'\x75\x72\x6c':_0x27de('‮6e'),'\x62\x6f\x64\x79':JSON[_0x27de('‫8')](_0x23db17),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6f\x73\x74':_0x2402da,'Content-Type':_0xad3eae[_0x27de('‮6f')]},'\x74\x69\x6d\x65\x6f\x75\x74':_0xad3eae[_0x27de('‫70')](0x1e,0x3e8)};$[_0x27de('‮71')](_0x5f5ad9,async(_0x4a1749,_0x300e08,_0x23db17)=>{if(_0x1c0efb[_0x27de('‫72')](_0x1c0efb[_0x27de('‫73')],_0x1c0efb[_0x27de('‫73')])){try{if(_0x4a1749){if(_0x1c0efb[_0x27de('‮74')](_0x1c0efb[_0x27de('‮75')],_0x1c0efb[_0x27de('‮76')])){_0x23db17=await geth5st[_0x27de('‮77')](this,arguments);}else{if(res[_0x27de('‮20')][_0x27de('‮21')]){$[_0x27de('‮22')]=res[_0x27de('‮20')][_0x27de('‮21')][0x0][_0x27de('‫23')][_0x27de('‮24')];}}}else{}}catch(_0x580180){if(_0x1c0efb[_0x27de('‫78')](_0x1c0efb[_0x27de('‮79')],_0x1c0efb[_0x27de('‮79')])){$[_0x27de('‫7a')](_0x580180,_0x300e08);}else{if(_0x4a1749){console[_0x27de('‫1d')](_0x4a1749);}else{res=JSON[_0x27de('‫1e')](_0x23db17);if(res[_0x27de('‮1f')]){console[_0x27de('‫1d')](res);$[_0x27de('‫4f')]=res[_0x27de('‮50')];}}}}finally{_0x1c0efb[_0x27de('‫7b')](_0x573221,_0x23db17);}}else{res=JSON[_0x27de('‫1e')](_0x23db17);if(res[_0x27de('‮1f')]){console[_0x27de('‫1d')](res);$[_0x27de('‫4f')]=res[_0x27de('‮50')];}}});});};_0xod7='jsjiami.com.v6'; -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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_wish.js b/jd_wish.js index 1f92cc8ba..1a5c35133 100644 --- a/jd_wish.js +++ b/jd_wish.js @@ -5,17 +5,17 @@ ===============Quantumultx=============== [task_local] #众筹许愿池 -40 0,2 * * * https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +40 0,2 * * * https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true ================Loon============== [Script] -cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js,tag=众筹许愿池 +cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js,tag=众筹许愿池 ===============Surge================= -众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js +众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js ============小火箭========= -众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true +众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true */ const $ = new Env('众筹许愿池'); const notify = $.isNode() ? require('./sendNotify') : ''; @@ -25,8 +25,8 @@ let message = '', allMessage = ''; //IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = ''; const JD_API_HOST = 'https://api.m.jd.com/client.action'; -let appIdArr = ['1FFVQyqw','1EFRWxKuG', '1E1xZy6s']; -let appNameArr = ['1111点心动','许愿抽好礼', 'PLUS生活特权']; +let appIdArr = ['1EFBTxa6H','1FFVQyqw','1EFRWxKuG', '1E1xZy6s']; +let appNameArr = ['森林历险记','1111点心动','许愿抽好礼', 'PLUS生活特权']; let appId, appName; $.shareCode = []; if ($.isNode()) { @@ -72,7 +72,12 @@ if ($.isNode()) { if ($.isNode()) await notify.sendNotify($.name, allMessage); $.msg($.name, '', allMessage) } - let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/wish.json') + let res = await getAuthorShareCode('https://raw.githubusercontent.com/222222/11111128/master/shareCodes/11111127') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127') + } $.shareCode = [...$.shareCode, ...(res || [])] for (let i = 0; i < cookiesArr.length; i++) { if (cookiesArr[i]) { @@ -131,6 +136,7 @@ async function jd_wish() { await interact_template_getLotteryResult() await $.wait(2000) } + if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` } catch (e) { $.logErr(e) @@ -139,8 +145,7 @@ async function jd_wish() { async function healthyDay_getHomeData(type = true) { return new Promise(async resolve => { - // console.log(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 })); - $.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => { + $.post(taskUrl('healthyDay_getHomeData', {"appId":appId,"taskToken":"","channelId":1}), async (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -148,72 +153,47 @@ async function healthyDay_getHomeData(type = true) { } else { if (safeGet(data)) { data = JSON.parse(data); - // console.log(data); if (type) { - for (let key of Object.keys(data.data.result.hotTaskVos).reverse()) { - let vo = data.data.result.hotTaskVos[key] - if (vo.status !== 2) { - if (vo.taskType === 12) { - console.log(`点击热区`) - await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType) - } - }else { - console.log(`【${vo.taskName}】已完成\n`) - } - } for (let key of Object.keys(data.data.result.taskVos).reverse()) { let vo = data.data.result.taskVos[key] - if (vo.status !== 2) { + if (vo.status !== 2 && vo.status !== 0) { if (vo.taskType === 13 || vo.taskType === 12) { console.log(`签到`) - await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType) + await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType) } else if (vo.taskType === 1) { + $.complete = false; for (let key of Object.keys(vo.followShopVo)) { let followShopVo = vo.followShopVo[key] if (followShopVo.status !== 2) { console.log(`【${followShopVo.shopName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" }) - } - } - } else if (vo.taskType === 5) { - for (let key of Object.keys(vo.browseShopVo)) { - let browseShopVo = vo.browseShopVo[key] - if (browseShopVo.status !== 2) { - console.log(`【${browseShopVo.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" }) - } - } - } else if (vo.taskType === 15) { - for (let key of Object.keys(vo.productInfoVos)) { - let productInfoVos = vo.productInfoVos[key] - if (productInfoVos.status !== 2) { - console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":followShopVo.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; } } } else if (vo.taskType === 8) { + $.complete = false; for (let key of Object.keys(vo.productInfoVos)) { let productInfoVos = vo.productInfoVos[key] if (productInfoVos.status !== 2) { console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" }) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) await $.wait(vo.waitDuration * 1000) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; } } - } else if (vo.taskType === 27 && vo.taskId === 18) { - console.log(`【${vo.subTitleName}】`) - await harmony_collectScore({ "appId": appId, "taskToken": vo.productInfoVos[0].taskToken, "taskId": vo.taskId, "actionType": "0" }) } else if (vo.taskType === 9 || vo.taskType === 26) { + $.complete = false; for (let key of Object.keys(vo.shoppingActivityVos)) { let shoppingActivityVos = vo.shoppingActivityVos[key] if (shoppingActivityVos.status !== 2) { console.log(`【${shoppingActivityVos.title}】${vo.subTitleName}`) if (vo.taskType === 9) { - await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "1" }) + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) await $.wait(vo.waitDuration * 1000) } - await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; } } } else if (vo.taskType === 14) { @@ -254,7 +234,7 @@ function harmony_collectScore(body = {}, taskType = '') { if (data && data.data && data.data.bizCode === 0) { if (taskType === 13) { console.log(`签到成功:获得${data.data.result.score}金币\n`) - } else if (body.taskId == 5) { + } else if (body.taskId == 6) { console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`) } else { console.log(`完成任务:获得${data.data.result.score}金币\n`) @@ -262,12 +242,13 @@ function harmony_collectScore(body = {}, taskType = '') { } else { if (taskType === 13) { console.log(`签到失败:${data.data.bizMsg}\n`) - } else if (body.taskId == 5) { + } else if (body.taskId == 6) { console.log(`助力失败:${data.data.bizMsg || data.msg}\n`) if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false if (data.data.bizCode === 103) $.delcode = true } else { console.log(body.actionType === "0" ? `完成任务失败:${data.data.bizMsg}\n` : data.data.bizMsg) + if (data.data.bizMsg === "任务已完成") $.complete = true; } } } @@ -280,7 +261,6 @@ function harmony_collectScore(body = {}, taskType = '') { }) }) } - function interact_template_getLotteryResult() { return new Promise(resolve => { $.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => { @@ -436,4 +416,4 @@ function jsonParse(str) { } } // 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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file