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 class_downloaded = False
stop = False stop = False
@staticmethod @classmethod
def reset(): def reset(cls):
Log4ShellExploiter.HTTPHandler.class_downloaded = False cls.class_downloaded = False
Log4ShellExploiter.HTTPHandler.stop = False cls.stop = False
@classmethod
def set_class_downloaded(cls):
cls.class_downloaded = True
def do_GET(self): def do_GET(self):
Log4ShellExploiter.HTTPHandler.class_downloaded = True Log4ShellExploiter.HTTPHandler.set_class_downloaded()
logger.info("Java class servergot a GET request!") logger.info("Java class servergot a GET request!")
self.send_response(200) self.send_response(200)
self.send_header("Content-type", "application/octet-stream") self.send_header("Content-type", "application/octet-stream")