Skip to content

Commit

Permalink
🚀 支持滑块验证 && 修改登录协议为安卓手表 && 升级mirai版本
Browse files Browse the repository at this point in the history
  • Loading branch information
xggz committed Aug 11, 2022
1 parent bdee488 commit 2bba99a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public void start(RobotInfoVo robotInfoVo) {
setLoginSolver(loginVerifyHandler);

/**
* 使用安卓平板协议
* 使用安卓手表协议
*/
setProtocol(MiraiProtocol.ANDROID_PHONE);
setProtocol(MiraiProtocol.ANDROID_WATCH);

/**
* 不输出网络日志
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public Object onSolvePicCaptcha(@NotNull Bot bot, @NotNull byte[] pic, @NotNull
@Nullable
@Override
public Object onSolveSliderCaptcha(@NotNull Bot bot, @NotNull String url, @NotNull Continuation<? super String> continuation) {
log.info("请用户QQ扫码二维码完成验证,然后在控制台提交验证");
log.info("请用机器人QQ扫码二维码完成验证,然后在控制台提交验证");
log.info(url);
log.info("完成后请输入任意字符");
return handlerVerify(RobotVerifyEnum.URL, Base64.encode(QrCodeUtil.generatePng(url, new QrConfig())));
Expand All @@ -61,6 +61,12 @@ public Object onSolveUnsafeDeviceLoginVerify(@NotNull Bot bot, @NotNull String u
return handlerVerify(RobotVerifyEnum.URL, Base64.encode(QrCodeUtil.generatePng(url, new QrConfig())));
}

@Override
public boolean isSliderCaptchaSupported() {
// 支持滑块验证登录
return true;
}

/**
* 处理登录验证
*
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

<properties>
<java.version>1.8</java.version>
<kotlin.version>1.5.10</kotlin.version>
<ktor.version>1.5.2</ktor.version>
<coroutines.version>1.5.2</coroutines.version>
<kotlin.version>1.6.21</kotlin.version>
<ktor.version>1.6.1</ktor.version>
<coroutines.version>1.6.1</coroutines.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.3.5.RELEASE</spring-boot.version>
<lombok.version>1.18.12</lombok.version>
<mamoe.version>2.9.0</mamoe.version>
<mamoe.version>2.12.1</mamoe.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<hutool.version>5.4.4</hutool.version>
<java-jwt.version>3.11.0</java-jwt.version>
Expand Down

0 comments on commit 2bba99a

Please sign in to comment.