Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Decompiled by Procyon v0.5.36
- //
- package site.www.jhdev.net.antibot.bungee;
- import net.md_5.bungee.api.ChatMessageType;
- import net.md_5.bungee.api.event.PluginMessageEvent;
- import net.md_5.bungee.api.ChatColor;
- import java.net.InetSocketAddress;
- import site.www.jhdev.net.antibot.bungee.events.BadPacketTracker;
- import net.md_5.bungee.api.plugin.Command;
- import java.util.concurrent.TimeUnit;
- import site.www.jhdev.net.antibot.bungee.connection.Pipeline;
- import net.md_5.bungee.api.ProxyServer;
- import java.util.logging.Logger;
- import java.util.logging.Filter;
- import net.md_5.bungee.BungeeCord;
- import site.www.jhdev.net.antibot.utils.BungeeConsoleFilter;
- import java.io.IOException;
- import java.io.InputStream;
- import java.nio.file.Files;
- import java.nio.file.CopyOption;
- import net.md_5.bungee.api.event.PostLoginEvent;
- import net.md_5.bungee.api.event.ChatEvent;
- import net.md_5.bungee.api.chat.TextComponent;
- import net.md_5.bungee.BungeeTitle;
- import net.md_5.bungee.api.event.PlayerDisconnectEvent;
- import java.util.Map;
- import net.md_5.bungee.api.connection.ProxiedPlayer;
- import net.md_5.bungee.api.config.ListenerInfo;
- import java.util.Iterator;
- import java.util.Collection;
- import java.util.ArrayList;
- import net.md_5.bungee.api.CommandSender;
- import net.md_5.bungee.config.ConfigurationProvider;
- import net.md_5.bungee.config.YamlConfiguration;
- import java.io.File;
- import net.md_5.bungee.config.Configuration;
- import site.www.jhdev.net.antibot.bungee.events.ProtocolHandlerEvent;
- import site.www.jhdev.net.antibot.utils.IpInfo;
- import net.md_5.bungee.api.event.PreLoginEvent;
- import net.md_5.bungee.api.event.ProxyPingEvent;
- import net.md_5.bungee.event.EventHandler;
- import site.www.jhdev.net.antibot.bungee.events.ConnectionEvent;
- import net.md_5.bungee.api.event.PlayerHandshakeEvent;
- import site.www.jhdev.net.antibot.utils.IpController;
- import java.text.DecimalFormat;
- import java.util.HashMap;
- import site.www.jhdev.net.antibot.utils.Status;
- import net.md_5.bungee.api.chat.BaseComponent;
- import java.util.List;
- import site.www.jhdev.net.antibot.utils.Settings;
- import net.md_5.bungee.api.plugin.Listener;
- import net.md_5.bungee.api.plugin.Plugin;
- public class Main extends Plugin implements Listener
- {
- private boolean useDatabase;
- private long lastcheck;
- private boolean dev;
- Settings settings;
- private List<String> joinmotd;
- private List<String> verbosePlayers;
- private boolean attackStatus;
- private long serverStartTime;
- private long attackTimer;
- private static boolean lasted;
- private final BaseComponent[] defaultKick;
- private Status status;
- private HashMap<String, Long> times;
- private String lastServerIp;
- private static Main instance;
- private DecimalFormat formatter;
- private IpController ipcontroller;
- private boolean updateCheck;
- private long timeAttackStart;
- public void disconnect(final PlayerHandshakeEvent a) {
- a.getHandshake().setRequestedProtocol(99);
- a.getConnection().disconnect(this.defaultKick);
- this.status.addBlocked();
- }
- public static String time(final long a) {
- final long n = a / 1000L;
- final long n2 = n / 60L;
- final long n3 = n2 / 60L;
- final long l = n3 / 24L;
- return String.valueOf((l > 0L) ? new StringBuilder(String.valueOf(l)).append("|8xt").toString() : "") + ((n3 > 0L) ? (String.valueOf(n3 % 24L) + "|4{w") : "") + ((n2 > 0L) ? (String.valueOf(n2 % 60L) + "|1zv") : "") + n % 60L + "|\"\u007f";
- }
- @EventHandler
- public void onConnectionHandlerIsBlocked(final ConnectionEvent a) {
- if (a.isCancelled()) {
- this.status.addBlocked();
- }
- }
- @EventHandler(priority = 64)
- public void onServerListPing(final ProxyPingEvent a) {
- final String hostAddress = a.getConnection().getAddress().getAddress().getHostAddress();
- if (this.joinmotd.contains(hostAddress)) {
- this.joinmotd.remove(hostAddress);
- }
- if (this.dev) {
- a.getResponse().setDescription("¶w::;;;;ss\u00fd6Zx\u000f.w!SBDC7DTC\u0002\u0011I\u0011\u008e[$$*^yob6gqRU*hot3.>76ePZ~ol!}bWEo=7: 7");
- }
- }
- @EventHandler(priority = Byte.MIN_VALUE)
- public void PreLoginEvent(final PreLoginEvent a) {
- final String hostAddress = a.getConnection().getAddress().getAddress().getHostAddress();
- if (hostAddress.equalsIgnoreCase("\r41?!qols") || hostAddress.startsWith("7?#?ni{m")) {
- return;
- }
- final String name = a.getConnection().getName();
- final long currentTimeMillis = System.currentTimeMillis();
- final IpInfo ipOrNull = this.ipcontroller.getIpOrNull(hostAddress);
- final long lastJoin = ipOrNull.getLastJoin();
- ipOrNull.setLastJoin(currentTimeMillis);
- if (ipOrNull.isBlacklisted() && !ipOrNull.isWhitelisted()) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpBlacklistedMessage());
- return;
- }
- if (this.joinmotd.contains(hostAddress)) {
- this.joinmotd.remove(hostAddress);
- }
- if (ipOrNull.getTempban() > currentTimeMillis && !ipOrNull.isWhitelisted()) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpTempbannedMessage().replace("je62)1", time(ipOrNull.getTempban() - currentTimeMillis)));
- return;
- }
- if ((!ipOrNull.isChecked() && (this.settings.isProxyVerificationEnabled() || this.settings.getBlacklistOrWhitelistCountry() != 3)) || this.ipcontroller.isInQueue(hostAddress)) {
- this.ipcontroller.addToQueue(hostAddress);
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpQueueMessage().replace("j/0>0", String.valueOf(this.ipcontroller.getQueueLocation(hostAddress))));
- return;
- }
- if (ipOrNull.isProxy() && !ipOrNull.isWhitelisted() && this.settings.isProxyVerificationEnabled()) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpProxyMessage());
- return;
- }
- if (!ipOrNull.getConnectionCaptcha()) {
- if (ipOrNull.getLastConnectionTime() <= -1L || ipOrNull.getLastConnectionTime() >= 100L) {
- if (this.times.containsKey(hostAddress)) {
- this.times.remove(hostAddress);
- }
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpVerificationMessage());
- return;
- }
- final IpInfo ipInfo = ipOrNull;
- ipOrNull.setConnectionCaptcha(true);
- ipInfo.setViolations(0);
- }
- if (currentTimeMillis - lastJoin <= this.settings.getJoinDelay() && this.settings.getJoinDelay() > 0L) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getJoinDelayMessage());
- return;
- }
- if (this.settings.isRefreshServerListEnabled()) {
- if (ipOrNull.getLastPing() == -1L && this.settings.isRefreshServerListEnabled()) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getRefreshServerListMessage());
- ipOrNull.setNick(name);
- return;
- }
- final IpInfo ipInfo2 = ipOrNull;
- final boolean empty = ipOrNull.getNick().isEmpty();
- if (!ipInfo2.getNick().equalsIgnoreCase(name) || empty) {
- ipOrNull.setLastPing(-1L);
- if (empty) {
- ipOrNull.setNick(name);
- a.setCancelled(true);
- a.setCancelReason(this.settings.getRefreshServerListMessage());
- return;
- }
- ipOrNull.setNick("");
- a.setCancelled(true);
- a.setCancelReason(this.settings.getIpVerificationMessage());
- return;
- }
- }
- if (!ipOrNull.isWhitelisted()) {
- final boolean contains = this.settings.getCountryList().contains(ipOrNull.getCountry());
- if (this.settings.getBlacklistOrWhitelistCountry() == 1 && !contains) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getCountryBannedMessage());
- return;
- }
- if (this.settings.getBlacklistOrWhitelistCountry() == 2 && contains) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getCountryBannedMessage());
- return;
- }
- }
- if (this.onlineByIP(hostAddress, this.settings.getPerIpPlayerLimit())) {
- a.setCancelled(true);
- a.setCancelReason(this.settings.getOnlineIpReachedMessage());
- return;
- }
- if (this.dev && !this.verbosePlayers.contains(name)) {
- this.verbosePlayers.add(name);
- }
- }
- @EventHandler
- public void onHandshakeisBlocked(final ProtocolHandlerEvent a) {
- if (a.isCancelled()) {
- this.status.addBlocked();
- }
- }
- public static String time2(final long a) {
- final long n = a / 1000L;
- final long n2 = n / 60L;
- final long n3 = n2 / 60L;
- final long l = n3 / 24L;
- return String.valueOf((l > 0L) ? new StringBuilder(String.valueOf(l)).append("w3.\"").toString() : "") + ((n3 > 0L) ? (String.valueOf((n3 <= 9L) ? "3" : "") + n3 % 24L + ":") : "") + ((n2 > 0L) ? (String.valueOf((n2 <= 9L) ? "1" : "") + n2 % 60L + "<") : "") + ((n % 60L <= 9L) ? ("7" + n % 60L) : Long.valueOf(n % 60L));
- }
- private /* synthetic */ void saveConfig(final Configuration a2, String a) {
- this.saveDefaultConfig(a, false);
- a = (String)new File(this.getDataFolder(), a);
- try {
- ConfigurationProvider.getProvider((Class)YamlConfiguration.class).save(a2, (File)a);
- }
- catch (Exception a2) {
- if (((File)a).exists()) {
- ((File)a).delete();
- }
- ((Throwable)a2).printStackTrace();
- }
- }
- public void sendServerInfo() {
- if (this.lastServerIp != null && !this.getAttackStatus()) {
- final Iterator<ListenerInfo> iterator;
- int int1 = 0;
- new Thread(() -> {
- this.getProxy().getConfig().getListeners().iterator();
- while (iterator.hasNext()) {
- int1 = Integer.parseInt(iterator.next().getHost().toString().split("8")[1]);
- }
- this.ipcontroller.isBlacklistedServer(int1, this.lastServerIp, this.getDescription().getVersion(), 0, false);
- }).start();
- }
- }
- public void saveDatabase() {
- try {
- final Configuration loadConfig = this.loadConfig("bglypsfpn9<=");
- boolean b = false;
- int i = 0;
- final long currentTimeMillis = System.currentTimeMillis();
- final Iterator<Map.Entry<String, IpInfo>> iterator = this.ipcontroller.getDatabase().entrySet().iterator();
- while (iterator.hasNext()) {
- final Map.Entry<String, IpInfo> entry = iterator.next();
- if (entry == null) {
- continue;
- }
- final IpInfo ipInfo2;
- final IpInfo ipInfo = ipInfo2 = entry.getValue();
- final String replace = ipInfo.getIp().replace("~", "");
- if (ipInfo2.getDatabaseAction() == 2 || currentTimeMillis - ipInfo.getLastConnection() >= 432000000L) {
- if (this.useDatabase) {
- loadConfig.set(replace, (Object)null);
- }
- this.ipcontroller.removeFromQueue(ipInfo.getIp());
- iterator.remove();
- ++i;
- b = true;
- }
- else {
- if (ipInfo.getDatabaseAction() == 0) {
- continue;
- }
- b = true;
- if (this.useDatabase) {
- final Configuration configuration = new Configuration();
- final Configuration configuration2 = loadConfig;
- final String s = replace;
- final Configuration configuration3 = configuration;
- final Configuration configuration4 = configuration;
- final Configuration configuration5 = configuration;
- final Configuration configuration6 = configuration;
- final Configuration configuration7 = configuration;
- final Configuration configuration8 = configuration;
- final Configuration configuration9 = configuration;
- final Configuration configuration10 = configuration;
- final Configuration configuration11 = configuration;
- final Configuration configuration12 = configuration;
- final Configuration configuration13 = configuration;
- configuration.set(":#", (Object)ipInfo.getIp());
- configuration13.set("ncur[w||pv4)=<", (Object)ipInfo.getLastConnection());
- configuration12.set("~sfa\u0010)3:", (Object)ipInfo.getLastPing());
- configuration11.set("~sfa\n/52", (Object)ipInfo.getLastJoin());
- configuration10.set("fpx7%4;", (Object)ipInfo.getTempban());
- configuration9.set(").7?", (Object)ipInfo.getNick());
- configuration8.set("qaQ}p$,23", (Object)ipInfo.isChecked());
- configuration7.set("{fE5(./", (Object)ipInfo.isProxy());
- configuration6.set("qz`)3#(", (Object)ipInfo.getCountry());
- configuration5.set("kuDtyqyy|4354", (Object)ipInfo.isBlacklisted());
- configuration4.set("kuQpqfwy|4367", (Object)ipInfo.isWhitelisted());
- configuration3.set("bNOlgerqw|Qte3$:3", (Object)ipInfo.getConnectionCaptcha());
- configuration2.set(s, (Object)configuration);
- }
- final IpInfo ipInfo3 = ipInfo;
- ++i;
- ipInfo3.setDatabaseAction(0);
- }
- }
- if (this.useDatabase && b) {
- this.saveConfig(loadConfig, "bglypsfpi>01");
- }
- System.out.println("WFI^\\syd\u001c1bKa\u0000\"#l#Sapc|([@p}=y`u`c4&*olnEHdkeglq}|f5.7/|" + i);
- final Iterator iterator2 = loadConfig.getKeys().iterator();
- while (iterator2.hasNext()) {
- loadConfig.set((String)iterator2.next(), (Object)null);
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- @EventHandler
- public void onQuit(final PlayerDisconnectEvent a) {
- if (this.verbosePlayers.contains(a.getPlayer().getName())) {
- this.verbosePlayers.remove(a.getPlayer().getName());
- }
- }
- @EventHandler(priority = Byte.MIN_VALUE)
- public void onConnectionHandler(final ConnectionEvent a) {
- if (this.ipcontroller == null) {
- a.setCancelled(true);
- return;
- }
- final String hostAddress = a.getAddress().getHostAddress();
- if (hostAddress.equalsIgnoreCase("&(~`nq") || hostAddress.startsWith("%-*6afyo")) {
- return;
- }
- final long currentTimeMillis;
- final long n = currentTimeMillis = System.currentTimeMillis();
- this.status.addCps();
- if (currentTimeMillis - this.serverStartTime <= 3000L) {
- a.setCancelled(true);
- return;
- }
- this.status.addIps(hostAddress, n);
- IpInfo ipOrNull = this.ipcontroller.getIpOrNull(hostAddress);
- if (ipOrNull == null) {
- ipOrNull = new IpInfo(hostAddress, -1L, -1L, -1L, -1L, "", false, false, "\n\u000e", false, false, false);
- ipOrNull.setDatabaseAction(1);
- this.ipcontroller.getDatabase().put(hostAddress, ipOrNull);
- }
- long n2 = 0L;
- Label_0239: {
- if (!ipOrNull.getConnectionCaptcha()) {
- if (this.times.containsKey(hostAddress)) {
- if (n - this.times.get(hostAddress) >= 10000L) {
- n2 = n;
- this.times.put(hostAddress, a.getTime());
- break Label_0239;
- }
- }
- else {
- this.times.put(hostAddress, a.getTime());
- }
- }
- n2 = n;
- }
- if (n2 - ipOrNull.getLastConnection() <= 300L) {
- a.setCancelled(true);
- }
- ipOrNull.setLastConnection(n);
- ipOrNull.getConnections().add(n);
- if (ipOrNull.isBlacklisted() && !ipOrNull.isWhitelisted() && this.ipcontroller.isInQueue(hostAddress)) {
- ipOrNull.setChecked(true);
- this.ipcontroller.removeFromQueue(hostAddress);
- }
- if ((ipOrNull.isBlacklisted() || ipOrNull.getTempban() > n) && !ipOrNull.isWhitelisted() && this.getAttackStatus()) {
- a.setCancelled(true);
- return;
- }
- final long connections10Sec = this.ipcontroller.getConnections10Sec(hostAddress);
- if (connections10Sec >= 40L) {
- if (connections10Sec >= 80L) {
- ipOrNull.setBlacklisted(true);
- ipOrNull.setChecked(false);
- a.setCancelled(true);
- return;
- }
- a.setCancelled(true);
- if (ipOrNull.isBlacklisted()) {
- return;
- }
- if (n - ipOrNull.getLastConnectionCheck() >= 10000L) {
- ipOrNull.setLastConnectionCheck(n);
- if (connections10Sec > 40L) {
- ipOrNull.setViolations(ipOrNull.getViolations() + 1);
- }
- }
- if (ipOrNull.getViolations() >= 3) {
- ipOrNull.setBlacklisted(true);
- }
- }
- if (ipOrNull.getChatCaptcha() == 0) {
- if (this.joinmotd.contains(hostAddress)) {
- ipOrNull.setViolations(ipOrNull.getViolations() + 1);
- if (ipOrNull.getViolations() >= 4) {
- ipOrNull.setTempban(n + 300000L);
- ipOrNull.setViolations(0);
- a.setCancelled(true);
- }
- this.joinmotd.remove(hostAddress);
- return;
- }
- this.joinmotd.add(hostAddress);
- }
- }
- @EventHandler(priority = Byte.MIN_VALUE)
- public void onHandshake(final ProtocolHandlerEvent a) {
- if (this.ipcontroller == null) {
- a.setCancelled(true);
- return;
- }
- final String hostAddress = a.getConnection().getAddress().getAddress().getHostAddress();
- if (hostAddress.equalsIgnoreCase(";*/;%pnsl") || hostAddress.startsWith(")!';ohdr")) {
- return;
- }
- final IpInfo ipOrNull = this.ipcontroller.getIpOrNull(hostAddress);
- final int requestedProtocol = a.getHandshake().getRequestedProtocol();
- if (requestedProtocol == 2) {
- if (this.lastServerIp == null) {
- this.lastServerIp = String.valueOf(a.getHandshake().getHost()) + "o" + a.getHandshake().getPort();
- this.sendServerInfo();
- }
- else {
- this.lastServerIp = String.valueOf(a.getHandshake().getHost()) + "n" + a.getHandshake().getPort();
- }
- }
- if (requestedProtocol <= 0 || requestedProtocol >= 3) {
- ipOrNull.setBlacklisted(true);
- a.setCancelled(true);
- return;
- }
- final long currentTimeMillis = System.currentTimeMillis();
- if (currentTimeMillis - this.serverStartTime <= 3000L) {
- a.setCancelled(true);
- return;
- }
- if (this.times.containsKey(hostAddress)) {
- if (!ipOrNull.getConnectionCaptcha()) {
- final long lastConnectionTime = currentTimeMillis - this.times.get(hostAddress);
- if (lastConnectionTime >= 100L && currentTimeMillis - ipOrNull.getLastJoin() <= 10000L && requestedProtocol == 2) {
- ipOrNull.setViolations(ipOrNull.getViolations() + 1);
- if (ipOrNull.getViolations() >= 4) {
- final IpInfo ipInfo = ipOrNull;
- final long n = currentTimeMillis;
- ipOrNull.setViolations(0);
- ipInfo.setTempban(n + 300000L);
- }
- }
- ipOrNull.setLastConnectionTime(lastConnectionTime);
- }
- this.times.remove(hostAddress);
- }
- if (requestedProtocol == 1) {
- ipOrNull.setLastPing(currentTimeMillis);
- this.status.addPps();
- }
- if (requestedProtocol == 2) {
- this.status.addLps();
- }
- }
- public void sendTitle(final ProxiedPlayer a, final String a, final String a) {
- final BungeeTitle bungeeTitle = new BungeeTitle();
- bungeeTitle.title(TextComponent.fromLegacyText(a));
- bungeeTitle.subTitle(TextComponent.fromLegacyText(a));
- bungeeTitle.fadeIn(10);
- bungeeTitle.fadeOut(10);
- bungeeTitle.stay(60);
- bungeeTitle.send(a);
- }
- public void updateAttackStatus(long a, int a) {
- final long currentTimeMillis = System.currentTimeMillis();
- if (a > a) {
- if (!this.attackStatus) {
- this.timeAttackStart = currentTimeMillis;
- final long oldPeak;
- final long n;
- final Iterator<ProxiedPlayer> iterator;
- ProxiedPlayer proxiedPlayer;
- final String s;
- new Thread(() -> {
- while (true) {
- try {
- Thread.sleep(3000L);
- }
- catch (InterruptedException ex) {}
- if (!this.attackStatus) {
- break;
- }
- else {
- this.status.getPeak();
- this.status.getOldPeak();
- if (oldPeak > n) {
- new StringBuilder("\u00e6\"uw\u000b\u00152(cHf}\"t+? ;³#Eppz: ").append(this.getColor(n)).append(this.formatter.format(n)).append("5²&<=#").append(this.getColor(oldPeak)).append(this.formatter.format(oldPeak)).append("\"¥(o~i4gpv~\u007ff,").toString();
- this.status.setOldPeak(oldPeak);
- this.getProxy().getPlayers().iterator();
- while (iterator.hasNext()) {
- proxiedPlayer = iterator.next();
- if (this.verbosePlayers.contains(proxiedPlayer.getName())) {
- proxiedPlayer.sendMessage(s);
- }
- }
- }
- else {
- continue;
- }
- }
- }
- this.status.setOldPeak(0L);
- return;
- }).start();
- a = (long)this.getProxy().getPlayers().iterator();
- while (((Iterator)a).hasNext()) {
- a = ((Iterator<Integer>)a).next();
- if (this.verbosePlayers.contains(((ProxiedPlayer)a).getName()) || ((ProxiedPlayer)a).hasPermission("{yabm\",,")) {
- this.sendTitle((ProxiedPlayer)a, "¡kBi~LcexBo7c1s", "\u00adV`'07$w%ou(}OEh\u007f1ptt\" -h" + (this.verbosePlayers.contains(((ProxiedPlayer)a).getName()) ? "" : "(¯G\u000elo1ger!,6 "));
- }
- }
- }
- this.attackStatus = true;
- this.attackTimer = currentTimeMillis + 30000L;
- return;
- }
- if (currentTimeMillis > this.attackTimer) {
- this.attackStatus = false;
- this.status.setBlocked(0L);
- this.status.setPeak(0L);
- this.status.setOldPeak(0L);
- this.timeAttackStart = 0L;
- this.status.clearIps();
- }
- }
- public boolean getAttackStatus() {
- return this.attackStatus;
- }
- public void kickOnlineByIP(final String a, final String a) {
- for (final ProxiedPlayer proxiedPlayer : this.getProxy().getPlayers()) {
- if (proxiedPlayer.getAddress().getAddress().getHostAddress().equalsIgnoreCase(a)) {
- proxiedPlayer.disconnect(a);
- this.status.addBlocked();
- }
- }
- }
- @EventHandler(priority = Byte.MIN_VALUE)
- public void onHandshakeLegacy(final PlayerHandshakeEvent a) {
- if (this.ipcontroller == null) {
- this.disconnect(a);
- return;
- }
- if (System.currentTimeMillis() - this.serverStartTime <= 3000L) {
- this.disconnect(a);
- }
- }
- @EventHandler
- public void onChat(ChatEvent a) {
- a = (ChatEvent)a.getSender().getAddress().getAddress().getHostAddress();
- final IpInfo ipOrNull = this.ipcontroller.getIpOrNull((String)a);
- if (ipOrNull == null) {
- return;
- }
- if (ipOrNull.getChatCaptcha() == 0) {
- this.kickOnlineByIP((String)a, "¹pFdoog}{\u000e\u001fa%|mnfxi7eVPyu!2'm");
- return;
- }
- if (ipOrNull.getChatCaptcha() == 1) {
- ipOrNull.setViolations(0);
- }
- }
- private /* synthetic */ void checkUpdate() {
- final String s;
- new Thread(() -> {
- try {
- this.ipcontroller.getURLString(".((`*//::r+dfcb,tk`n55>53(m:\"{4vjsa>9,[RE\u0007((5\u00158\u007f-}x.(~sm1FFKKRROODD \f\fU+b{2>!$:$<\">!ia$$56", true);
- try {
- if (s.split("\\ ")[1].equalsIgnoreCase(getInstace().getDescription().getVersion()) || s.contains("12/")) {
- Main.lasted = true;
- if (!this.updateCheck) {
- this.getProxy().getLogger().info("UMO\u0005\u001bkqsX9\"\rp\t</+\u007f*&Gtcw.~d:o5/2;z6jxet)mfu~\u007fwq}3lxxz<V0'\u00187ydId{#3dcc<xxt6%?\u007fkz");
- this.updateCheck = true;
- }
- }
- else {
- Main.lasted = false;
- }
- }
- catch (Exception ex2) {
- Main.lasted = false;
- }
- if (!Main.lasted) {
- this.getProxy().getLogger().severe("\u00e1=\u0007\u0011\u0013TJ\u007fe$\u000f\u007fdQ,¹x]v}*bgx}\f\u001dx>bxeo/{|3^\\MS~d:\u0011~e/y" + this.getDescription().getVersion() + "s?,&p" + s.split("['")[1] + ":\")(1<?jo1p9mxdx|m$<<}}`9vt\u001f\u001e%}ch\u007f$kjgr}xa<`x#l{v93");
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- }).start();
- }
- @EventHandler(priority = 64)
- public void onJoin(final PostLoginEvent a) {
- if (a.getPlayer().hasPermission("PRzyq>::") && !this.isLasted()) {
- a.getPlayer().sendMessage((BaseComponent)new TextComponent("\u00adkteDSZuc~Ali@b\u00e5:\u0012/=2gdpdq2w|uiro+cx`\n_HKdtiUx(||wiplo>;{:\u007f+ye9=c*##iid=`bsrn6\u001a\u0011q*hiyltqd9JRk$6;j`"));
- }
- }
- private /* synthetic */ void saveDefaultConfig(String a, boolean a) {
- if (!this.getDataFolder().exists()) {
- this.getDataFolder().mkdir();
- }
- final File file = new File(this.getDataFolder(), a);
- if (a && file.exists()) {
- file.delete();
- }
- final File file2 = new File(this.getDataFolder(), a);
- if (!file2.exists()) {
- try {
- boolean b = (boolean)null;
- a = (boolean)null;
- try {
- a = (String)this.getResourceAsStream(a);
- try {
- Files.copy((InputStream)a, file2.toPath(), new CopyOption[0]);
- ((InputStream)a).close();
- }
- finally {
- if (a != null) {
- ((InputStream)a).close();
- }
- }
- }
- finally {
- if (b == null) {
- b = a;
- }
- else if (b != a) {
- ((Throwable)b).addSuppressed((Throwable)a);
- }
- }
- }
- catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- }
- public boolean command(final CommandSender a, final String[] a) {
- if (a.length == 0) {
- a.sendMessage("uUpq~?\"cns'areu~bo*q|\t\u0012>&-le\u007fibri4bxowz*<^t");
- return true;
- }
- if (a[0].equalsIgnoreCase("073:")) {
- int int1 = 25565;
- final Iterator<ListenerInfo> iterator = (Iterator<ListenerInfo>)this.getProxy().getConfig().getListeners().iterator();
- while (iterator.hasNext()) {
- int1 = Integer.parseInt(iterator.next().getHost().toString().split("l")[1]);
- }
- a.sendMessage("+\u0001§aWUKUsi|W6-w!" + this.getDescription().getVersion() + "Z" + "\u00ec*@tsoxe-7¶w@b9%\t\u0015:tEheyiqhx4<WU&Lli\u001fx" + "X" + "£eIj<!,=b*k\u00ecgissgd-8>e}c((\u001f\bx5b`$ahedn{zux{g0(&6" + "V" + "°vDxeo0|\u00fb\u001c\u0012,,}~1$/wjj:~uypcw78)" + "^" + "º|Gqokpglv\u00f23" + this.ipcontroller.getSvip() + "l" + int1 + "]w");
- if (System.currentTimeMillis() - this.lastcheck >= 900000L) {
- this.lastcheck = System.currentTimeMillis();
- a.sendMessage("F\u0010\u0012\u0004\u001a~d\"\tnuZ'Are~wxik28\u001aU0&ylod d|=vx|~~y?%$~");
- a.sendMessage("\u0010\u0001I^Fic~UxeL*Y9.\u0003\u001c0;\u007f-ej bq|w\u007fqtfalv\u00f60" + (this.BlacklistChecker() ? "\u0005;?" : "\u0018°<"));
- }
- return true;
- }
- if (a[0].equalsIgnoreCase("kpg49/9")) {
- if (this.verbosePlayers.contains(a.getName())) {
- this.verbosePlayers.remove(a.getName());
- a.sendMessage("J|b7smqqz83v~\u007f<keni c7errtc|9|\u0014\u001b,1ob\u007f+noitr}~|a|98.s");
- }
- else {
- this.verbosePlayers.add(a.getName());
- a.sendMessage("Dr.{(6||k)d!ih`7errtc|9|\u0015\u001a%8ob\u007f+noitr}~|a|89'z");
- }
- return true;
- }
- if (a instanceof ProxiedPlayer && !a.hasPermission("wutwy699")) {
- a.sendMessage("\u00ecbXhr7sxy6e*b=*\u0011T#6\u007f`bxsirs4rro5a?6\"x");
- return true;
- }
- if (a.length == 0 || a[0].equalsIgnoreCase("?2;'")) {
- a.sendMessage("5]x1>c~ncc7ar%5htf#58/4<$|=ntibza|*rewzse\u001d84;~cs~~*gx\u007fbah3)y-;n'x=:bj> `mhWql|usi.z:{`y~<-lu\u007fvsbnx\u00174zyc~u,73q~s.&tqbe4(xa`!sya4 -7U0={srwst&g0y& to$#dlxwqy\u00141t{exux\rYw`ac{h1-\u007ff2spze0<1}/\"*b{t1g&5,x:(ij`|y?3i,gsik$`6#\u007f|pb~\u0011s=6,38\u007fd,oid~v-17.9x%/1d#. cnc?7\u0014]\u007fwrol`ex98y?{fi$l-ceox\u00136an(5xug3asbq|q3`ynu0nkpeuv)?!l~u$+zpvcmksnQt:5dy)$u!cuxg7:1uxe,|\u0015\u00189ud}x+frrp4p|itw6$5Z");
- return true;
- }
- if (a[0].equalsIgnoreCase("fa6#$\"") || a[0].equalsIgnoreCase("f#6&!") || a[0].equalsIgnoreCase(";> '")) {
- a.sendMessage("ySªhB[s ts4ehx`pmw\u00fb:" + this.ipcontroller.getQueueSize() + "W" + "\u00f31_}\t\u0014s`,}xhdt6buo|x4#d~\u00f32" + this.ipcontroller.getNowSize() + "_" + "¹{+\u0010qd`,ileptwnx9p #d~\u00f10" + this.ipcontroller.getTotalDatabaseIps() + "]" + "\u00de\u001cQjxma-\u007f~6forap5#d~\u00f76" + this.ipcontroller.getTotalNonProxies() + "[" + "¢iXbyp}6forap5#d~\u00f54" + this.ipcontroller.getTotalProxies() + "Y" + "°1\u0000qj\u0014\u0019%g`mnf}xebxy9p #d~\u00fb:" + this.ipcontroller.getTotalBlacklisted() + "W" + "°1\u0000pk\u001c\u0011%rdeyh}xebxy9p #e\u007f\u00f32" + this.ipcontroller.getTotalWhitelisted() + "_" + "¢`Xcyl}1f\u007fsz9p #e\u007f\u00f10" + this.ipcontroller.getTotalPing() + "]" + "\u00f31Kp\r\u0018i%e|~-et{f\u007f|ww54e\u007f\u00f76" + this.ipcontroller.getTotalTempbanned() + "[");
- return true;
- }
- if (a[0].equalsIgnoreCase("\":,7&")) {
- this.status.setPeak(0L);
- this.status.setOldPeak(0L);
- a.sendMessage("Atw}=tj9\"5,:'}");
- return true;
- }
- if (a[0].equalsIgnoreCase("jqp$536/(")) {
- if (a.length == 1) {
- a.sendMessage("Oim(8v: v}\u001b\u0000%rdeyh}xeb=!pi\u007f>6<6c");
- return true;
- }
- int i = 0;
- for (final IpInfo ipInfo : this.ipcontroller.getIps()) {
- if (ipInfo.getIp().equalsIgnoreCase(a[1]) || ipInfo.getNick().equalsIgnoreCase(a[1])) {
- final IpInfo ipInfo2 = ipInfo;
- final IpInfo ipInfo3 = ipInfo;
- final IpInfo ipInfo4 = ipInfo;
- final IpInfo ipInfo5 = ipInfo;
- ipInfo.setBlacklisted(false);
- ipInfo5.setWhitelisted(true);
- ipInfo4.setChecked(true);
- ipInfo3.setTempban(-1L);
- ++i;
- ipInfo2.setViolations(0);
- this.ipcontroller.removeFromQueue(ipInfo.getIp());
- }
- }
- if (i > 0) {
- a.sendMessage("A~ti|u9#(90t" + i + "\\lu\u007f,bc1e~s=yxm12=/0{");
- }
- else {
- a.sendMessage("Rncy7b/9i4lu:tm~ret8s{\u0018\u001aa%eb-b\u007f1b~tn9j5\"*9$x");
- }
- return true;
- }
- else if (a[0].equalsIgnoreCase("\u007fux3;05$#")) {
- if (a.length == 1) {
- a.sendMessage("Oim(8v: u~\u0016\r%g`mnf}xeb=!pi\u007f>5?;n");
- return true;
- }
- int j = 0;
- for (final IpInfo ipInfo6 : this.ipcontroller.getIps()) {
- if (ipInfo6.getIp().equalsIgnoreCase(a[1]) || ipInfo6.getNick().equalsIgnoreCase(a[1])) {
- final IpInfo ipInfo7 = ipInfo6;
- ipInfo6.setWhitelisted(false);
- ++j;
- ipInfo7.setBlacklisted(true);
- this.kickOnlineByIP(a[1], "°?\u0005tnw%SJ(iss&1ooX\u000fdv,nalrzz\u007fni|}p89.4\u007f");
- }
- }
- if (j > 0) {
- a.sendMessage("Tz|~ru9#(96r" + j + "Zlu\u007f,bc1e~s=yxm12=/6}");
- }
- else {
- a.sendMessage("Rncy7b/9i4lu:tm~ret8s{\u0012\u0010a%eb-b\u007f1b~tn9j5\"*9.r");
- }
- return true;
- }
- else if (a[0].equalsIgnoreCase("349>6")) {
- if (a.length == 1) {
- a.sendMessage("Bd1t2|\u0013\tlgcx-nytu}=!pi\u007f>4>?j");
- return true;
- }
- int k = 0;
- for (final IpInfo ipInfo8 : this.ipcontroller.getIps()) {
- if (ipInfo8.getIp().equalsIgnoreCase(a[1]) || ipInfo8.getNick().equalsIgnoreCase(a[1])) {
- final StringBuilder append = new StringBuilder("=\u0017¾|\u0019\u0000g}\u00f23").append(ipInfo8.getIp()).append("\\").append("±xMkv()g}\u00f01").append(ipInfo8.isProxy()).append("Z").append("ªt]wei=wp3;g}\u00f67").append(ipInfo8.getNick()).append("X").append("«hN~dxbod9M17g}\u00f45").append(ipInfo8.getCountry()).append("V").append("ªt]wei=j|5>g}\u00fa;").append(time(System.currentTimeMillis() - ipInfo8.getLastConnection())).append("^").append("ªhEt{f\u007f|ww54`z\u00f23").append((ipInfo8.getTempban() > System.currentTimeMillis()) ? new StringBuilder().insert(0, time(ipInfo8.getTempban() - System.currentTimeMillis())).toString() : "89").append("]").append("«hO}pu}qtjm54`z\u00f76").append(ipInfo8.isBlacklisted()).append("[").append("«hZyxbsqtjm54`z\u00f54").append(ipInfo8.isWhitelisted()).append("Y").append("¶sFts~~54`z\u00fb:").append((ipInfo8.getLastPing() > 0L) ? time(System.currentTimeMillis() - ipInfo8.getLastConnection()) : "32").append("^");
- final String str = "¶sUuxzr54a{\u00f23";
- ++k;
- a.sendMessage(append.append(str).append(ipInfo8.isChecked()).toString());
- }
- }
- if (k > 0) {
- a.sendMessage("9\u0013\u0016?.52v" + k + "^lu\u007f,bc1e~s=yxm12:(2y");
- }
- else {
- a.sendMessage("Rncy7b/9i4lu:tm~ret8t|\u001e\u001ca%eb-b\u007f1b~tn9j5\"->\"~");
- }
- return true;
- }
- else {
- if (a[0].equalsIgnoreCase("\"564'4")) {
- ArrayList<Object> list;
- final Iterator<IpInfo> iterator5;
- IpInfo ipInfo9;
- int l = 0;
- final IpInfo ipInfo10;
- new Thread(() -> {
- if (a.length == 1) {
- a.sendMessage("jL6sp>d~`kmv?m~v{bp5*\u007fw9");
- return;
- }
- else {
- list = (ArrayList<Object>)new ArrayList<IpInfo>();
- list.addAll(this.ipcontroller.getIps());
- list.iterator();
- while (iterator5.hasNext()) {
- ipInfo9 = iterator5.next();
- if (ipInfo9.getIp().equalsIgnoreCase(a[1]) || ipInfo9.getNick().equalsIgnoreCase(a[1])) {
- ++l;
- ipInfo10.setDatabaseAction(2);
- }
- }
- this.saveDatabase();
- if (l > 0) {
- a.sendMessage("Fqxz`sb&" + l + "s8!y*fg\"vwz;\u007fu`twwel'");
- return;
- }
- else {
- a.sendMessage("\t5$>j?tbd9ul>ppctca-PX464pcd)fl\"kwrh4gpg`sz&");
- return;
- }
- }
- }).start();
- return true;
- }
- if (a[0].equalsIgnoreCase("&5)24+")) {
- if (a.length == 1 || !this.ipcontroller.isIpV4(a[1])) {
- a.sendMessage("Nh\u001fZ*dbxdo~e6`xop\u007f)pg2#m");
- return true;
- }
- this.ipcontroller.check(a[1]);
- a.sendMessage(String.valueOf(a[1]) + "q0bbon7c3|m~wl|skic~;:;h\u0010\u0010%wi\u007fxaeb6ys=zv>#479r");
- return true;
- }
- else {
- if (a[0].equalsIgnoreCase("?)2-")) {
- final Iterator<IpInfo> iterator6;
- final Iterator<ProxiedPlayer> iterator7;
- final String a2;
- IpInfo value;
- new Thread(() -> {
- this.ipcontroller.getIps().iterator();
- while (iterator6.hasNext()) {
- iterator6.next().setDatabaseAction(2);
- }
- this.saveDatabase();
- a.sendMessage("\u0005&&'cwb}~\u007fmpf1p3$\u001f]777ynxfyrg{?zup4ftarf#");
- this.getProxy().getPlayers().iterator();
- while (iterator7.hasNext()) {
- iterator7.next().getAddress().getAddress().getHostAddress();
- if (!a2.equalsIgnoreCase("*&#;%9'-2")) {
- if (a2.startsWith("%-';&!8.")) {
- continue;
- }
- else if (this.ipcontroller.getIpOrNull(a2) == null) {
- value = new IpInfo(a2, -1L, -1L, -1L, -1L, "", false, false, "MI", false, false, false);
- value.setDatabaseAction(1);
- this.ipcontroller.getDatabase().put(a2, value);
- if (!value.isChecked() || this.ipcontroller.isInQueue(a2)) {
- this.ipcontroller.addToQueue(a2);
- }
- else {
- continue;
- }
- }
- else {
- continue;
- }
- }
- }
- return;
- }).start();
- return true;
- }
- if (a[0].equalsIgnoreCase("+9\"1")) {
- new Thread(() -> {
- this.saveDatabase();
- a.sendMessage("K{{<x\u001a\u000f30l~nx/nav4vww~0 2dwd!");
- return;
- }).start();
- return true;
- }
- if (a[0].equalsIgnoreCase("br\u007fux3;41&!")) {
- int m = 0;
- for (final IpInfo ipInfo11 : this.ipcontroller.getIps()) {
- if ((ipInfo11.getNick().isEmpty() || ipInfo11.getNick().length() == 16) && !ipInfo11.isProxy() && ipInfo11.getLastPing() <= 0L && !ipInfo11.isWhitelisted() && !ipInfo11.isBlacklisted()) {
- final IpInfo ipInfo12 = ipInfo11;
- ++m;
- ipInfo12.setBlacklisted(true);
- }
- }
- a.sendMessage(String.valueOf(m) + "%dhhhi1ey6\u007fqxz;<1+\"x");
- return true;
- }
- if (a[0].equalsIgnoreCase("m? *7/.")) {
- int i2 = 0;
- for (final IpInfo ipInfo13 : this.ipcontroller.getIps()) {
- if ((ipInfo13.getNick().isEmpty() || ipInfo13.getNick().length() == 16) && ipInfo13.isBlacklisted() && ipInfo13.getLastPing() <= 0L && !ipInfo13.isWhitelisted() && !ipInfo13.isProxy()) {
- final IpInfo ipInfo14 = ipInfo13;
- ++i2;
- ipInfo14.setProxy(true);
- }
- }
- a.sendMessage(String.valueOf(i2) + "%dhhhi1ey6mova)<1+$~");
- return true;
- }
- if (a[0].equalsIgnoreCase("\"54705")) {
- new Thread(() -> {
- try {
- this.loadPluginConfig();
- a.sendMessage("\u000e,!j:krq\u007fr<}q{sxv43^K=;7y}kz)`gzq;iqxztut`*");
- return;
- }
- catch (Exception ex) {
- ex.printStackTrace();
- a.sendMessage("¶r\\k.3){75~7?kpgpsli9m~sz9*+,#`rdwhuqp95bt$a\\P:'74o*ofp\"rpi~4ppap}v+");
- return;
- }
- }).start();
- return true;
- }
- return false;
- }
- }
- }
- public boolean BlacklistChecker() {
- try {
- int int1 = 25565;
- final Iterator<ListenerInfo> iterator = this.getProxy().getConfig().getListeners().iterator();
- while (iterator.hasNext()) {
- int1 = Integer.parseInt(iterator.next().getHost().toString().split("~")[1]);
- }
- if (!this.ipcontroller.isBlacklistedServer(int1, this.lastServerIp, this.getDescription().getVersion(), 0, true).equalsIgnoreCase("<2?6 ")) {
- this.getProxy().getLogger().severe("ETYNZu(5\u0012?,\u0005l\u0018edt'\u007fitp2%2q`o10%q(.d!\u0001\u0003qo}gyRqj\u0016@7#r`r;)}='-ozwt|]Xbepq7d?(%68d");
- this.getProxy().getLogger().severe("]LL[\u00169jwS~oF|\u0019#$=x>(\u007f{ncc~&h´82bne:\u007f$\"=.!nk\u0001fqR}dy\\qB\u0016u73c=;.}09h-sec\u00f6\u0011_p1wyvt16: ?e");
- this.getProxy().getLogger().severe("\fP\u0001\u0015\u0017\r\u0013*0#\bkpP-;;--//&&&&aann\u007f\u007fcc>>==;;aa\t\t,, bbHHaa88;;55##-->>==\u0011\u0011''iiiiff<\u000bXgc<;^~yp5)?40)$(5j%z/nxbw<TIU\u000ezdrc\u00f6e+x93=kiz}cyd\u001ay6NL\u0005\u001b='+\u00001*#m\u00e3o&v38Q\u0014bto=trQT2}7'&:#/zl*k!ib~G\u0013yo µ^16{cmvt{|rhy-GP\u0019\u0015U]KA\u0007\u000bVJz+yi!wie\u00ee$:>ylt15$kxq>\u007f~cp\u0000Iqcy6wa0;-xj':171;:!`(.]]v3~\u007fmmY\u0016\u00194%5<!k\u0005a}~zr;\"\"DDk2`but,t<76ms~\u007foxes7'6uf#n'/j934jcslg\u00e1\u00f1a$y\u0014E[YDZ2(9\u00126-\u0019d00::11;;jj//<<bbmmhh<<vv\u0013\u0013..--##\u000b\u000b>>..ooaaaa00++**\f\f,,((**ggoo\u007fH");
- this.getProxy().getPluginManager().unregisterCommands((Plugin)getInstace());
- this.getProxy().getPluginManager().unregisterListeners((Plugin)getInstace());
- this.getProxy().getScheduler().cancel((Plugin)getInstace());
- getInstace().onDisable();
- return true;
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- this.getProxy().getLogger().info("\u001e\u000fERFixeDi#\n2Qnt3;p>; !b#.ME3`ubh{D\u0016aorp9>5/)q-i\u007fevu]X\u007fv5y~d.?<710");
- this.getProxy().getLogger().severe("_N\u001f\b_pexYt(\u0001p\u001eº6f bd'wc\u007fu\u00eb!2~2wd-66946s!*kLBrp{|wmB\u0016gl3{=!(p~:h~wb~aP_u~5y~d.?<723");
- this.getProxy().getLogger().severe("\f\u0002STVOQmwiBCXG:iiiiee<<**--&&00((gg{{}}yyww2266++!!;;gg<<**xx$$oo77,,77--++99gP\u0016!0-}9f#cohc$¿[\u0014r~p=`!zX\u00198 zp\u0016nc}h*nd!dcGVnr1 k^\u0019;drdx0q;QeIpcz8twtp#'}vy)i``!Niwt23\u007fyt|zOZx!=*e1txx\u007f0fsvw3)yl'b1+\"5v3l!($@Zrg\u007f0}q[\u0016<}\u001c>\u00145y\u0005a}~zr;\"\"DDk2`but,t<75ns~\u007foxes7'6uf#n'/j907jcslg\u00e1\u00f1a$y\u0014E[YDZ2(9\u00126-\u001ag00::11;;jj//<<bbmmkk<<vv\u0013\u0013..--##\u000b\u000b>>..ooaabb00++**\f\f,,((**ggoo|K");
- this.getProxy().getPluginManager().unregisterCommands((Plugin)getInstace());
- this.getProxy().getPluginManager().unregisterListeners((Plugin)getInstace());
- this.getProxy().getScheduler().cancel((Plugin)getInstace());
- getInstace().onDisable();
- return true;
- }
- return false;
- }
- private /* synthetic */ Configuration loadConfig(final String a) {
- this.saveDefaultConfig(a, false);
- final File file = new File(this.getDataFolder(), a);
- try {
- return ConfigurationProvider.getProvider((Class)YamlConfiguration.class).load(file);
- }
- catch (Exception ex) {
- if (file.exists()) {
- file.delete();
- }
- return this.loadConfig(a);
- }
- }
- public void onEnable() {
- this.getProxy().getLogger().info("!0\u001d\nLc\u007fbNchA\u001coj\u007fga:=<u\u007f\u007f");
- if (!this.getDescription().getName().equals("TVJT='2\u0019?$")) {
- this.getProxy().getLogger().severe("UMO\u0005\u001bkqsX:!\u000fr0,?-be(\u007fkjw4ypt} !r~='+e~em?usckpwivn*vd?k\u0012\u001fw8\u007fdlbbmp<LPky|{s=:66}");
- return;
- }
- Main.instance = this;
- this.ipcontroller = new IpController();
- final long currentTimeMillis = System.currentTimeMillis();
- this.lastcheck = System.currentTimeMillis();
- final BungeeConsoleFilter filter = new BungeeConsoleFilter();
- BungeeCord.getInstance().getLogger().setFilter(filter);
- Logger.getLogger("\\k{r66\u00184 6").setFilter(filter);
- Logger.getGlobal().setFilter(filter);
- this.getLogger().setFilter(filter);
- this.getProxy().getLogger().setFilter(filter);
- ProxyServer.getInstance().getLogger().setFilter(filter);
- this.getProxy().getLogger().setFilter(filter);
- if (this.BlacklistChecker()) {
- return;
- }
- this.getProxy().getPluginManager().registerListener((Plugin)this, (Listener)this);
- new Pipeline();
- try {
- this.loadPluginConfig();
- if (this.useDatabase) {
- final Configuration loadConfig = this.loadConfig("X]j\u007fwt 6u\"01");
- boolean b = false;
- for (final String str : loadConfig.getKeys()) {
- try {
- final Configuration section = loadConfig.getSection(str);
- final IpInfo value = new IpInfo(section.getString("5,"), section.getLong("p}OH]q{{60 =:;"), section.getLong("yt '\u0004=:3"), section.getLong("yt '\u001e;>9"), section.getLong("a6>$678"), section.getString(":=2:"), section.getBoolean("wfV;67?54"), section.getBoolean("| \u0003&;+*"), section.getString("v<&: +"), section.getBoolean("uO~r\u007fv~?:' 89"), section.getBoolean("uOkvwap?:' 98"), section.getBoolean("hcbry_Hwq{V2#!6=4"));
- this.ipcontroller.getDatabase().put(value.getIp(), value);
- }
- catch (Exception ex2) {
- System.out.println("WFVAR}~cUxkBT\u0011\"\"b\u007f+db,ps]X>j}ps#4!<t" + str);
- try {
- loadConfig.set(str, (Object)null);
- b = true;
- }
- catch (Exception ex3) {}
- }
- }
- System.out.println("VGCTMbhu~SjC5y<2103w" + this.ipcontroller.getDatabase().size() + "T;\"~-myca<hTY>zta214&3x");
- if (b) {
- this.saveConfig(loadConfig, "X]j\u007fwt 6{,<=");
- }
- final Iterator iterator2 = loadConfig.getKeys().iterator();
- while (iterator2.hasNext()) {
- loadConfig.set((String)iterator2.next(), (Object)null);
- }
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- ProxyServer.getInstance().getScheduler().schedule((Plugin)this, (Runnable)new Runnable() {
- @Override
- public void run() {
- final Iterator<Map.Entry<K, IpInfo>> iterator;
- Map.Entry<K, IpInfo> entry;
- final long n;
- final Iterator<Map.Entry<K, Long>> iterator2;
- Map.Entry<K, Long> entry2;
- final Iterator<ProxiedPlayer> iterator3;
- final IpInfo ipInfo;
- new Thread(() -> {
- System.currentTimeMillis();
- try {
- new HashMap<Object, IpInfo>(Main.this.ipcontroller.getDatabase()).entrySet().iterator();
- while (iterator.hasNext()) {
- entry = iterator.next();
- Main.this.ipcontroller.getConnections10Sec(entry.getValue().getIp());
- if (n - entry.getValue().getLastConnection() > 60000L) {
- Main.this.ipcontroller.getIpOrNull(entry.getValue().getIp()).getConnections().clear();
- }
- if ((n - entry.getValue().getLastConnection() > 120000L || entry.getValue().isBlacklisted() || entry.getValue().getTempban() > n) && Main.this.ipcontroller.isInLongQueue(entry.getValue().getIp())) {
- Main.this.ipcontroller.removeFromLongQueue(entry.getValue().getIp());
- }
- }
- new HashMap<Object, Long>(Main.this.times).entrySet().iterator();
- while (iterator2.hasNext()) {
- entry2 = iterator2.next();
- if (n - entry2.getValue() > 60000L) {
- Main.this.times.remove(entry2.getKey());
- }
- }
- }
- catch (Exception ex) {}
- Main.this.getProxy().getPlayers().iterator();
- while (iterator3.hasNext()) {
- Main.this.ipcontroller.getIpOrNull(iterator3.next().getAddress().getAddress().getHostAddress());
- if (ipInfo != null) {
- if (ipInfo.isBlacklisted()) {
- Main.this.kickOnlineByIP(ipInfo.getIp(), Main.this.settings.getIpBlacklistedMessage());
- }
- else if (ipInfo.getTempban() > n) {
- Main.this.kickOnlineByIP(ipInfo.getIp(), Main.this.settings.getIpTempbannedMessage().replace("('{\u007fay", Main.time(ipInfo.getTempban() - n)));
- }
- else {
- continue;
- }
- }
- }
- }).start();
- }
- }, 0L, 10L, TimeUnit.SECONDS);
- ProxyServer.getInstance().getScheduler().schedule((Plugin)this, (Runnable)new Runnable() {
- @Override
- public void run() {
- try {
- final HashMap<String, Integer> hashMap = new HashMap<String, Integer>();
- final ArrayList<String> list = new ArrayList<String>();
- final Iterator<ProxiedPlayer> iterator = (Iterator<ProxiedPlayer>)Main.this.getProxy().getPlayers().iterator();
- while (iterator.hasNext()) {
- list.add(iterator.next().getAddress().getAddress().getHostAddress());
- }
- final Iterator<Object> iterator2 = list.iterator();
- while (iterator2.hasNext()) {
- final String[] split = iterator2.next().split("\u0007u");
- final String string = String.valueOf(split[0]) + "v" + split[1] + "w" + split[2];
- if (hashMap.containsKey(string)) {
- continue;
- }
- final Iterator<Object> iterator3 = list.iterator();
- while (iterator3.hasNext()) {
- if (iterator3.next().startsWith(string)) {
- hashMap.put(string, hashMap.getOrDefault(string, 0) + 1);
- }
- }
- }
- int n = 0;
- for (final String s : list) {
- for (final Map.Entry<String, Integer> entry : hashMap.entrySet()) {
- if (s.startsWith(entry.getKey()) && entry.getValue() >= 5) {
- final IpInfo ipOrNull = Main.this.ipcontroller.getIpOrNull(s);
- if (ipOrNull == null) {
- continue;
- }
- ipOrNull.setBlacklisted(true);
- final Main this$0 = Main.this;
- ++n;
- this$0.kickOnlineByIP(s, Main.this.settings.getIpBlacklistedMessage());
- }
- }
- }
- if (n > 0) {
- final long currentTimeMillis = System.currentTimeMillis();
- for (final IpInfo ipInfo : Main.this.ipcontroller.getIps()) {
- if (currentTimeMillis - ipInfo.getLastConnection() > 1800000L) {
- continue;
- }
- for (final Map.Entry<String, Integer> entry2 : hashMap.entrySet()) {
- if (ipInfo.getIp().startsWith(entry2.getKey()) && entry2.getValue() >= 5) {
- ipInfo.setBlacklisted(true);
- }
- }
- }
- }
- }
- catch (Exception ex) {}
- }
- }, 0L, 5L, TimeUnit.SECONDS);
- ProxyServer.getInstance().getScheduler().schedule((Plugin)this, (Runnable)new Runnable() {
- @Override
- public void run() {
- final long n2;
- long n;
- final long a;
- final long a2;
- ArrayList<String> elements;
- String a3 = null;
- String string;
- final StringBuilder sb;
- String string2;
- final StringBuilder sb2;
- final long n3;
- String string3;
- final StringBuilder sb3;
- final long number;
- String string4;
- final StringBuilder sb4;
- String string5;
- final StringBuilder sb5;
- String string6;
- final StringBuilder sb6;
- final Iterator<ProxiedPlayer> iterator;
- ProxiedPlayer a4;
- new Thread(() -> {
- try {
- Main.this.status.getLps();
- Main.this.status.getPps();
- Main.this.status.getCps();
- Main.this.status.getBlocked();
- try {
- Main.this.status.getIpPerSecond();
- n = n2;
- }
- catch (Exception ex2) {
- n = n2;
- }
- if (n > Main.this.status.getPeak()) {
- Main.this.status.setPeak(n2);
- }
- Main.this.updateAttackStatus(n2, 25);
- Main.this.updateAttackStatus(a, 15);
- Main.this.updateAttackStatus(a2, 25);
- if (Main.this.verbosePlayers.size() == 0) {
- return;
- }
- else {
- elements = new ArrayList<String>();
- if (a > 10L) {
- elements.add("X}`g");
- }
- if (a2 > 15L) {
- elements.add("^|td");
- }
- try {
- if (Main.this.status.isDDoS()) {
- elements.add("\u0017W|R>");
- }
- else if (n2 > (a2 + a) * 5L && n2 > 25L) {
- elements.add("\\}dX2=w\u007fgf");
- }
- }
- catch (Exception ex3) {
- if (n2 > (a2 + a) * 5L && n2 > 25L) {
- elements.add("\\}dX2=w\u007ffg");
- }
- }
- new StringBuilder(String.valueOf(a3)).append("$");
- if (elements.size() > 0) {
- string = "µtDi#6)3¢`" + String.join("*", elements) + "'";
- }
- else {
- string = "";
- }
- sb.append(string);
- if (n2 > 2L || Main.this.timeAttackStart > 0L) {
- string2 = "·5\u0010C@2(" + Main.this.getColor(n2) + Main.this.formatter.format(n2) + ")";
- }
- else {
- string2 = "";
- }
- sb2.append(string2);
- if (n3 > 2L || Main.this.timeAttackStart > 0L) {
- string3 = "µvY#\u0000y\u007f: " + Main.this.getColor(n3) + Main.this.formatter.format(n3) + "!";
- }
- else {
- string3 = "";
- }
- sb3.append(string3);
- if (number > 5L) {
- string4 = "´rV~}s{67&<¥c" + Main.this.formatter.format(number) + "#";
- }
- else {
- string4 = "";
- }
- sb4.append(string4);
- if (Main.this.ipcontroller.getQueueSize() > 0) {
- string5 = "³tCeu&6&<£e" + Main.this.formatter.format(Main.this.ipcontroller.getQueueSize()) + "%";
- }
- else {
- string5 = "";
- }
- sb5.append(string5);
- if (Main.this.timeAttackStart > 0L) {
- string6 = "´uPa`sdy<=&<¡g" + Main.time2(System.currentTimeMillis() - Main.this.timeAttackStart);
- }
- else {
- string6 = "";
- }
- a3 = sb6.append(string6).append((elements.size() == 0 && n2 <= 2L && n3 <= 2L && number <= 5L && Main.this.timeAttackStart == 0L) ? "´uX}afu~:={2))" : "").toString();
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- a3 = String.valueOf(a3) + "0·g\u0016NNGZ";
- }
- Main.this.getProxy().getPlayers().iterator();
- while (iterator.hasNext()) {
- a4 = iterator.next();
- if (Main.this.verbosePlayers.contains(a4.getName())) {
- Main.this.sendActionBar(a4, a3);
- }
- }
- }).start();
- }
- }, 0L, 100L, TimeUnit.MILLISECONDS);
- this.getProxy().getPluginManager().registerCommand((Plugin)this, (Command)new Command("t='<7?$") {
- public void execute(final CommandSender a, final String[] a) {
- Main.this.command(a, a);
- }
- });
- this.getProxy().getPluginManager().registerCommand((Plugin)this, (Command)new Command("21") {
- public void execute(final CommandSender a, final String[] a) {
- Main.this.command(a, a);
- }
- });
- this.getProxy().getPluginManager().registerCommand((Plugin)this, (Command)new Command("?=30") {
- public void execute(final CommandSender a, final String[] a) {
- Main.this.command(a, a);
- }
- });
- ProxyServer.getInstance().getScheduler().schedule((Plugin)this, (Runnable)new Runnable() {
- @Override
- public void run() {
- new Thread(() -> Main.this.saveDatabase()).start();
- new Thread(() -> Main.this.sendServerInfo()).start();
- Main.this.checkUpdate();
- }
- }, 0L, 10L, TimeUnit.MINUTES);
- this.getProxy().getLogger().info("P[Y\u0012\f~deNqjN3ZfbpvqT\u0007-8\u007fyno,\u007fi\u007f_Ymms`??,t}u" + String.format("p{n:", (System.currentTimeMillis() - currentTimeMillis) / 1000.0f).replace("{", "#p=20t") + "1$~");
- }
- @EventHandler(priority = Byte.MIN_VALUE)
- public void onBadPacket(BadPacketTracker a) {
- a = (BadPacketTracker)((InetSocketAddress)a.getChannel().remoteAddress()).getAddress().getHostAddress();
- final long currentTimeMillis = System.currentTimeMillis();
- a = (BadPacketTracker)this.ipcontroller.getIpOrNull((String)a);
- if (((IpInfo)a).isBlacklisted() || ((IpInfo)a).getTempban() > currentTimeMillis) {
- return;
- }
- ((IpInfo)a).setViolations(((IpInfo)a).getViolations() + 1);
- if (((IpInfo)a).getViolations() >= 4) {
- ((IpInfo)a).setBlacklisted(true);
- }
- }
- public String getColor(final long a) {
- if (a < 500L) {
- return "\u00e6 ";
- }
- if (a < 1500L) {
- return "\u00e1#";
- }
- if (a < 2500L) {
- return "\u00e0q";
- }
- if (a < 3500L) {
- return "\u00e3'";
- }
- return "\u00e2q";
- }
- public Main() {
- this.dev = false;
- this.useDatabase = true;
- this.settings = new Settings();
- this.status = new Status();
- this.verbosePlayers = new ArrayList<String>();
- this.attackStatus = false;
- this.attackTimer = 0L;
- this.timeAttackStart = 0L;
- this.formatter = new DecimalFormat("xhg%%");
- this.joinmotd = new ArrayList<String>();
- this.lastcheck = 0L;
- this.updateCheck = false;
- this.serverStartTime = System.currentTimeMillis();
- this.lastServerIp = null;
- this.times = new HashMap<String, Long>();
- this.defaultKick = new BaseComponent[] { (BaseComponent)new TextComponent("VL[\u001b4':\u001c19m{9'ce~ce#wb`nunbzyw3<&txGGag~0<^*19}\u007fn>80!c)") };
- }
- public boolean isLasted() {
- return Main.lasted;
- }
- public static Main getInstace() {
- return Main.instance;
- }
- public void onDisable() {
- this.saveDatabase();
- this.getProxy().getLogger().info("\u0004ZX\u0014\nounExcJ7a}\u007fm52_\u0016#p=0ykhfhi\u0016Aydk#f`338.&{");
- }
- private /* synthetic */ void loadPluginConfig() {
- this.saveDefaultConfig("|pt|=3v!;:", false);
- this.saveDefaultConfig("^[k~x{'1v!89", false);
- Configuration configuration = this.loadConfig("|pt|=3v!98");
- if (configuration.getKeys().contains("qS|tW\u007f''9?6 ")) {
- System.out.println("\u000bKI\u0014\n@ZzQ\u007fdC>|}legz81A\u0017jyr~ldcm<}T^?l{l=:?x$f");
- this.saveDefaultConfig("|pt|=3v!<=", true);
- this.saveDefaultConfig("^[k~x{'1v!=<", true);
- configuration = this.loadConfig("|pt|=3v!23");
- }
- final String listToString = this.ListToString(configuration.getStringList("[VU}~v4\u001c19<;,"));
- final String listToString2 = this.ListToString(configuration.getStringList("[VU}~v4\u0012;4/2%"));
- this.settings.setIpBlacklistedMessage(this.ListToString(configuration.getStringList("\u0014\u000e\u0003>6}xqvonUL\u0014Qv|qW1'(:13")).replace("Awz{~1&&\u00fc'_", listToString).replace("Aypun1&&\u00fc&^", listToString2));
- this.settings.setIpTempbannedMessage(this.ListToString(configuration.getStringList("Egozh}r\u0014Qv|qW1'(:46")).replace("Awz{~1&&\u00fc X", listToString).replace("Aypun1&&\u00fc#[", listToString2));
- this.settings.setIpQueueMessage(this.ListToString(configuration.getStringList("S\u007foiy\u0014Qv|qW1'(:75")).replace("Awz{~1&&\u00fc-U", listToString).replace("Aypun1&&\u00fc,T", listToString2));
- this.settings.setIpVerificationMessage(this.ListToString(configuration.getStringList("5\u0006.5wxac~csr\u0014Qv|qW1');02")).replace("Awz{~1&'\u00fd$\\", listToString).replace("Aypun1&'\u00fd'_", listToString2));
- this.settings.setIpProxyMessage(this.ListToString(configuration.getStringList("Pa|./5\u0006-6wxac~csr\u0014Qv|qW1');31")).replace("Awz{~1&'\u00fd!Y", listToString).replace("Aypun1&'\u00fd X", listToString2));
- this.settings.setProxyVerificationEnabled(configuration.getBoolean("\u0006\u0011\f\"#Gtpklc\u007f}NSpq4\u007f:58645"));
- this.settings.setOnlineIpReachedMessage(this.ListToString(configuration.getStringList("Cv$\u001f\u001337:htpNcguh\u0014Qv|qW1');75")).replace("Awz{~1&'\u00fd-U", listToString).replace("Aypun1&'\u00fd,T", listToString2));
- this.settings.setPerIpPlayerLimit(configuration.getInt("\f9cXrRfkeyHvvrsnz840>#"));
- this.settings.setRefreshServerListMessage(this.ListToString(configuration.getStringList("L}~re`{\u00053\u0016\u00128/]xqvZcr{\u0014Qv|qW1'.<13")).replace("Awz{~1& \u00fa'_", listToString).replace("Aypun1& \u00fa&^", listToString2));
- this.settings.setRefreshServerListEnabled(configuration.getBoolean("Rvu$3\u0017\f\u000b=cggpFcohjSqx4\u007f:5?167"));
- this.settings.setCountryBannedMessage(this.ListToString(configuration.getStringList("\u00159\u0011\n-+hSnmiayn\u0014Qv|qW1'.<57")).replace("Awz{~1& \u00fa#[", listToString).replace("Aypun1& \u00fa\"Z", listToString2));
- this.settings.setJoinDelayMessage(this.ListToString(configuration.getStringList("@eur\u0014Qv|qW1'.<8:")).replace("Awz{~1& \u00fa,T", listToString).replace("Aypun1&!\u00fb%]", listToString2));
- this.settings.setJoinDelay(configuration.getLong("Upstz0907/"));
- this.settings.setBlacklistOrWhitelistCountry(configuration.getInt("Rmwd~nexVp|q\u007f&z1310"));
- this.settings.getCountryList().clear();
- final Iterator iterator = configuration.getStringList("&\n*1ec{@fe\u007fw_H1|uo: .51'").iterator();
- while (iterator.hasNext()) {
- this.settings.getCountryList().add(iterator.next().toUpperCase());
- }
- }
- static {
- Main.lasted = true;
- }
- public boolean onlineByIP(final String a, final int a) {
- if (a <= 0) {
- return false;
- }
- int n = 0;
- final Iterator<ProxiedPlayer> iterator = this.getProxy().getPlayers().iterator();
- while (iterator.hasNext()) {
- if (iterator.next().getAddress().getAddress().getHostAddress().equals(a) && ++n >= a) {
- return true;
- }
- }
- return false;
- }
- public String ListToString(List<String> a) {
- String string = "";
- final Iterator<String> iterator = ((List<String>)a).iterator();
- while (iterator.hasNext()) {
- a = iterator.next();
- string = String.valueOf(string) + a + "\u00fc!Y";
- }
- return ChatColor.translateAlternateColorCodes('&', string);
- }
- @EventHandler
- public void onPacket(PluginMessageEvent a) {
- if (a.getSender() instanceof ProxiedPlayer) {
- a = (PluginMessageEvent)a.getSender().getAddress().getAddress().getHostAddress();
- a = (PluginMessageEvent)this.ipcontroller.getIpOrNull((String)a);
- if (a == null) {
- return;
- }
- ((IpInfo)a).setChatCaptcha(1);
- }
- }
- @EventHandler(priority = -64)
- public void PreLoginEvent2(final PreLoginEvent a) {
- if (a.isCancelled()) {
- this.status.addBlocked();
- }
- }
- public void sendActionBar(final ProxiedPlayer a, final String a) {
- a.sendMessage(ChatMessageType.ACTION_BAR, (BaseComponent)new TextComponent(a));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement