mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-20 01:29:38 +08:00
Compare commits
3 Commits
a5b5b810ec
...
94ae72cd83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94ae72cd83 | ||
|
|
0708ef5030 | ||
|
|
1c6fe5debc |
@ -12,9 +12,11 @@ export class Main extends Template {
|
|||||||
sync: 1,
|
sync: 1,
|
||||||
prompt: {
|
prompt: {
|
||||||
shareUrl: '京享红包分享链接',
|
shareUrl: '京享红包分享链接',
|
||||||
|
unionShareId: '可选项,自定义unionShareId,请确保该id是基于shareUrl生成'
|
||||||
},
|
},
|
||||||
readme: ["风控较严,算法经常变动,锁佣需谨慎,如订单一直异常,请停用此脚本", "默认获取前3个账号分享码"],
|
readme: ["风控较严,算法经常变动,锁佣需谨慎,如订单一直异常,请停用此脚本", "默认获取前3个账号分享码"],
|
||||||
crontab: 1
|
crontab: 1,
|
||||||
|
interval: 8000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,24 +82,31 @@ export class Main extends Template {
|
|||||||
let d = this.match(/com\/(\w+)/, shareUrl)
|
let d = this.match(/com\/(\w+)/, shareUrl)
|
||||||
let unionShareId = []
|
let unionShareId = []
|
||||||
let client = ua.includes('Android') ? 'android' : 'apple'
|
let client = ua.includes('Android') ? 'android' : 'apple'
|
||||||
for (let user of this.help) {
|
if (this.profile.unionShareId) {
|
||||||
let shareUnion = await this.curl({
|
for (let shareId of this.profile.unionShareId.split("|")) {
|
||||||
'url': `https://api.m.jd.com/api?functionId=shareUnionCoupon&appid=u_hongbao&_=1716943673297&loginType=2&body={"unionActId":"${unionActId}","actId":"${actId}","platform":5,"unionShareId":"","d":"${d}","supportPic":2}&client=${client}&clientVersion=1.1.0&osVersion=15.1.1&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=wifi&openudid=`,
|
|
||||||
algo: {
|
|
||||||
appId: 'c10dc',
|
|
||||||
store: cookie,
|
|
||||||
},
|
|
||||||
referer: linkUrl,
|
|
||||||
ua,
|
|
||||||
user
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if (this.haskey(shareUnion, 'data.shareUrl')) {
|
|
||||||
let shareId = this.match(/s=(\w+)/, shareUnion.data.shareUrl)
|
|
||||||
this.log("获取账户", user, shareId)
|
|
||||||
unionShareId.push(shareId)
|
unionShareId.push(shareId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
for (let user of this.help) {
|
||||||
|
let shareUnion = await this.curl({
|
||||||
|
'url': `https://api.m.jd.com/api?functionId=shareUnionCoupon&appid=u_hongbao&_=1716943673297&loginType=2&body={"unionActId":"${unionActId}","actId":"${actId}","platform":5,"unionShareId":"","d":"${d}","supportPic":2}&client=${client}&clientVersion=1.1.0&osVersion=15.1.1&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=wifi&openudid=`,
|
||||||
|
algo: {
|
||||||
|
appId: 'c10dc',
|
||||||
|
store: cookie,
|
||||||
|
},
|
||||||
|
referer: linkUrl,
|
||||||
|
ua,
|
||||||
|
user
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (this.haskey(shareUnion, 'data.shareUrl')) {
|
||||||
|
let shareId = this.match(/s=(\w+)/, shareUnion.data.shareUrl)
|
||||||
|
this.log("获取账户", user, shareId)
|
||||||
|
unionShareId.push(shareId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.shareCode({
|
this.shareCode({
|
||||||
shareUrl,
|
shareUrl,
|
||||||
d,
|
d,
|
||||||
@ -272,10 +281,13 @@ export class Main extends Template {
|
|||||||
if (this.match(/\d+秒/, i.info)) {
|
if (this.match(/\d+秒/, i.info)) {
|
||||||
let ts = (this.match(/(\d+)秒/, i.info))
|
let ts = (this.match(/(\d+)秒/, i.info))
|
||||||
try {
|
try {
|
||||||
let z = await this.sign.jdCurl({
|
let z = await this.curl({
|
||||||
url: 'https://api.m.jd.com/client.action',
|
url: 'https://api.m.jd.com/client.action',
|
||||||
form: `functionId=apResetTiming&body={"timerId":"${i.componentId}","uniqueId":"${i.taskId}"}&build=169498&client=${client}&clientVersion=13.2.8&d_brand=apple&d_model=iPhone13%2C3&ef=1`,
|
form: `functionId=apResetTiming&body={"timerId":"${i.componentId}","uniqueId":"${i.taskId}"}&build=169498&client=${client}&clientVersion=13.2.8&d_brand=apple&d_model=iPhone13%2C3&ef=1`,
|
||||||
user
|
user,
|
||||||
|
algo: {
|
||||||
|
sign: true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
p.log("等待", ts)
|
p.log("等待", ts)
|
||||||
await this.wait(parseInt(ts) * 1000)
|
await this.wait(parseInt(ts) * 1000)
|
||||||
@ -326,7 +338,7 @@ export class Main extends Template {
|
|||||||
)
|
)
|
||||||
let getCoupons = await this.curl({
|
let getCoupons = await this.curl({
|
||||||
url: `https://api.m.jd.com/api`,
|
url: `https://api.m.jd.com/api`,
|
||||||
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":8,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1,"taskId":"${i.taskId}","agreeState":0}&client=${client}&clientVersion=1.1.0&osVersion=iOS&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=&openudid=&uuid=17165464753211715186324&aid=&oaid=&ext={"idfa":""}&x-api-eid-token=`,
|
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":8,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1,"taskId":"${i.taskId}","agreeState":0}&client=${client}&clientVersion=1.1.0&stk=appid,body,client,clientVersion,functionId`,
|
||||||
user,
|
user,
|
||||||
algo: {
|
algo: {
|
||||||
appId: 'c822a',
|
appId: 'c822a',
|
||||||
@ -342,7 +354,7 @@ export class Main extends Template {
|
|||||||
)
|
)
|
||||||
let getCoupons2 = await this.curl({
|
let getCoupons2 = await this.curl({
|
||||||
url: `https://api.m.jd.com/api`,
|
url: `https://api.m.jd.com/api`,
|
||||||
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":8,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1,"taskId":"${i.taskId}","agreeState":1}&client=${client}&clientVersion=1.1.0&osVersion=iOS&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=&openudid=&uuid=17165464753211715186324&aid=&oaid=&ext={"idfa":""}&x-api-eid-token=`,
|
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":8,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1,"taskId":"${i.taskId}","agreeState":1}&client=${client}&clientVersion=1.1.0&stk=appid,body,client,clientVersion,functionId`,
|
||||||
user,
|
user,
|
||||||
algo: {
|
algo: {
|
||||||
appId: 'c822a',
|
appId: 'c822a',
|
||||||
@ -400,7 +412,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let comp = await this.curl({
|
let comp = await this.curl({
|
||||||
'url': `https://api.m.jd.com/api?functionId=completeUnionTask&appid=u_activity_h5&loginType=2&client=${client}&clientVersion=&body={"unionActTask":"${(unionActTask)}"}&x-api-eid-token=jdd01VD3JGEPGE54ERTF24JG43RNNY4NFEDZITDT3FYE6NYXFV2B27GNMA6R4QVHVRDBZKC7HS3BHZCRRFX2NBBN5TASNAQRGAFOZFYBTBDI01234567`,
|
'url': `https://api.m.jd.com/api?functionId=completeUnionTask&appid=u_activity_h5&loginType=2&client=${client}&clientVersion=&body={"unionActTask":"${(unionActTask)}"}`,
|
||||||
// 'form':``,
|
// 'form':``,
|
||||||
user,
|
user,
|
||||||
algo: {
|
algo: {
|
||||||
@ -416,30 +428,31 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.help.includes(user)) {
|
qry = await this.curl({
|
||||||
qry = await this.curl({
|
'url': `https://api.m.jd.com/api?functionId=queryFullGroupInfoMap&appid=u_hongbao&_=1716946027013&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","taskType":1,"prstate":0}&client=${client}&clientVersion=15.6.10&osVersion=15.1.1&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=wifi&openudid=&aid=&oaid=`,
|
||||||
'url': `https://api.m.jd.com/api?functionId=queryFullGroupInfoMap&appid=u_hongbao&_=1716946027013&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","taskType":1,"prstate":0}&client=${client}&clientVersion=15.6.10&osVersion=15.1.1&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=wifi&openudid=&aid=&oaid=`,
|
user,
|
||||||
user,
|
algo: {appId: '7b74b'}
|
||||||
algo: {appId: '7b74b'}
|
}
|
||||||
}
|
)
|
||||||
)
|
let getCoupons = await this.curl({
|
||||||
let getCoupons = await this.curl({
|
url: `https://api.m.jd.com/api`,
|
||||||
url: `https://api.m.jd.com/api`,
|
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":3,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1}&client=${client}&clientVersion=1.1.0&stk=appid,body,client,clientVersion,functionId`,
|
||||||
form: `functionId=getCoupons&appid=u_hongbao&_=1716912812082&loginType=2&body={"actId":"${actId}","unionActId":"${unionActId}","platform":5,"d":"${d}","unionShareId":"","type":3,"qdPageId":"MO-J2011-1","mdClickId":"jxhongbao_ck","actType":1}&client=${client}&clientVersion=1.1.0&osVersion=iOS&screen=390*844&d_brand=iPhone&d_model=iPhone&lang=zh-CN&networkType=&openudid=&uuid=17165464753211715186324&aid=&oaid=&ext={"idfa":""}&x-api-eid-token=`,
|
user,
|
||||||
user,
|
algo: {
|
||||||
algo: {
|
appId: 'c822a',
|
||||||
appId: 'c822a',
|
store,
|
||||||
store,
|
token: false,
|
||||||
token: false,
|
expire: {
|
||||||
expire: {
|
"code": -2,
|
||||||
"code": -2,
|
}
|
||||||
}
|
},
|
||||||
},
|
ua,
|
||||||
ua,
|
referer: linkUrl
|
||||||
referer: linkUrl
|
}
|
||||||
}
|
)
|
||||||
)
|
gift.call(this, getCoupons)
|
||||||
gift.call(this, getCoupons)
|
if (this.haskey(getCoupons, 'data.couponList.0.discount')) {
|
||||||
|
p.info.work = true
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user