mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-10-31 20:08:00 +00:00
修复Linux下无法工作 修复Forge支持关闭错误
This commit is contained in:
parent
2fcb4affc4
commit
fe60332448
@ -8,8 +8,9 @@ import cn.serendipityr.EndMinecraftPlusV2.VersionControl.AttackManager;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.ProtocolLibs;
|
||||
|
||||
public class EndMinecraftPlusV2 {
|
||||
public static String ver = "1.4.0";
|
||||
public static String ver = "1.4.1";
|
||||
public static Integer CfgVer = 4;
|
||||
public static Boolean isLinux = false;
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("========================-Forked by SerendipityR-========================");
|
||||
@ -17,7 +18,11 @@ public class EndMinecraftPlusV2 {
|
||||
System.out.println(" Github发布页: https://github.com/SerendipityR-2022/EndMinecraftPlusV2");
|
||||
System.out.println(" EndMinecraftPlusV2 (Ver: " + ver + ")" + " is loading......");
|
||||
System.out.println("========================================================================");
|
||||
try {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - Forked by SerendipityR");
|
||||
} catch (Throwable e) {
|
||||
isLinux = true;
|
||||
}
|
||||
LogUtil.emptyLog();
|
||||
prepareConfig();
|
||||
prepareProxy();
|
||||
|
@ -135,8 +135,13 @@ public class ConfigUtil {
|
||||
CatAntiCheat = false;
|
||||
}
|
||||
|
||||
if (!ForgeSupport) {
|
||||
LogUtil.doLog(1, "ForgeSupport未开启,CatAntiCheat相关功能已关闭。", null);
|
||||
CatAntiCheat = false;
|
||||
} else {
|
||||
ForgeModList.put("catanticheat", "1.2.6");
|
||||
}
|
||||
}
|
||||
|
||||
RandomMAC = config.getBoolean("AdvancedSettings.MACChecker.RandomMAC");
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class AttackManager {
|
||||
botAttack.start();
|
||||
}
|
||||
} else {
|
||||
if (!MCForge.isAfterVersion1_13()) {
|
||||
if (!MCForge.isAfterVersion1_13() && ConfigUtil.ForgeSupport) {
|
||||
LogUtil.doLog(0, "正在获取服务器上的Forge Mods...", "BotAttack");
|
||||
modList = new MCForgeMOTD().pingGetModsList(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, MCForge.getProtocolVersion());
|
||||
LogUtil.doLog(0, "Mods: " + Arrays.toString(modList.keySet().toArray()), "BotAttack");
|
||||
@ -79,7 +79,7 @@ public class AttackManager {
|
||||
attack.start();
|
||||
}
|
||||
} else {
|
||||
if (!MCForge.isAfterVersion1_13()) {
|
||||
if (!MCForge.isAfterVersion1_13() && ConfigUtil.ForgeSupport) {
|
||||
LogUtil.doLog(0, "正在获取服务器上的Forge Mods...", "DoubleAttack");
|
||||
doubleModList = new MCForgeMOTD().pingGetModsList(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, MCForge.getProtocolVersion());
|
||||
LogUtil.doLog(0, "Mods: " + Arrays.toString(doubleModList.keySet().toArray()), "DoubleAttack");
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.AttackManager;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.ACProtocol.AnotherStarAntiCheat;
|
||||
@ -205,7 +206,9 @@ public class BotAttack extends IAttack {
|
||||
while (run) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joined + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.LogUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.SetTitle;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||
import com.github.steveice10.packetlib.Client;
|
||||
@ -32,7 +32,9 @@ public class DoubleAttack extends BotAttack {
|
||||
if (recvPacket instanceof ServerJoinGamePacket) {
|
||||
session.disconnect("Double Exploit - Connection Reset!");
|
||||
runTimes++;
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - DoubleAttack | 总连接数: " + totalTimes + "次 | 尝试分身: " + runTimes + "次");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.ACProtocol.AnotherStarAntiCheat;
|
||||
@ -248,7 +249,9 @@ public class NewBotAttack extends IAttack {
|
||||
while (run) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joined + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.NewVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.LogUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.SetTitle;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.ProtocolLibs;
|
||||
@ -37,9 +38,11 @@ public class NewDoubleAttack extends NewBotAttack {
|
||||
}
|
||||
|
||||
runTimes++;
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - DoubleAttack | 总连接数: " + totalTimes + "次 | 尝试分身: " + runTimes + "次");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void newHandlePacket(Session session, Packet recvPacket, String username) {
|
||||
super.newHandlePacket(session, recvPacket, username);
|
||||
@ -47,7 +50,9 @@ public class NewDoubleAttack extends NewBotAttack {
|
||||
session.disconnect("Double Exploit - Connection Reset!");
|
||||
LogUtil.doLog(0, "Double Exploit - Connection Reset!", "DoubleAttack");
|
||||
runTimes++;
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - DoubleAttack | 总连接数: " + totalTimes + "次 | 尝试分身: " + runTimes + "次");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.AttackManager;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ACProtocol.AnotherStarAntiCheat;
|
||||
@ -210,7 +211,9 @@ public class BotAttack extends IAttack {
|
||||
while (run) {
|
||||
for (String p: ProxyUtil.proxies) {
|
||||
try {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - BotAttack | 当前连接数: " + clients.size() + "个 | 失败次数: " + failed + "次 | 成功加入: " + joined + "次 | 当前存活: " + alivePlayers.size() + "个 | 点击验证: " + clickVerifies + "次 | 重进尝试: " + rejoin);
|
||||
}
|
||||
|
||||
String[] _p = p.split(":");
|
||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.SetTitle;
|
||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||
import org.spacehq.packetlib.Client;
|
||||
@ -32,7 +33,9 @@ public class DoubleAttack extends BotAttack {
|
||||
if (recvPacket instanceof ServerJoinGamePacket) {
|
||||
session.disconnect("Double Exploit - Connection Reset!");
|
||||
runTimes++;
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - DoubleAttack | 总连接数: " + totalTimes + "次 | 尝试分身: " + runTimes + "次");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.ConfigUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.LogUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.OtherUtils;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.SetTitle;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetSocketAddress;
|
||||
@ -32,7 +31,9 @@ public class MotdAttack extends IAttack {
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - MotdAttack | 当前连接数: " + threads.size() + "个 | 发包次数: " + runTimes + "次 | 有效包数: " + successTimes + "次 | 错误次数: " + errorTimes);
|
||||
}
|
||||
|
||||
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
||||
stop();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.*;
|
||||
import org.spacehq.packetlib.Client;
|
||||
|
||||
@ -77,7 +78,9 @@ public class MotdAttackP extends IAttack {
|
||||
}
|
||||
|
||||
public Thread createThread(Proxy proxy, String ip, int port) {
|
||||
if (!EndMinecraftPlusV2.isLinux) {
|
||||
SetTitle.INSTANCE.SetConsoleTitleA("EndMinecraftPlusV2 - MotdAttack | 当前连接数: " + threads.size() + "个 | 发包次数: " + runTimes + "次 | 有效包数: " + successTimes + "次 | 错误次数: " + errorTimes);
|
||||
}
|
||||
runTimes++;
|
||||
Runnable task = () -> {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user