From 1c79efc9410ab8d4753b9d4df3893d5d37bfb845 Mon Sep 17 00:00:00 2001 From: vakaris_zilius Date: Wed, 16 Mar 2022 15:58:34 +0000 Subject: [PATCH] Agent: Log why exploiter got interrupted when stopped --- monkey/infection_monkey/exploit/HostExploiter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/infection_monkey/exploit/HostExploiter.py b/monkey/infection_monkey/exploit/HostExploiter.py index d8afcf97b..54766d4b2 100644 --- a/monkey/infection_monkey/exploit/HostExploiter.py +++ b/monkey/infection_monkey/exploit/HostExploiter.py @@ -98,6 +98,8 @@ class HostExploiter: # This method should be refactored to raise an exception to reduce duplication in the # "if is_interrupted: return self.exploitation_results" # Ideally the user should only do "check_for_interrupt()" + if self.interrupt.is_set(): + logger.info("Exploiter has been interrupted by a stop signal from the Island") return self.interrupt.is_set() def post_exploit(self):