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 = [];
let cookiesArr = [], cookie = '', token = '';
let UA, UAInfo = {};
let nowTimes;
const randomCount = $.isNode() ? 20 : 3;
$.appId = "92a36";
$.appId = 10032;
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item])
@@ -83,12 +84,12 @@ if ($.isNode()) {
await $.wait(2000);
}
}
// let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
// 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));
// await $.wait(1000)
// res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
// }
let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
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));
await $.wait(1000)
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
}
$.strMyShareIds = [...(res && res.shareId || [])]
await shareCodesFormat()
for (let i = 0; i < cookiesArr.length; i++) {
@@ -120,6 +121,7 @@ if ($.isNode()) {
async function cfd() {
try {
nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000)
let beginInfo = await getUserInfo();
if (beginInfo.LeadInfo.dwLeadType === 2) {
console.log(`还未开通活动,尝试初始化`)
@@ -134,10 +136,6 @@ async function cfd() {
}
}
if (!beginInfo.MarkList.daily_task_win) {
await setMark()
}
// 寻宝
console.log(`寻宝`)
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) {
return new Promise(async (resolve) => {
@@ -1163,8 +1142,7 @@ function getUserInfo(showInvite = true) {
LeadInfo = {},
StoryInfo = {},
Business = {},
XbStatus = {},
MarkList = {}
XbStatus = {}
} = data;
if (showInvite) {
console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`);
@@ -1185,8 +1163,7 @@ function getUserInfo(showInvite = true) {
dwLandLvl,
LeadInfo,
StoryInfo,
XbStatus,
MarkList
XbStatus
};
resolve({
buildInfo,
@@ -1195,8 +1172,7 @@ function getUserInfo(showInvite = true) {
strMyShareId,
LeadInfo,
StoryInfo,
XbStatus,
MarkList
XbStatus
});
}
} catch (e) {
@@ -1516,7 +1492,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"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,
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/",
"Cookie": cookie
"Cookie": cookie + "cid=4"
}
}
}
@@ -1574,7 +1550,7 @@ function showMsg() {
function readShareCode() {
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 {
if (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'
},
'body': JSON.stringify({
"version": "3.0",
"version": "1.0",
"fp": $.fingerprint,
"appId": $.appId.toString(),
"timestamp": Date.now(),

View File

@@ -564,7 +564,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"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",
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Cookie": cookie
"Cookie": cookie + "cid=4"
}
}
$.get(options, (err, resp, data) => {

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,6 @@ $.result = [];
$.shareCodes = [];
let cookiesArr = [], cookie = '', token = '';
let UA, UAInfo = {};
let nowTimes;
const randomCount = $.isNode() ? 20 : 3;
$.appId = "92a36";
if ($.isNode()) {
@@ -84,12 +83,12 @@ if ($.isNode()) {
await $.wait(2000);
}
}
// let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
// 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));
// await $.wait(1000)
// res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
// }
let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json')
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));
await $.wait(1000)
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json')
}
$.strMyShareIds = [...(res && res.shareId || [])]
await shareCodesFormat()
for (let i = 0; i < cookiesArr.length; i++) {
@@ -121,7 +120,6 @@ if ($.isNode()) {
async function cfd() {
try {
nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000)
let beginInfo = await getUserInfo();
if (beginInfo.LeadInfo.dwLeadType === 2) {
console.log(`还未开通活动,尝试初始化`)
@@ -136,6 +134,10 @@ async function cfd() {
}
}
if (!beginInfo.MarkList.daily_task_win) {
await setMark()
}
//抽奖
await $.wait(2000)
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) {
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 {
if (err) {
console.log(`${JSON.stringify(err)}`)
@@ -484,6 +505,7 @@ function getUserInfo(showInvite = true) {
dwLandLvl,
LeadInfo = {},
Business = {},
MarkList = {}
} = data;
if (showInvite) {
console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`);
@@ -501,12 +523,14 @@ function getUserInfo(showInvite = true) {
strMyShareId,
dwLandLvl,
LeadInfo,
MarkList
};
resolve({
ddwRichBalance,
ddwCoinBalance,
strMyShareId,
LeadInfo,
MarkList
});
}
} catch (e) {
@@ -601,7 +625,7 @@ function taskUrl(function_path, body = '', dwEnv = 7) {
"User-Agent": UA,
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Referer": "https://st.jingxi.com/",
"Cookie": cookie
"Cookie": cookie + "cid=4"
}
};
}
@@ -641,7 +665,7 @@ function showMsg() {
function readShareCode() {
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 {
if (err) {
console.log(JSON.stringify(err))
@@ -658,7 +682,7 @@ function readShareCode() {
resolve(data);
}
})
await $.wait(10000);
await $.wait(30 * 1000);
resolve()
})
}
@@ -688,7 +712,7 @@ function TotalBean() {
"User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0",
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Cookie": cookie
"Cookie": cookie + "cid=4"
}
}
$.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"});
return;
}
// let res = await getAuthorShareCode('')
// let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/connoisseur.json')
// 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)
// 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++) {
if (cookiesArr[i]) {
@@ -597,8 +597,13 @@ function getSign(functionId, body) {
"client":"apple",
"clientVersion":"10.3.0"
}
let Host = ""
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 = {
url: `https://cdn.nz.lu/ddo`,
body: JSON.stringify(data),

View File

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

File diff suppressed because one or more lines are too long