Agent: Start log4shell java class server on daemon thread

This commit is contained in:
Mike Salvatore 2022-01-10 08:40:51 -05:00
parent 64827ac589
commit 67ade141a0
1 changed files with 5 additions and 1 deletions

View File

@ -193,4 +193,8 @@ class Log4ShellExploiter(WebRCE):
def get_java_class_server_thread(self, ip: str, java_class: bytes):
Log4ShellExploiter.HTTPHandler.java_class = java_class
return Thread(target=self._run_class_http_server, args=[ip])
# Setting `daemon=True` to save ourselves some trouble when this is merged to the
# agent-refactor branch.
# TODO: Make a call to `create_daemon_thread()` instead of calling the `Thread()`
# constructor directly after merging to the agent-refactor branch.
return Thread(target=self._run_class_http_server, args=[ip], daemon=True)