修复重进绕过功能,补全提示
This commit is contained in:
parent
08f091f3ce
commit
b1e671f9f2
|
@ -107,7 +107,7 @@ public class BotAttack extends IAttack {
|
|||
}
|
||||
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e.getMessage(), null);
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -175,7 +175,7 @@ public class BotAttack extends IAttack {
|
|||
if (this.attack_joinsleep > 0)
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e.getMessage(), null);
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,6 +210,22 @@ public class BotAttack extends IAttack {
|
|||
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
||||
createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
||||
rejoin++;
|
||||
|
||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
||||
|
||||
boolean canBreak = false;
|
||||
|
||||
for (Client client:clientName.keySet()) {
|
||||
if (clientName.get(client).contains(username)) {
|
||||
canBreak = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (canBreak) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +288,9 @@ public class BotAttack extends IAttack {
|
|||
session.setFlag("join", true);
|
||||
LogUtil.doLog(0, "[假人加入服务器] [" + username + "]", "BotAttack");
|
||||
joined++;
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
MultiVersionPacket.sendClientPlayerChangeHeldItemPacket(session, 1);
|
||||
} else if (recvPacket instanceof ServerPlayerPositionRotationPacket) {
|
||||
|
@ -303,8 +321,13 @@ public class BotAttack extends IAttack {
|
|||
session.send(new ClientChatPacket(message.getStyle().getClickEvent().getValue()));
|
||||
clickVerifies++;
|
||||
} else {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + message, "BotAttack");
|
||||
alivePlayers.add(username);
|
||||
if (!message.getText().equals("")) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + message, "BotAttack");
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
}
|
||||
|
||||
if (message.getExtra() != null && !message.getExtra().isEmpty()) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class MotdAttack extends IAttack {
|
|||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
LogUtil.doLog(0, "发生错误: " + e.getMessage(), "MotdAttack" + Thread.currentThread().getName());
|
||||
LogUtil.doLog(0, "发生错误: " + e, "MotdAttack" + Thread.currentThread().getName());
|
||||
errorTimes++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class MotdAttackP extends IAttack {
|
|||
if (this.attack_maxconnect > 0 && (threads.size() > this.attack_maxconnect))
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1,"发生错误: " + e.getMessage(), null);
|
||||
LogUtil.doLog(1,"发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class MotdAttackP extends IAttack {
|
|||
LogUtil.doLog(0, "连接已断开。", "MotdAttackP" + Thread.currentThread().getName());
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
LogUtil.doLog(0, "发生错误: " + e.getMessage(), "MotdAttackP" + Thread.currentThread().getName());
|
||||
LogUtil.doLog(0, "发生错误: " + e, "MotdAttackP" + Thread.currentThread().getName());
|
||||
errorTimes++;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ public class ConfigUtil {
|
|||
public static List<String> RegisterCommands;
|
||||
public static Integer RejoinCount;
|
||||
public static List<String> RejoinDetect;
|
||||
public static Long RejoinDelay;
|
||||
public static List<String> ClickVerifiesDetect;
|
||||
public static List<String> CustomChat;
|
||||
public static Integer ChatDelay;
|
||||
|
@ -62,6 +63,7 @@ public class ConfigUtil {
|
|||
RegisterCommands = config.getStringList("BotSettings.RegisterCommands");
|
||||
RejoinCount = config.getInt("BotSettings.RejoinCount");
|
||||
RejoinDetect = config.getStringList("BotSettings.RejoinDetect");
|
||||
RejoinDelay = config.getLong("BotSettings.RejoinDelay");
|
||||
ClickVerifiesDetect = config.getStringList("BotSettings.ClickVerifiesDetect");
|
||||
CustomChat = config.getStringList("BotSettings.CustomChat");
|
||||
ChatDelay = config.getInt("BotSettings.ChatDelay");
|
||||
|
|
|
@ -23,14 +23,14 @@ public class HTTPUtil {
|
|||
result.append(line);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "HTTP请求出错! 详细信息: " + e.getMessage(), null);
|
||||
LogUtil.doLog(1, "HTTP请求出错! 详细信息: " + e, null);
|
||||
} finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "IO异常! 详细信息: " + e.getMessage(), null);
|
||||
LogUtil.doLog(1, "IO异常! 详细信息: " + e, null);
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
|
|
|
@ -29,6 +29,7 @@ BotSettings:
|
|||
BotName: "ImOldSix_$rnd"
|
||||
BotCount: 1000
|
||||
RejoinCount: 5
|
||||
RejoinDelay: 2000
|
||||
RejoinDetect:
|
||||
- "AntiAttack"
|
||||
ClickVerifiesDetect:
|
||||
|
|
Loading…
Reference in New Issue