diff --git a/monkey/infection_monkey/exploit/log4shell.py b/monkey/infection_monkey/exploit/log4shell.py index 4ad252204..954555de3 100644 --- a/monkey/infection_monkey/exploit/log4shell.py +++ b/monkey/infection_monkey/exploit/log4shell.py @@ -168,13 +168,17 @@ class Log4ShellExploiter(WebRCE): class_downloaded = False stop = False - @staticmethod - def reset(): - Log4ShellExploiter.HTTPHandler.class_downloaded = False - Log4ShellExploiter.HTTPHandler.stop = False + @classmethod + def reset(cls): + cls.class_downloaded = False + cls.stop = False + + @classmethod + def set_class_downloaded(cls): + cls.class_downloaded = True def do_GET(self): - Log4ShellExploiter.HTTPHandler.class_downloaded = True + Log4ShellExploiter.HTTPHandler.set_class_downloaded() logger.info("Java class servergot a GET request!") self.send_response(200) self.send_header("Content-type", "application/octet-stream")