mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
50adef6581
commit
65c8236fe0
@ -140,6 +140,10 @@ if(WP_APP_TOKEN_ONE)
|
||||
else
|
||||
console.log(`检测到未配置Wxpusher的Token,禁用一对一推送...`);
|
||||
|
||||
let jdSignUrl = 'https://api.nolanstore.top/sign'
|
||||
if (process.env.SIGNURL)
|
||||
jdSignUrl = process.env.SIGNURL;
|
||||
|
||||
if ($.isNode() && process.env.BEANCHANGE_PERSENT) {
|
||||
intPerSent = parseInt(process.env.BEANCHANGE_PERSENT);
|
||||
console.log(`检测到设定了分段通知:` + intPerSent);
|
||||
@ -989,7 +993,7 @@ async function bean() {
|
||||
}
|
||||
|
||||
if (EnableOverBean) {
|
||||
await queryexpirejingdou(); //过期京豆
|
||||
await jingBeanDetail(); //过期京豆
|
||||
}
|
||||
await redPacket();
|
||||
if (EnableChaQuan)
|
||||
@ -1070,7 +1074,7 @@ async function jdCash() {
|
||||
if (!EnableCash)
|
||||
return;
|
||||
let functionId = "cash_homePage";
|
||||
let sign = `body=%7B%7D&build=167968&client=apple&clientVersion=10.4.0&d_brand=apple&d_model=iPhone13%2C3&ef=1&eid=eidI25488122a6s9Uqq6qodtQx6rgQhFlHkaE1KqvCRbzRnPZgP/93P%2BzfeY8nyrCw1FMzlQ1pE4X9JdmFEYKWdd1VxutadX0iJ6xedL%2BVBrSHCeDGV1&ep=%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22screen%22%3A%22CJO3CMeyDJCy%22%2C%22osVersion%22%3A%22CJUkDK%3D%3D%22%2C%22openudid%22%3A%22CJSmCWU0DNYnYtS0DtGmCJY0YJcmDwCmYJC0DNHwZNc5ZQU2DJc3Zq%3D%3D%22%2C%22area%22%3A%22CJZpCJCmC180ENcnCv80ENc1EK%3D%3D%22%2C%22uuid%22%3A%22aQf1ZRdxb2r4ovZ1EJZhcxYlVNZSZz09%22%7D%2C%22ts%22%3A1648428189%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%2C%22pvcStu%22%3A%221%22%7D&isBackground=N&joycious=104&lang=zh_CN&networkType=3g&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=11&sign=98c0ea91318ef1313786d86d832f1d4d&st=1648428208392&sv=101&uemps=0-0&uts=0f31TVRjBSv7E8yLFU2g86XnPdLdKKyuazYDek9RnAdkKCbH50GbhlCSab3I2jwM04d75h5qDPiLMTl0I3dvlb3OFGnqX9NrfHUwDOpTEaxACTwWl6n//EOFSpqtKDhg%2BvlR1wAh0RSZ3J87iAf36Ce6nonmQvQAva7GoJM9Nbtdah0dgzXboUL2m5YqrJ1hWoxhCecLcrUWWbHTyAY3Rw%3D%3D`
|
||||
let sign = await getSignfromNolan(functionId, {});
|
||||
return new Promise((resolve) => {
|
||||
$.post(apptaskUrl(functionId, sign), async (err, resp, data) => {
|
||||
try {
|
||||
@ -1283,51 +1287,89 @@ function getJingBeanBalanceDetail(page) {
|
||||
})
|
||||
}
|
||||
|
||||
function queryexpirejingdou() {
|
||||
function jingBeanDetail() {
|
||||
return new Promise(async resolve => {
|
||||
setTimeout(async () => {
|
||||
const strsign = await getSignfromNolan('jingBeanDetail', {"pageSize": "20", "page": "1"});
|
||||
const options = {
|
||||
"url": `https://wq.jd.com/activep3/singjd/queryexpirejingdou?_=${Date.now()}&g_login_type=1&sceneval=2`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "wq.jd.com",
|
||||
"Referer": "https://wqs.jd.com/promote/201801/bean/mybean.html",
|
||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1"
|
||||
}
|
||||
"url": `https://api.m.jd.com/client.action?functionId=jingBeanDetail`,
|
||||
"body": strsign,
|
||||
"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"),
|
||||
'Host': 'api.m.jd.com',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Cookie': cookie,
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`queryexpirejingdou API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (data) {
|
||||
// console.log(data)
|
||||
data = JSON.parse(data.slice(23, -13));
|
||||
if (data.ret === 0) {
|
||||
data['expirejingdou'].map(item => {
|
||||
if(item['expireamount']!=0){
|
||||
strGuoqi+=`【${timeFormat(item['time'] * 1000)}】过期${item['expireamount']}豆\n`;
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log(`京东服务器返回空数据`)
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} getJingBeanBalanceDetail API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (data) {
|
||||
data = JSON.parse(data);
|
||||
if (data?.others?.jingBeanExpiringInfo?.detailList) {
|
||||
const { detailList = [] } = data?.others?.jingBeanExpiringInfo;
|
||||
detailList.map(item => {
|
||||
strGuoqi+=`【${(item['eventMassage']).replace("即将过期京豆","").replace("年","-").replace("月","-").replace("日","")}】过期${item['amount']}豆\n`;
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
}
|
||||
finally {
|
||||
resolve();
|
||||
} else {
|
||||
console.log(`jingBeanDetail 京东服务器返回空数据`)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
}, 0 * 1000);
|
||||
})
|
||||
}
|
||||
|
||||
function getSignfromNolan(functionId, body) {
|
||||
var strsign = '';
|
||||
let data = {
|
||||
"fn":functionId,
|
||||
"body": body
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
let url = {
|
||||
url: jdSignUrl,
|
||||
body: JSON.stringify(data),
|
||||
followRedirect: false,
|
||||
headers: {
|
||||
'Accept': '*/*',
|
||||
"accept-encoding": "gzip, deflate, br",
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
timeout: 30000
|
||||
}
|
||||
$.post(url, async(err, resp, data) => {
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
if (data && data.body) {
|
||||
if (data.body)
|
||||
strsign = data.body || '';
|
||||
if (strsign != '')
|
||||
resolve(strsign);
|
||||
else
|
||||
console.log("签名获取失败.");
|
||||
} else {
|
||||
console.log("签名获取失败.");
|
||||
}
|
||||
}catch (e) {
|
||||
$.logErr(e, resp);
|
||||
}finally {
|
||||
resolve(strsign);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function redPacket() {
|
||||
return new Promise(async resolve => {
|
||||
const options = {
|
||||
@ -1795,50 +1837,27 @@ function cash() {
|
||||
})
|
||||
}
|
||||
|
||||
var __Oxb24bc = ["lite-android&", "stringify", "&android&3.1.0&", "&", "&846c4c32dae910ef", "12aea658f76e453faf803d15c40a72e0", "isNode", "crypto-js", "", "api?functionId=", "&body=", "&appid=lite-android&client=android&uuid=846c4c32dae910ef&clientVersion=3.1.0&t=", "&sign=", "api.m.jd.com", "*/*", "RN", "JDMobileLite/3.1.0 (iPad; iOS 14.4; Scale/2.00)", "zh-Hans-CN;q=1, ja-CN;q=0.9", "undefined", "log", "", "", "", "", "jsjia", "mi.com"];
|
||||
|
||||
function taskcashUrl(_0x7683x2, _0x7683x3 = {}) {
|
||||
let _0x7683x4 = +new Date();
|
||||
let _0x7683x5 = `${__Oxb24bc[0x0]}${JSON[__Oxb24bc[0x1]](_0x7683x3)}${__Oxb24bc[0x2]}${_0x7683x2}${__Oxb24bc[0x3]}${_0x7683x4}${__Oxb24bc[0x4]}`;
|
||||
let _0x7683x6 = __Oxb24bc[0x5];
|
||||
const _0x7683x7 = $[__Oxb24bc[0x6]]() ? require(__Oxb24bc[0x7]) : CryptoJS;
|
||||
let _0x7683x8 = _0x7683x7.HmacSHA256(_0x7683x5, _0x7683x6).toString();
|
||||
function taskcashUrl(functionId, body = {}) {
|
||||
const struuid = randomString(16);
|
||||
let nowTime = Date.now();
|
||||
let _0x7683x5 = `${"lite-android&"}${JSON["stringify"](body)}${"&android&3.1.0&"}${functionId}&${nowTime}&${struuid}`;
|
||||
let _0x7683x6 = "12aea658f76e453faf803d15c40a72e0";
|
||||
const _0x7683x7 = $["isNode"]() ? require("crypto-js") : CryptoJS;
|
||||
let sign = _0x7683x7.HmacSHA256(_0x7683x5, _0x7683x6).toString();
|
||||
let strurl=JD_API_HOST+"api?functionId="+functionId+"&body="+`${escape(JSON["stringify"](body))}&appid=lite-android&client=android&uuid=`+struuid+`&clientVersion=3.1.0&t=${nowTime}&sign=${sign}`;
|
||||
return {
|
||||
url: `${__Oxb24bc[0x8]}${JD_API_HOST}${__Oxb24bc[0x9]}${_0x7683x2}${__Oxb24bc[0xa]}${escape(JSON[__Oxb24bc[0x1]](_0x7683x3))}${__Oxb24bc[0xb]}${_0x7683x4}${__Oxb24bc[0xc]}${_0x7683x8}${__Oxb24bc[0x8]}`,
|
||||
url: strurl,
|
||||
headers: {
|
||||
'Host': __Oxb24bc[0xd],
|
||||
'accept': __Oxb24bc[0xe],
|
||||
'kernelplatform': __Oxb24bc[0xf],
|
||||
'user-agent': __Oxb24bc[0x10],
|
||||
'accept-language': __Oxb24bc[0x11],
|
||||
'Host': "api.m.jd.com",
|
||||
'accept': "*/*",
|
||||
'kernelplatform': "RN",
|
||||
'user-agent': "JDMobileLite/3.1.0 (iPad; iOS 14.4; Scale/2.00)",
|
||||
'accept-language': "zh-Hans-CN;q=1, ja-CN;q=0.9",
|
||||
'Cookie': cookie
|
||||
},
|
||||
timeout: 10000
|
||||
}
|
||||
}
|
||||
(function (_0x7683x9, _0x7683xa, _0x7683xb, _0x7683xc, _0x7683xd, _0x7683xe) {
|
||||
_0x7683xe = __Oxb24bc[0x12];
|
||||
_0x7683xc = function (_0x7683xf) {
|
||||
if (typeof alert !== _0x7683xe) {
|
||||
alert(_0x7683xf)
|
||||
};
|
||||
if (typeof console !== _0x7683xe) {
|
||||
console[__Oxb24bc[0x13]](_0x7683xf)
|
||||
}
|
||||
};
|
||||
_0x7683xb = function (_0x7683x7, _0x7683x9) {
|
||||
return _0x7683x7 + _0x7683x9
|
||||
};
|
||||
_0x7683xd = _0x7683xb(__Oxb24bc[0x14], _0x7683xb(_0x7683xb(__Oxb24bc[0x15], __Oxb24bc[0x16]), __Oxb24bc[0x17]));
|
||||
try {
|
||||
_0x7683x9 = __encode;
|
||||
if (!(typeof _0x7683x9 !== _0x7683xe && _0x7683x9 === _0x7683xb(__Oxb24bc[0x18], __Oxb24bc[0x19]))) {
|
||||
_0x7683xc(_0x7683xd)
|
||||
}
|
||||
} catch (e) {
|
||||
_0x7683xc(_0x7683xd)
|
||||
}
|
||||
})({})
|
||||
|
||||
function taskJxUrl(functionId, body = '') {
|
||||
let url = ``;
|
||||
|
1367
jd_speed_sign.js
1367
jd_speed_sign.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user