|
|
@ -27,35 +27,37 @@ class UserInfo { |
|
|
|
} |
|
|
|
|
|
|
|
async start () { |
|
|
|
await this.updateInfo(this.userid) |
|
|
|
if (this.imei) { |
|
|
|
var mainUserInfo = await this.GetUserInfo(this.userid) |
|
|
|
if (mainUserInfo.imei) { |
|
|
|
//登录
|
|
|
|
await $.wait(200) |
|
|
|
await this.userLogin(this.imei); |
|
|
|
await this.userLogin(mainUserInfo.imei); |
|
|
|
} |
|
|
|
|
|
|
|
//1. 获取邀请的数量,不够30个邀请到30个,每次邀请10个
|
|
|
|
//{"invitationallmoney":"0","invitationnum":"70","invitationmoney":"65.00","invitationcash":"100"}
|
|
|
|
|
|
|
|
let invitationnum = Number.parseInt(mainUserInfo.invitationnum); |
|
|
|
//补够70个邀请
|
|
|
|
if (invitationnum < 70) { |
|
|
|
await this.InvitMoreUser(this.userid, 70 - invitationnum); |
|
|
|
} |
|
|
|
|
|
|
|
await this.GetInvitUsers(this.userid, 0); |
|
|
|
if (!this.invitusers) |
|
|
|
return; |
|
|
|
|
|
|
|
if (this.invitusers.length < 70) { |
|
|
|
await this.InvitMoreUser(this.userid, 70-this.invitusers.length); |
|
|
|
this.invitusers=[]; |
|
|
|
await this.GetInvitUsers(this.userid,0); |
|
|
|
} |
|
|
|
|
|
|
|
//2. 每个邀请账号刷红包提现
|
|
|
|
let indexNumber = 0; |
|
|
|
for (var user of this.invitusers) { |
|
|
|
console.log(`\n==${indexNumber++} ${this.userid} 用户:${user.userid} 刷满5000红包==`) |
|
|
|
this.amount = 0; |
|
|
|
this.imei = ''; |
|
|
|
await this.updateInfo(user.userid) |
|
|
|
if (this.imei) { |
|
|
|
let subUserInfo = await this.GetUserInfo(user.userid) |
|
|
|
if (subUserInfo.imei) { |
|
|
|
//登录
|
|
|
|
await $.wait(200) |
|
|
|
await this.userLogin(this.imei); |
|
|
|
await this.userLogin(subUserInfo.imei); |
|
|
|
} |
|
|
|
|
|
|
|
await $.wait(200) |
|
|
@ -64,14 +66,20 @@ class UserInfo { |
|
|
|
} |
|
|
|
|
|
|
|
if (this.amount > 3000) { |
|
|
|
console.log(`开始抽奖卷`) |
|
|
|
console.log(`${user.userid} 开始抽奖卷`) |
|
|
|
this.txflag = 0 |
|
|
|
await this.onCheck(user.userid) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//3. 邀请金额如果可以提现,则自动提现
|
|
|
|
|
|
|
|
mainUserInfo = await this.GetUserInfo(this.userid) |
|
|
|
let invitationmoney = Number.parseInt(mainUserInfo.invitationmoney); |
|
|
|
if(invitationmoney>50) |
|
|
|
{ |
|
|
|
await this.CashInvite(this.userid,invitationmoney); |
|
|
|
} |
|
|
|
console.log(`${user.userid} 邀请金额:${invitationmoney}`) |
|
|
|
} |
|
|
|
|
|
|
|
encrypt (str, timestamp, userid, type) { |
|
|
@ -95,6 +103,58 @@ class UserInfo { |
|
|
|
return sign |
|
|
|
} |
|
|
|
|
|
|
|
//邀请提现
|
|
|
|
async CashInvite (userid,money) { |
|
|
|
let url = 'http://dati.dspmz.com/idiomgame/?s=/CashOutInfo/onCashInvite' |
|
|
|
let timestamp = + new Date() |
|
|
|
let sign = this.encrypt1(userid + timestamp); |
|
|
|
//提现类型 1007(50元) 1008(100) 1009(1050)
|
|
|
|
let cashType = money >= 150 ? 1009 : (money >= 100 ? 1008 : 1007); |
|
|
|
|
|
|
|
//&userId=70681&index=1007&timeStamp=1656916485058&sign=e95d8e689448cbe51e75388e03fb6662
|
|
|
|
//70681165691648505845^dk,mxcjwejk54d152
|
|
|
|
let body = `&userId=${userid}&index=${cashType}&timeStamp=${timestamp}&sign=${sign}` |
|
|
|
let urlObject = populateUrlObject(url, body, this.USER_AGENT) |
|
|
|
let httpResultContext = {}; |
|
|
|
await httpRequest('post', urlObject, httpResultContext) |
|
|
|
let httpResult = httpResultContext.Result |
|
|
|
if (!httpResult || httpResult.statusCode != 200) { return undefined; } |
|
|
|
//{"code":-2}
|
|
|
|
let result = JSON.parse(httpResult.body); |
|
|
|
if (!result) return undefined; |
|
|
|
if (result.code ==1) { |
|
|
|
console.log(`账号${userid} 提现:${money}成功`); |
|
|
|
} |
|
|
|
else { |
|
|
|
console.log(`账号${userid} 提现:${money} 失败: ${httpResult.body}`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//获取邀请信息
|
|
|
|
async GetInviteInfo (userid) { |
|
|
|
let url = 'http://dati.dspmz.com/idiomgame/?s=/UserInfo/inviteInfo' |
|
|
|
let timestamp = + new Date() |
|
|
|
let sign = this.encrypt1(userid + timestamp); |
|
|
|
//&userId=70681&timeStamp=1656901690735&sign=6010ffb8b19bd952421ed90303447460
|
|
|
|
//70681165690169073545^dk,mxcjwejk54d152
|
|
|
|
let body = `&userId=${userid}&timeStamp=${timestamp}&sign=${sign}` |
|
|
|
let urlObject = populateUrlObject(url, body, this.USER_AGENT) |
|
|
|
let httpResultContext = {}; |
|
|
|
await httpRequest('post', urlObject, httpResultContext) |
|
|
|
let httpResult = httpResultContext.Result |
|
|
|
if (!httpResult || httpResult.statusCode != 200) { return undefined; } |
|
|
|
//{"data":{"invitationallmoney":"0","invitationnum":"70","invitationmoney":"65.00","invitationcash":"100"},"code":0}
|
|
|
|
let result = JSON.parse(httpResult.body); |
|
|
|
if (!result) return undefined; |
|
|
|
if (result.code == 0) { |
|
|
|
return result.data; |
|
|
|
} |
|
|
|
else { |
|
|
|
console.log(`账号${userid} 获取邀请信息失败: ${httpResult.body}`); |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
async GetInvitUsers (userid, page) { |
|
|
|
let url = 'http://dati.dspmz.com/idiomgame/?s=/InviCash/getRecord' |
|
|
|
let timestamp = + new Date() |
|
|
@ -130,9 +190,10 @@ class UserInfo { |
|
|
|
await $.wait(200) |
|
|
|
//注册行账号 并绑定支付宝账号
|
|
|
|
var newUserid = await this.registCount(); |
|
|
|
if (newUserid) { |
|
|
|
await this.updateInfo(newUserid) |
|
|
|
} |
|
|
|
console.log(`账号${userid} 新增邀请 ${newUserid}`); |
|
|
|
// if (newUserid) {
|
|
|
|
// await this.updateInfo(newUserid)
|
|
|
|
// }
|
|
|
|
await $.wait(200) |
|
|
|
} |
|
|
|
} |
|
|
@ -189,12 +250,13 @@ class UserInfo { |
|
|
|
//{"redcoupons":"291","addRed":261,"code":0}
|
|
|
|
if (result.code == 0) { |
|
|
|
this.amount = result.redcoupons |
|
|
|
console.log(`账号红包:${result.redcoupons} 增加:${result.addRed}`); |
|
|
|
if (this.amount < 5000) await $.wait(Math.floor(Math.random() * 1000) + 1000), await this.updateRedCoupons(userid); |
|
|
|
if (this.amount > 5000) |
|
|
|
console.log(`${this.userid}-${userid}账号红包:${result.redcoupons} 增加:${result.addRed}`); |
|
|
|
if (this.amount < 5000) await $.wait(Math.floor(Math.random() * 1000) + 100), await this.updateRedCoupons(userid); |
|
|
|
} else console.log(`${JSON.stringify(result)}`) |
|
|
|
} |
|
|
|
|
|
|
|
async updateInfo (userid) { |
|
|
|
async GetUserInfo (userid) { |
|
|
|
let url = 'http://dati.dspmz.com/idiomgame/?s=/UserInfo/updateInfo' |
|
|
|
let timestamp = + new Date() |
|
|
|
let sign = this.encrypt('', '', userid) |
|
|
@ -205,7 +267,11 @@ class UserInfo { |
|
|
|
let httpResult = httpResultContext.Result |
|
|
|
if (!httpResult || httpResult.statusCode != 200) { return; } |
|
|
|
let result = JSON.parse(httpResult.body); |
|
|
|
if (!result) return |
|
|
|
//{"imei":"b48992a3-765f-44f7-a62d-fd40b57c0992","channelid":"mzdyj_gf","openid":null,"alipayaccount":"13072885408","alipayname":"\\u6731\\u5fd7\\u6e05","userid":"70681",
|
|
|
|
//"nickname":" ","headimage":null,"money":"-0.30","phonenum":"0","invitationcode":"0","invitationnum":"70","invitationmoney":"15.50",
|
|
|
|
//"answernum":"11","logintime":"2022-07-04 08:16:12","redcoupons":"2108","invitationallmoney":"0",
|
|
|
|
//"invitationcash":"150","limitnum":"0","ver":{"ver":"1.0.5","path":"https:\\/\\/wifipic.valuecome.com\\/app\\/mzdyj_gf.apk","contents":"\\u4f18\\u5316\\u5df2\\u77e5\\u95ee\\u9898\\uff0c\\u589e\\u52a0\\u9898\\u5e93\\u3002"},"stateType":"0","limitSubject":100,"subjectNum":50,"code":0}
|
|
|
|
if (!result) return undefined; |
|
|
|
//console.log(`${JSON.stringify(result)}`)
|
|
|
|
if (result.code == 0) { |
|
|
|
this.imei = result.imei || '' |
|
|
@ -217,8 +283,11 @@ class UserInfo { |
|
|
|
if (aliname) var newname = aliname.substr(0, 1) + '**' + aliname.substr(2) |
|
|
|
this.amount = result.redcoupons |
|
|
|
console.log(`绑定:${tel}-${aliname} 答题次数:${result.answernum} 金币数:${this.amount}`); |
|
|
|
return this.imei; |
|
|
|
} else console.log(`${JSON.stringify(result)}`) |
|
|
|
return result; |
|
|
|
} else { |
|
|
|
console.log(`${JSON.stringify(result)}`); |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
async onAdClick (userid) { |
|
|
@ -255,27 +324,27 @@ class UserInfo { |
|
|
|
if (!result) return |
|
|
|
//console.log(`${JSON.stringify(result)}`)
|
|
|
|
if (result.code == 0) { //提现广告次数不够
|
|
|
|
console.log(`提现卷抽奖:提现广告完成${result.task.curclick}/${result.task.looknum} 提现请求:${result.cashnum}`); |
|
|
|
console.log(`${this.userid}-${userid} 提现卷抽奖:提现广告完成${result.task.curclick}/${result.task.looknum} 提现请求:${result.cashnum}`); |
|
|
|
if (result.cashnum <= 3) { |
|
|
|
if (result.task.curclick < 3) { |
|
|
|
console.log(`刷提现广告`) |
|
|
|
console.log(`${this.userid}-${userid} 刷提现广告`) |
|
|
|
let k = 3 - result.task.curclick; |
|
|
|
for (let i = 0; i < k; i++) { |
|
|
|
await $.wait(200) |
|
|
|
await this.onAdClick(userid) |
|
|
|
await $.wait(Math.floor(Math.random() * 3000) + 1000) |
|
|
|
await $.wait(Math.floor(Math.random() * 1000) + 1000) |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.txflag == 1) { |
|
|
|
console.log(`开始获取订单号`) |
|
|
|
await $.wait(2000) |
|
|
|
console.log(`${this.userid}-${userid} 开始获取订单号`) |
|
|
|
await $.wait(Math.floor(Math.random() * 1000)) |
|
|
|
await this.getorderId(userid) |
|
|
|
} else console.log(`刷提现广告失败,跳过`) |
|
|
|
} else console.log(`超过今日提现次数,跳过`) |
|
|
|
} else console.log(`${this.userid}-${userid} 刷提现广告失败,跳过`) |
|
|
|
} else console.log(`${this.userid}-${userid} 超过今日提现次数,跳过`) |
|
|
|
} else { |
|
|
|
console.log(`提现广告已完成`) |
|
|
|
console.log(`开始获取订单号`) |
|
|
|
await $.wait(2000) |
|
|
|
console.log(`${this.userid}-${userid} 提现广告已完成`) |
|
|
|
console.log(`${this.userid}-${userid} 开始获取订单号`) |
|
|
|
await $.wait(Math.floor(Math.random() * 1000)) |
|
|
|
await this.getorderId(userid) |
|
|
|
} |
|
|
|
} |
|
|
@ -297,8 +366,8 @@ class UserInfo { |
|
|
|
if (!result) return |
|
|
|
if (result.code == 1) { |
|
|
|
let orderId = result.orderId |
|
|
|
console.log(`订单号:${result.orderId}`); |
|
|
|
console.log(`开始提现`) |
|
|
|
console.log(`${this.userid}-${userid} 订单号:${result.orderId}`); |
|
|
|
console.log(`${this.userid}-${userid} 开始提现`) |
|
|
|
await $.wait(2000) |
|
|
|
await this.cashOrder(userid, orderId) |
|
|
|
} |
|
|
@ -322,7 +391,7 @@ class UserInfo { |
|
|
|
if (!result) return |
|
|
|
//console.log(`${JSON.stringify(result)}`)
|
|
|
|
if (result.code == 1) { |
|
|
|
console.log(`提现:${result.price} 剩余:${result.data.redcoupons}`); |
|
|
|
console.log(`${this.userid}-${userid} 提现:${result.price} 剩余:${result.data.redcoupons}`); |
|
|
|
} else console.log(`${JSON.stringify(result)}`) |
|
|
|
} |
|
|
|
//提现列表
|
|
|
@ -373,11 +442,12 @@ class UserInfo { |
|
|
|
} else console.log(`${JSON.stringify(result)}`) |
|
|
|
} |
|
|
|
|
|
|
|
async userLogin (IMEI) { |
|
|
|
async userLogin (imei) { |
|
|
|
//http://dati.dspmz.com/idiomgame/?s=/UserInfo/userLogin
|
|
|
|
//&IMEI=9fbdbfc9983c87c1f2ad3266a8d841cb&msaOAID=&verSDK=29&activeIP=&channelId=win_channel_1
|
|
|
|
let url = 'http://dati.dspmz.com/idiomgame/?s=/UserInfo/userLogin' |
|
|
|
let body = `&IMEI=${IMEI}&msaOAID=&verSDK=29&activeIP=&channelId=win_channel_1` |
|
|
|
let body = `&IMEI=${imei}&msaOAID=&verSDK=24&activeIP=&channelId=mzdyj_gf` |
|
|
|
//let body = `&IMEI=${IMEI}&msaOAID=&verSDK=24&activeIP=&channelId=mzdyj_gf`
|
|
|
|
//console.log(body)
|
|
|
|
//let body="&userId=67397&timeStamp=1653118736569&redType=1&iCPM=0&sign=448a1bf43e6a391258e509ad6c553040";
|
|
|
|
let urlObject = populateUrlObject(url, body, this.USER_AGENT) |
|
|
|