This commit is contained in:
Faker
2022-04-20 11:42:53 +08:00
parent 40470006d4
commit aa6e088da4
7 changed files with 84 additions and 78 deletions

View File

@@ -38,8 +38,9 @@ $.result = [];
$.shareCodes = []; $.shareCodes = [];
let cookiesArr = [], cookie = '', token = ''; let cookiesArr = [], cookie = '', token = '';
let UA, UAInfo = {}; let UA, UAInfo = {};
let nowTimes;
const randomCount = $.isNode() ? 20 : 3; const randomCount = $.isNode() ? 20 : 3;
$.appId = "92a36"; $.appId = 10032;
if ($.isNode()) { if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => { Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item]) cookiesArr.push(jdCookieNode[item])
@@ -83,12 +84,12 @@ if ($.isNode()) {
await $.wait(2000); await $.wait(2000);
} }
} }
// let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json') let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
// if (!res) { if (!res) {
// $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
// await $.wait(1000) await $.wait(1000)
// res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json') res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
// } }
$.strMyShareIds = [...(res && res.shareId || [])] $.strMyShareIds = [...(res && res.shareId || [])]
await shareCodesFormat() await shareCodesFormat()
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
@@ -120,6 +121,7 @@ if ($.isNode()) {
async function cfd() { async function cfd() {
try { try {
nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000)
let beginInfo = await getUserInfo(); let beginInfo = await getUserInfo();
if (beginInfo.LeadInfo.dwLeadType === 2) { if (beginInfo.LeadInfo.dwLeadType === 2) {
console.log(`还未开通活动,尝试初始化`) console.log(`还未开通活动,尝试初始化`)
@@ -134,10 +136,6 @@ async function cfd() {
} }
} }
if (!beginInfo.MarkList.daily_task_win) {
await setMark()
}
// 寻宝 // 寻宝
console.log(`寻宝`) console.log(`寻宝`)
let XBDetail = beginInfo.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0) let XBDetail = beginInfo.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0)
@@ -1123,25 +1121,6 @@ function getAuthorShareCode(url) {
}) })
} }
function setMark() {
return new Promise(resolve => {
$.get(taskUrl("user/SetMark", `strMark=daily_task_win&strValue=1&dwType=1`), (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`);
console.log(`${$.name} SetMark API请求失败请检查网路重试`);
} else {
data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]);
}
} catch (e) {
$.logErr(e, resp);
} finally{
resolve();
}
})
})
}
// 获取用户信息 // 获取用户信息
function getUserInfo(showInvite = true) { function getUserInfo(showInvite = true) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
@@ -1163,8 +1142,7 @@ function getUserInfo(showInvite = true) {
LeadInfo = {}, LeadInfo = {},
StoryInfo = {}, StoryInfo = {},
Business = {}, Business = {},
XbStatus = {}, XbStatus = {}
MarkList = {}
} = data; } = data;
if (showInvite) { if (showInvite) {
console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`);
@@ -1185,8 +1163,7 @@ function getUserInfo(showInvite = true) {
dwLandLvl, dwLandLvl,
LeadInfo, LeadInfo,
StoryInfo, StoryInfo,
XbStatus, XbStatus
MarkList
}; };
resolve({ resolve({
buildInfo, buildInfo,
@@ -1195,8 +1172,7 @@ function getUserInfo(showInvite = true) {
strMyShareId, strMyShareId,
LeadInfo, LeadInfo,
StoryInfo, StoryInfo,
XbStatus, XbStatus
MarkList
}); });
} }
} catch (e) { } catch (e) {
@@ -1516,7 +1492,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA, "User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/", "Referer": "https://st.jingxi.com/",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
} }
} }
@@ -1534,7 +1510,7 @@ function taskListUrl(function_path, body = '', bizCode = 'jxbfd') {
"User-Agent": UA, "User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/", "Referer": "https://st.jingxi.com/",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
} }
} }
@@ -1574,7 +1550,7 @@ function showMsg() {
function readShareCode() { function readShareCode() {
return new Promise(async resolve => { return new Promise(async resolve => {
$.get({url: ``, timeout: 30 * 1000}, (err, resp, data) => { $.get({url: `https://transfer.nz.lu/cfd`, timeout: 30 * 1000}, (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log(JSON.stringify(err)) console.log(JSON.stringify(err))
@@ -1740,7 +1716,7 @@ async function requestAlgo() {
'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7'
}, },
'body': JSON.stringify({ 'body': JSON.stringify({
"version": "3.0", "version": "1.0",
"fp": $.fingerprint, "fp": $.fingerprint,
"appId": $.appId.toString(), "appId": $.appId.toString(),
"timestamp": Date.now(), "timestamp": Date.now(),

View File

@@ -564,7 +564,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA, "User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/", "Referer": "https://st.jingxi.com/",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
}; };
} }
@@ -648,7 +648,7 @@ function TotalBean() {
"User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0",
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Accept-Encoding": "gzip, deflate, br", "Accept-Encoding": "gzip, deflate, br",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
} }
$.get(options, (err, resp, data) => { $.get(options, (err, resp, data) => {

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,6 @@ $.result = [];
$.shareCodes = []; $.shareCodes = [];
let cookiesArr = [], cookie = '', token = ''; let cookiesArr = [], cookie = '', token = '';
let UA, UAInfo = {}; let UA, UAInfo = {};
let nowTimes;
const randomCount = $.isNode() ? 20 : 3; const randomCount = $.isNode() ? 20 : 3;
$.appId = "92a36"; $.appId = "92a36";
if ($.isNode()) { if ($.isNode()) {
@@ -84,12 +83,12 @@ if ($.isNode()) {
await $.wait(2000); await $.wait(2000);
} }
} }
// let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json') let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
// if (!res) { if (!res) {
// $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
// await $.wait(1000) await $.wait(1000)
// res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json') res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
// } }
$.strMyShareIds = [...(res && res.shareId || [])] $.strMyShareIds = [...(res && res.shareId || [])]
await shareCodesFormat() await shareCodesFormat()
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
@@ -121,7 +120,6 @@ if ($.isNode()) {
async function cfd() { async function cfd() {
try { try {
nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000)
let beginInfo = await getUserInfo(); let beginInfo = await getUserInfo();
if (beginInfo.LeadInfo.dwLeadType === 2) { if (beginInfo.LeadInfo.dwLeadType === 2) {
console.log(`还未开通活动,尝试初始化`) console.log(`还未开通活动,尝试初始化`)
@@ -136,6 +134,10 @@ async function cfd() {
} }
} }
if (!beginInfo.MarkList.daily_task_win) {
await setMark()
}
//抽奖 //抽奖
await $.wait(2000) await $.wait(2000)
await composePearlState(4) await composePearlState(4)
@@ -466,10 +468,29 @@ function getAuthorShareCode(url) {
}) })
} }
function setMark() {
return new Promise(resolve => {
$.get(taskUrl("user/SetMark", `strMark=daily_task_win&strValue=1&dwType=1`), (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`);
console.log(`${$.name} SetMark API请求失败请检查网路重试`);
} else {
data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]);
}
} catch (e) {
$.logErr(e, resp);
} finally{
resolve();
}
})
})
}
// 获取用户信息 // 获取用户信息
function getUserInfo(showInvite = true) { function getUserInfo(showInvite = true) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
$.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task')}&strPgUUNum=${token['farm_jstoken']}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}`), async (err, resp, data) => { $.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task,cfd_has_show_selef_point,choose_goods_has_show,daily_task_win,new_user_task_win,guider_new_user_task,guider_daily_task_icon,guider_nn_task_icon,tool_layer,new_ask_friend_m')}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}&strPgUUNum=${token['farm_jstoken']}&strVersion=1.0.1&dwIsReJoin=1`), async (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log(`${JSON.stringify(err)}`) console.log(`${JSON.stringify(err)}`)
@@ -484,6 +505,7 @@ function getUserInfo(showInvite = true) {
dwLandLvl, dwLandLvl,
LeadInfo = {}, LeadInfo = {},
Business = {}, Business = {},
MarkList = {}
} = data; } = data;
if (showInvite) { if (showInvite) {
console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`);
@@ -501,12 +523,14 @@ function getUserInfo(showInvite = true) {
strMyShareId, strMyShareId,
dwLandLvl, dwLandLvl,
LeadInfo, LeadInfo,
MarkList
}; };
resolve({ resolve({
ddwRichBalance, ddwRichBalance,
ddwCoinBalance, ddwCoinBalance,
strMyShareId, strMyShareId,
LeadInfo, LeadInfo,
MarkList
}); });
} }
} catch (e) { } catch (e) {
@@ -601,7 +625,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA, "User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/", "Referer": "https://st.jingxi.com/",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
}; };
} }
@@ -641,7 +665,7 @@ function showMsg() {
function readShareCode() { function readShareCode() {
return new Promise(async resolve => { return new Promise(async resolve => {
$.get({url: `http://transfer.nz.lu/cfd`, timeout: 10000}, (err, resp, data) => { $.get({url: `https://transfer.nz.lu/cfd`, timeout: 30 * 1000}, (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log(JSON.stringify(err)) console.log(JSON.stringify(err))
@@ -658,7 +682,7 @@ function readShareCode() {
resolve(data); resolve(data);
} }
}) })
await $.wait(10000); await $.wait(30 * 1000);
resolve() resolve()
}) })
} }
@@ -688,7 +712,7 @@ function TotalBean() {
"User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0",
"Accept-Language": "zh-CN,zh-Hans;q=0.9", "Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Accept-Encoding": "gzip, deflate, br", "Accept-Encoding": "gzip, deflate, br",
"Cookie": cookie "Cookie": cookie + "cid=4"
} }
} }
$.get(options, (err, resp, data) => { $.get(options, (err, resp, data) => {

View File

@@ -43,11 +43,11 @@ let allMessage = '';
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
return; return;
} }
// let res = await getAuthorShareCode('') // let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/connoisseur.json')
// if (!res) { // if (!res) {
// $.http.get({url: ''}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); // $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/connoisseur.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
// await $.wait(1000) // await $.wait(1000)
// res = await getAuthorShareCode('') // res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/connoisseur.json')
// } // }
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) { if (cookiesArr[i]) {
@@ -597,8 +597,13 @@ function getSign(functionId, body) {
"client":"apple", "client":"apple",
"clientVersion":"10.3.0" "clientVersion":"10.3.0"
} }
let Host = ""
let HostArr = ['jdsign.cf', 'signer.nz.lu'] let HostArr = ['jdsign.cf', 'signer.nz.lu']
let Host = HostArr[Math.floor((Math.random() * HostArr.length))] if (process.env.SIGN_URL) {
Host = process.env.SIGN_URL
} else {
Host = HostArr[Math.floor((Math.random() * HostArr.length))]
}
let options = { let options = {
url: `https://cdn.nz.lu/ddo`, url: `https://cdn.nz.lu/ddo`,
body: JSON.stringify(data), body: JSON.stringify(data),

View File

@@ -25,12 +25,12 @@ let vender=''
let num=0 let num=0
let shopname='' let shopname=''
const token = [ const token = [
"4BF0331BCB845ABC79145753E605E9C3", "E1974F092C323D0FB3EA093E195A4A40",
"7D8DF37F588D261C59994A1C6F472ABA", "7D8DF37F588D261C59994A1C6F472ABA",
"07D72B6BEC5DDC95E475D019FA89F39D", "07D72B6BEC5DDC95E475D019FA89F39D",
"0950F5FA76B0EC70FD8E3CA4E0B9FABF", "0950F5FA76B0EC70FD8E3CA4E0B9FABF",
"EE60F07CE497C8C2915262C4A681016A", "38DDCA7B4553BA7F731D42612874F8D6",
"E08EA466C50A0C894FE750FB54B5B1B6", "9C2276934989E299A296A29A87A3E137",
"E20BD5091D8F70B4649D529A09183F04", "E20BD5091D8F70B4649D529A09183F04",
"65761481817B9111E49E939888419250", "65761481817B9111E49E939888419250",
"6441D5406FD81386379AED19FA122DBE", "6441D5406FD81386379AED19FA122DBE",
@@ -38,18 +38,17 @@ const token = [
"D5D7E1A6A35DD6DF590F1D26183C0D40", "D5D7E1A6A35DD6DF590F1D26183C0D40",
"31D76EB23737B3BF03EBDCC06EA2B9EC", "31D76EB23737B3BF03EBDCC06EA2B9EC",
"3705013F73CEEA8CB2311DB6607046FE", "3705013F73CEEA8CB2311DB6607046FE",
"50EFAF0B1C9520C4AC3FFBFE6B9C13F8", "FD78AA7B8266ACD77D2D998CDEA11D5C",
"903DFFB65088484F7743B5F437BB1649", "903DFFB65088484F7743B5F437BB1649",
"3FCA9C124FC3A1D02D4191696590DC92", "8A23628E464CDA812A74D67C17EC601C",
"41AFADC9C4AF8807DEC071FE688596FB", "41AFADC9C4AF8807DEC071FE688596FB",
"CE544106AB7A796944BC56B403ED02A1", "5756464E7C6CF04B89E34C3CCA85CA7F",
"62F921549D1B7244101CCC5AFBC2E952", "62F921549D1B7244101CCC5AFBC2E952",
"A3B3E3A15E365F2F5709618D27C9DDCD", "A3B3E3A15E365F2F5709618D27C9DDCD",
"FE30AB00038CFFEF00DA9E9B8E932721", "FE30AB00038CFFEF00DA9E9B8E932721",
"F0C24D7588D90922393B423C6623F31A", "F0C24D7588D90922393B423C6623F31A",
"DFD953F3D54DAE2721568457FE12068C", "DFD953F3D54DAE2721568457FE12068C",
"3DEACB6A49D5954B134A6C4DE73FEF42", "3DEACB6A49D5954B134A6C4DE73FEF42"
"634E143046CCD9EBAA298A70B7672A63"
] ]
if ($.isNode()) { if ($.isNode()) {

View File

@@ -67,9 +67,11 @@ async function jdsign() {
await $.wait(2000) await $.wait(2000)
await getInfo("https://pro.m.jd.com/mall/active/kPM3Xedz1PBiGQjY4ZYGmeVvrts/index.html");//陪伴 await getInfo("https://pro.m.jd.com/mall/active/kPM3Xedz1PBiGQjY4ZYGmeVvrts/index.html");//陪伴
await $.wait(2000) await $.wait(2000)
await getInfo("https://pro.m.jd.com/mall/active/3SC6rw5iBg66qrXPGmZMqFDwcyXi/index.html");//京东图书 //await getInfo("https://pro.m.jd.com/mall/active/3SC6rw5iBg66qrXPGmZMqFDwcyXi/index.html");//京东图书
//await $.wait(2000)
await getInfo("https://prodev.m.jd.com/mall/active/hPJiMgUQmc34bamrApLUBRUy82W/index.html");//4.3结束
await $.wait(2000) await $.wait(2000)
await getInfo("https://prodev.m.jd.com/mall/active/412SRRXnKE1Q4Y6uJRWVT6XhyseG/index.html");//京东服装 await getInfo("https://prodev.m.jd.com/mall/active/2FzVtkSfUtvU8YoiTeALkJ68PxAs/index.html");//医疗馆 12.31结束
// await getInfo("https://pro.m.jd.com/mall/active/ZrH7gGAcEkY2gH8wXqyAPoQgk6t/index.html");//箱包签到 // await getInfo("https://pro.m.jd.com/mall/active/ZrH7gGAcEkY2gH8wXqyAPoQgk6t/index.html");//箱包签到
// await $.wait(1000) // await $.wait(1000)
// await getInfo("https://pro.m.jd.com/mall/active/4RXyb1W4Y986LJW8ToqMK14BdTD/index.html");//鞋靴馆签到 // await getInfo("https://pro.m.jd.com/mall/active/4RXyb1W4Y986LJW8ToqMK14BdTD/index.html");//鞋靴馆签到
@@ -106,7 +108,7 @@ async function getInfo(url) {
// 签到 // 签到
async function doInteractiveAssignment(encryptProjectId, AssignmentId) { async function doInteractiveAssignment(encryptProjectId, AssignmentId) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
$.post(taskUrl("doInteractiveAssignment", { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": "aceaceqingzhan", "itemId": "1", "actionType": "", "completionFlag": "true", "ext": {} }), async (err, resp, data) => { $.post(taskUrl("doInteractiveAssignment", { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": "acetttsign", "itemId": "1", "actionType": "", "completionFlag": "true", "ext": {} }), async (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log(`${JSON.stringify(err)}`) console.log(`${JSON.stringify(err)}`)