bark自动复制动态密码

This commit is contained in:
pppscn 2021-02-12 09:35:11 +08:00
parent fb6f1d4acf
commit 966356ff57

View File

@ -35,7 +35,8 @@ public class SenderBarkMsg {
barkServer += "/" + URLEncoder.encode(content, "UTF-8"); barkServer += "/" + URLEncoder.encode(content, "UTF-8");
barkServer += "?isArchive=1"; //自动保存 barkServer += "?isArchive=1"; //自动保存
int isCode = content.indexOf("验证码"); int isCode = content.indexOf("验证码");
if (isCode != -1) { int isPassword = content.indexOf("动态密码");
if (isCode != -1 || isPassword != -1) {
Pattern p = Pattern.compile("(\\d{4,6})"); Pattern p = Pattern.compile("(\\d{4,6})");
Matcher m = p.matcher(content); Matcher m = p.matcher(content);
if (m.find()) { if (m.find()) {