From e5c5cce94e530b1a1671b577dace5363452520c4 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 23 Sep 2022 17:12:39 +0200 Subject: [PATCH] Agent: Modify should_agent_stop to use AgentSignals model --- monkey/infection_monkey/master/control_channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/master/control_channel.py b/monkey/infection_monkey/master/control_channel.py index 947d6c0da..ad2081065 100644 --- a/monkey/infection_monkey/master/control_channel.py +++ b/monkey/infection_monkey/master/control_channel.py @@ -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: