Agent: Modify should_agent_stop to use AgentSignals model

This commit is contained in:
Ilija Lazoroski 2022-09-23 17:12:39 +02:00 committed by Mike Salvatore
parent 6299529f4a
commit e5c5cce94e
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ class ControlChannel(IControlChannel):
if not self._control_channel_server:
logger.error("Agent should stop because it can't connect to the C&C server.")
return True
return self._island_api_client.get_agent_signals(self._agent_id) is not None
agent_signals = self._island_api_client.get_agent_signals(self._agent_id)
return agent_signals.terminate is not None
@handle_island_api_errors
def get_config(self) -> AgentConfiguration: