Agent: fix log4shell to always close ldap and http servers, even on errors

This commit is contained in:
vakarisz 2022-01-06 12:56:04 +02:00
parent 9d5ea0f41f
commit 7bace927f8
1 changed files with 9 additions and 8 deletions

View File

@ -69,8 +69,9 @@ class Log4ShellExploiter(WebRCE):
ldap_thread = ldap.get_run_thread() ldap_thread = ldap.get_run_thread()
ldap_thread.start() ldap_thread.start()
self._trigger_exploit() try:
self.exploit(None, None)
finally:
http_thread.join(Log4ShellExploiter.DOWNLOAD_TIMEOUT) http_thread.join(Log4ShellExploiter.DOWNLOAD_TIMEOUT)
http_thread.stop() http_thread.stop()