mirror of
https://github.com/okyyds/yyds.git
synced 2026-07-13 04:11:18 +08:00
update
This commit is contained in:
2325
jd_bean_sign.js
2325
jd_bean_sign.js
File diff suppressed because one or more lines are too long
45
jd_cash.js
45
jd_cash.js
@@ -128,12 +128,10 @@ async function jdCash() {
|
|||||||
|
|
||||||
async function appindex(info=false) {
|
async function appindex(info=false) {
|
||||||
let functionId = "cash_homePage"
|
let functionId = "cash_homePage"
|
||||||
let body = "%7B%7D"
|
let body = {}
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `${JD_API_HOST}?functionId=${functionId}&build=167774&client=apple&clientVersion=10.1.0&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
$.post(apptaskUrl(url, body), async (err, resp, data) => {
|
$.post(apptaskUrl(functionId, sign), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -296,12 +294,10 @@ function helpFriend(helpInfo) {
|
|||||||
|
|
||||||
async function appdoTask(type,taskInfo) {
|
async function appdoTask(type,taskInfo) {
|
||||||
let functionId = 'cash_doTask'
|
let functionId = 'cash_doTask'
|
||||||
let body = escape(JSON.stringify({"type":type,"taskInfo":taskInfo}))
|
let body = {"type":type,"taskInfo":taskInfo}
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `${JD_API_HOST}?functionId=${functionId}&build=167774&client=apple&clientVersion=10.1.0&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
$.post(apptaskUrl(url, body), (err, resp, data) => {
|
$.post(apptaskUrl(functionId, sign), (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -437,20 +433,21 @@ function exchange2(node) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getSign(functionid, body, uuid) {
|
function getSign(functionId, body) {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let data = {
|
let data = {
|
||||||
"functionId":functionid,
|
functionId,
|
||||||
"body":body,
|
body: JSON.stringify(body),
|
||||||
"uuid":uuid,
|
|
||||||
"client":"apple",
|
"client":"apple",
|
||||||
"clientVersion":"10.1.0"
|
"clientVersion":"10.3.0"
|
||||||
}
|
}
|
||||||
|
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
||||||
|
let 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),
|
||||||
headers: {
|
headers: {
|
||||||
"Host": "jdsign.cf",
|
Host,
|
||||||
"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"
|
"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"
|
||||||
},
|
},
|
||||||
timeout: 30 * 1000
|
timeout: 30 * 1000
|
||||||
@@ -526,10 +523,10 @@ function shareCodesFormat() {
|
|||||||
let authorCode = deepCopy($.authorCode)
|
let authorCode = deepCopy($.authorCode)
|
||||||
$.newShareCodes = [...(authorCode.map((item, index) => authorCode[index] = item['inviteCode'])), ...$.newShareCodes];
|
$.newShareCodes = [...(authorCode.map((item, index) => authorCode[index] = item['inviteCode'])), ...$.newShareCodes];
|
||||||
}
|
}
|
||||||
const readShareCodeRes = await readShareCode();
|
// const readShareCodeRes = await readShareCode();
|
||||||
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
// if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||||
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
// $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||||
}
|
// }
|
||||||
$.newShareCodes.map((item, index) => $.newShareCodes[index] = { "inviteCode": item, "shareDate": $.shareDate })
|
$.newShareCodes.map((item, index) => $.newShareCodes[index] = { "inviteCode": item, "shareDate": $.shareDate })
|
||||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||||
resolve();
|
resolve();
|
||||||
@@ -583,10 +580,10 @@ function deepCopy(obj) {
|
|||||||
return objClone;
|
return objClone;
|
||||||
}
|
}
|
||||||
|
|
||||||
function apptaskUrl(url, body) {
|
function apptaskUrl(functionId = "", body = "") {
|
||||||
return {
|
return {
|
||||||
url,
|
url: `${JD_API_HOST}?functionId=${functionId}`,
|
||||||
body: `body=${body}`,
|
body,
|
||||||
headers: {
|
headers: {
|
||||||
'Cookie': cookie,
|
'Cookie': cookie,
|
||||||
'Host': 'api.m.jd.com',
|
'Host': 'api.m.jd.com',
|
||||||
@@ -601,7 +598,7 @@ function apptaskUrl(url, body) {
|
|||||||
}
|
}
|
||||||
function taskUrl(functionId, body = {}) {
|
function taskUrl(functionId, body = {}) {
|
||||||
return {
|
return {
|
||||||
url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`,
|
url: `${JD_API_HOST}?functionId=${functionId}&body=${encodeURIComponent(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`,
|
||||||
headers: {
|
headers: {
|
||||||
'Cookie': cookie,
|
'Cookie': cookie,
|
||||||
'Host': 'api.m.jd.com',
|
'Host': 'api.m.jd.com',
|
||||||
|
|||||||
40
jd_ccSign.js
40
jd_ccSign.js
@@ -81,12 +81,10 @@ async function jdSign() {
|
|||||||
|
|
||||||
async function getCouponConfig() {
|
async function getCouponConfig() {
|
||||||
let functionId = `getCouponConfig`
|
let functionId = `getCouponConfig`
|
||||||
let body = escape(JSON.stringify({"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","incentiveShowTimes":0,"monitorRefer":"","monitorSource":"ccresource_android_index_config","pageClickKey":"Coupons_GetCenter","rewardShowTimes":0,"sourceFrom":"1"}))
|
let body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","incentiveShowTimes":0,"monitorRefer":"","monitorSource":"ccresource_android_index_config","pageClickKey":"Coupons_GetCenter","rewardShowTimes":0,"sourceFrom":"1"}
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `${JD_API_HOST}?functionId=${functionId}&client=android&clientVersion=10.1.2&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
$.post(taskUrl(url, body), async (err, resp, data) => {
|
$.post(taskUrl(functionId, sign), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -101,7 +99,7 @@ async function getCouponConfig() {
|
|||||||
} else {
|
} else {
|
||||||
let pin = await getsecretPin($.UserName)
|
let pin = await getsecretPin($.UserName)
|
||||||
functionId = `ccSignInNecklace`
|
functionId = `ccSignInNecklace`
|
||||||
body = escape(JSON.stringify({"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","sessionId":"","signature":data.result.couponConfig.signNecklaceDomain.signature,"pin":pin,"verifyToken":""}))
|
body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","sessionId":"","signature":data.result.couponConfig.signNecklaceDomain.signature,"pin":pin,"verifyToken":""}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (data.result.couponConfig.signNewDomain.roundData.ynSign === '1') {
|
if (data.result.couponConfig.signNewDomain.roundData.ynSign === '1') {
|
||||||
@@ -109,7 +107,7 @@ async function getCouponConfig() {
|
|||||||
} else {
|
} else {
|
||||||
let pin = await getsecretPin($.UserName)
|
let pin = await getsecretPin($.UserName)
|
||||||
functionId = `ccSignInNew`
|
functionId = `ccSignInNew`
|
||||||
body = escape(JSON.stringify({"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","pin":pin}))
|
body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","pin":pin}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (functionId && body) await ccSign(functionId, body)
|
if (functionId && body) await ccSign(functionId, body)
|
||||||
@@ -124,11 +122,9 @@ async function getCouponConfig() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
async function ccSign(functionId, body) {
|
async function ccSign(functionId, body) {
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `${JD_API_HOST}?functionId=${functionId}&client=android&clientVersion=10.1.2&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
$.post(taskUrl(url, body), async (err, resp, data) => {
|
$.post(taskUrl(functionId, sign), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -151,14 +147,13 @@ async function ccSign(functionId, body) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getSign(functionid, body, uuid) {
|
function getSign(functionId, body) {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let data = {
|
let data = {
|
||||||
"functionId":functionid,
|
functionId,
|
||||||
"body":body,
|
body: JSON.stringify(body),
|
||||||
"uuid":uuid,
|
|
||||||
"client":"android",
|
"client":"android",
|
||||||
"clientVersion":"10.1.2"
|
"clientVersion":"10.3.2"
|
||||||
}
|
}
|
||||||
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
||||||
let Host = HostArr[Math.floor((Math.random() * HostArr.length))]
|
let Host = HostArr[Math.floor((Math.random() * HostArr.length))]
|
||||||
@@ -231,10 +226,10 @@ function showMsg() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function taskUrl(url, body) {
|
function taskUrl(functionId, body) {
|
||||||
return {
|
return {
|
||||||
url,
|
url: `${JD_API_HOST}?functionId=${functionId}`,
|
||||||
body: `body=${body}`,
|
body,
|
||||||
headers: {
|
headers: {
|
||||||
"Host": "api.m.jd.com",
|
"Host": "api.m.jd.com",
|
||||||
"Connection": "keep-alive",
|
"Connection": "keep-alive",
|
||||||
@@ -248,13 +243,6 @@ function taskUrl(url, body) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function randomString(e) {
|
|
||||||
e = e || 32;
|
|
||||||
let t = "abcdefghijklmnopqrstuvwxyz0123456789", a = t.length, n = "";
|
|
||||||
for (let i = 0; i < e; i++)
|
|
||||||
n += t.charAt(Math.floor(Math.random() * a));
|
|
||||||
return n
|
|
||||||
}
|
|
||||||
|
|
||||||
function TotalBean() {
|
function TotalBean() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
|
|||||||
40
jd_live.js
40
jd_live.js
@@ -134,12 +134,10 @@ function getTaskList() {
|
|||||||
|
|
||||||
async function getauthorId(liveId) {
|
async function getauthorId(liveId) {
|
||||||
let functionId = `liveDetailV910`
|
let functionId = `liveDetailV910`
|
||||||
let body = escape(JSON.stringify({"liveId":liveId,"fromId":"","liveList":[],"sku":"","source":"17","d":"","direction":"","isNeedVideo":1}))
|
let body = {"liveId":liveId,"fromId":"","liveList":[],"sku":"","source":"17","d":"","direction":"","isNeedVideo":1}
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `https://api.m.jd.com/client.action?functionId=${functionId}&build=167774&client=apple&clientVersion=10.1.0&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.post(taskPostUrl(functionId, body, url), async (err, resp, data) => {
|
$.post(taskPostUrl(functionId, sign), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -160,12 +158,10 @@ async function getauthorId(liveId) {
|
|||||||
|
|
||||||
async function superTask(liveId, authorId) {
|
async function superTask(liveId, authorId) {
|
||||||
let functionId = `liveChannelReportDataV912`
|
let functionId = `liveChannelReportDataV912`
|
||||||
let body = escape(JSON.stringify({"liveId":liveId,"type":"viewTask","authorId":authorId,"extra":{"time":60}}))
|
let body = {"liveId":liveId,"type":"viewTask","authorId":authorId,"extra":{"time":60}}
|
||||||
let uuid = randomString(16)
|
let sign = await getSign(functionId, body)
|
||||||
let sign = await getSign(functionId, decodeURIComponent(body), uuid)
|
|
||||||
let url = `https://api.m.jd.com/client.action?functionId=${functionId}&build=167774&client=apple&clientVersion=10.1.0&uuid=${uuid}&${sign}`
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.post(taskPostUrl(functionId, body, url), async (err, resp, data) => {
|
$.post(taskPostUrl(functionId, sign), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -282,14 +278,13 @@ function sign() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSign(functionid, body, uuid) {
|
function getSign(functionId, body) {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let data = {
|
let data = {
|
||||||
"functionId":functionid,
|
functionId,
|
||||||
"body":body,
|
body: JSON.stringify(body),
|
||||||
"uuid":uuid,
|
client: "apple",
|
||||||
"client":"apple",
|
clientVersion: "10.3.0"
|
||||||
"clientVersion":"10.1.0"
|
|
||||||
}
|
}
|
||||||
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
||||||
let Host = HostArr[Math.floor((Math.random() * HostArr.length))]
|
let Host = HostArr[Math.floor((Math.random() * HostArr.length))]
|
||||||
@@ -319,12 +314,10 @@ function getSign(functionid, body, uuid) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function taskPostUrl(function_id, body = {}, url=null) {
|
function taskPostUrl(function_id, body = "") {
|
||||||
if (url && (function_id === "liveChannelReportDataV912" || function_id === "liveDetailV910")) body = `body=${body}`
|
|
||||||
if(!url) url = `https://api.m.jd.com/client.action?functionId=${function_id}`
|
|
||||||
return {
|
return {
|
||||||
url: url,
|
url: `https://api.m.jd.com/client.action?functionId=${function_id}`,
|
||||||
body: body,
|
body,
|
||||||
headers: {
|
headers: {
|
||||||
"Host": "api.m.jd.com",
|
"Host": "api.m.jd.com",
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
@@ -332,8 +325,7 @@ function taskPostUrl(function_id, body = {}, url=null) {
|
|||||||
"Referer": "",
|
"Referer": "",
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
"Origin": "https://h5.m.jd.com",
|
"Origin": "https://h5.m.jd.com",
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
"Content-Type": 'application/x-www-form-urlencoded',
|
||||||
"Content-Length": "996",
|
|
||||||
"User-Agent": "JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)",
|
"User-Agent": "JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)",
|
||||||
"Accept-Language": "zh-Hans-CN;q=1",
|
"Accept-Language": "zh-Hans-CN;q=1",
|
||||||
"Accept-Encoding": "gzip, deflate, br"
|
"Accept-Encoding": "gzip, deflate, br"
|
||||||
@@ -342,7 +334,7 @@ function taskPostUrl(function_id, body = {}, url=null) {
|
|||||||
}
|
}
|
||||||
function taskUrl(function_id, body = {}) {
|
function taskUrl(function_id, body = {}) {
|
||||||
return {
|
return {
|
||||||
url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${escape(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}&uuid=${uuid}`,
|
url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${encodeURIComponent(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}&uuid=${uuid}`,
|
||||||
headers: {
|
headers: {
|
||||||
"Host": "api.m.jd.com",
|
"Host": "api.m.jd.com",
|
||||||
"Accept": "application/json, text/plain, */*",
|
"Accept": "application/json, text/plain, */*",
|
||||||
|
|||||||
Reference in New Issue
Block a user