2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

由于目前方案无法过验证码签到 已移除

This commit is contained in:
Ctrlcvs 2022-10-31 22:23:11 +08:00
parent 4e4af821a4
commit b1708eb522
2 changed files with 121 additions and 102 deletions

View File

@ -164,12 +164,25 @@ export async function mytoken(e) {
export async function bindLogin_ticket(e){ export async function bindLogin_ticket(e){
let user = new User(e); let user = new User(e);
let ckMap=await utils.getCookieMap(e.original_msg.replace(/'|"/g,"")) let ckMap=await utils.getCookieMap(e.original_msg.replace(/'|"/g,""))
let stuid=ckMap?.get("login_uid") ? ckMap?.get("login_uid") : ckMap?.get("ltuid")
if(!stuid) stuid= ckMap?.get("account_id");
if(ckMap&&Cfg.get("ck.sk")){ if(ckMap&&Cfg.get("ck.sk")){
let res= await user.getData("bbsStoken", { let res= await user.getData("bbsStoken", {
loginUid:ckMap?.get("login_uid") ? ckMap?.get("login_uid") : ckMap?.get("ltuid"), loginUid:stuid,
loginTicket:ckMap.get("login_ticket"), loginTicket:ckMap.get("login_ticket"),
},false) })
if(res?.retcode===0){ if(res?.retcode===0){
if (res?.data) {
let datalist={}
datalist[e.uid] = {
stuid:stuid,
stoken: res.data.list[0].token,
ltoken: res.data.list[1].token,
uid: e.uid,
userId: e.user_id,
is_sign: true
}
gsCfg.saveBingStoken(e.user_id, datalist)
let msg = 'stoken绑定成功您可通过下列指令进行操作:'; let msg = 'stoken绑定成功您可通过下列指令进行操作:';
msg += '\n【#米币查询】查询米游币余额' msg += '\n【#米币查询】查询米游币余额'
msg += '\n【#mys原神签到】获取米游币' msg += '\n【#mys原神签到】获取米游币'
@ -180,6 +193,7 @@ export async function bindLogin_ticket(e){
e.reply(msg) e.reply(msg)
} }
} }
}
return false; return false;
} }

View File

@ -120,21 +120,21 @@ export default class user {
} }
message += `${item.nickname}-${item.game_uid}:今日已签到~\n`; message += `${item.nickname}-${item.game_uid}:今日已签到~\n`;
} else { } else {
for (let i = 0; i < 2; i++) { //循环请求 // for (let i = 0; i < 2; i++) { //循环请求
let signTime = await redis.get(`xiaoyao:sign`) // let signTime = await redis.get(`xiaoyao:sign`)
if (signTime) { // if (signTime) {
//有数据的时候不得行必须出去 // //有数据的时候不得行必须出去
if (!mysTask) { // if (!mysTask) {
message += `${item.nickname}-${item.game_uid}:验证码失败请等待6分钟后重试或者手动上米游社签到~`; // message += `${item.nickname}-${item.game_uid}:验证码失败请等待6分钟后重试或者手动上米游社签到~`;
break; // break;
} else { // } else {
await utils.sleepAsync(60000 * 6) //等6分钟再说 // // await utils.sleepAsync(60000 * 6) // 由于这个方法已经无法过验证码了所以不在处理
//ps你要是觉得改有加高过的概率就改吧随便你反正到时候黑IP的不是我 // //ps你要是觉得改有加高过的概率就改吧随便你反正到时候黑IP的不是我
} // }
} // }
await utils.sleepAsync(2000) await utils.sleepAsync(2000)
res = await this.getData("sign", data, false) res = await this.getData("sign", data, false)
if (res?.data?.gt) { //进行3次验证码访问签到加高通过概率 if (res?.data?.gt) {
let validate = await this.geetest(res.data) let validate = await this.geetest(res.data)
if (validate) { if (validate) {
let header = {} let header = {}
@ -157,6 +157,10 @@ export default class user {
message += message +=
`${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到\n`; `${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到\n`;
} }
} else {
if (this.allSign) {
this.allSign[forum.name].error++;
}
} }
} else { } else {
if (this.allSign) { if (this.allSign) {
@ -168,7 +172,7 @@ export default class user {
break; break;
} }
} }
} // }
//获取签到信息和奖励信息 //获取签到信息和奖励信息
const SignInfo = await this.getData("home", data, false) const SignInfo = await this.getData("home", data, false)
if (SignInfo) { if (SignInfo) {
@ -405,7 +409,8 @@ export default class user {
sendReply() { sendReply() {
let msg = "" let msg = ""
for (let item of this.findModel) { for (let item of this.findModel) {
msg+=`**${item}**\n已签:${this[item].isSign}\n签到成功:${this[item].sign}\n未绑定信息:${this[item].bindGame}\n签到失败异常:${this[item].error}\n` msg +=
`**${item}**\n已签:${this[item].isSign}\n签到成功:${this[item].sign}\n未绑定信息:${this[item].bindGame}\n签到失败异常:${this[item].error}\n`
} }
return msg return msg
} }