From 684e723b09b34afbc5074a2a41b064568e8e532a Mon Sep 17 00:00:00 2001 From: vakaris_zilius Date: Mon, 21 Mar 2022 16:20:48 +0000 Subject: [PATCH] Agent: Fix timer usage in log4shell --- monkey/infection_monkey/exploit/log4shell.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/log4shell.py b/monkey/infection_monkey/exploit/log4shell.py index d2e3ef2a5..da39198ad 100644 --- a/monkey/infection_monkey/exploit/log4shell.py +++ b/monkey/infection_monkey/exploit/log4shell.py @@ -167,7 +167,8 @@ class Log4ShellExploiter(WebRCE): return victim_called_back def _wait_for_victim_to_download_java_bytecode(self) -> bool: - timer = Timer(Log4ShellExploiter.REQUEST_TO_VICTIM_TIMEOUT) + timer = Timer() + timer.set(Log4ShellExploiter.REQUEST_TO_VICTIM_TIMEOUT) while not timer.is_expired(): if self._exploit_class_http_server.exploit_class_downloaded(): @@ -183,7 +184,8 @@ class Log4ShellExploiter(WebRCE): return False def _wait_for_victim_to_download_agent(self): - timer = Timer(LONG_REQUEST_TIMEOUT) + timer = Timer() + timer.set(LONG_REQUEST_TIMEOUT) while not timer.is_expired(): if self._agent_http_server_thread.downloads > 0: