Agent: Use classmethods to improve readability of HTTPHandler

This commit is contained in:
Mike Salvatore 2022-01-11 13:08:32 -05:00
parent b79bf96359
commit c51be159b6
1 changed files with 9 additions and 5 deletions

View File

@ -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")