Agent: Fix timer usage in log4shell

This commit is contained in:
vakaris_zilius 2022-03-21 16:20:48 +00:00
parent 325c4368de
commit 684e723b09
1 changed files with 4 additions and 2 deletions

View File

@ -167,7 +167,8 @@ class Log4ShellExploiter(WebRCE):
return victim_called_back
def _wait_for_victim_to_download_java_bytecode(self) -> bool:
timer = Timer(Log4ShellExploiter.REQUEST_TO_VICTIM_TIMEOUT)
timer = Timer()
timer.set(Log4ShellExploiter.REQUEST_TO_VICTIM_TIMEOUT)
while not timer.is_expired():
if self._exploit_class_http_server.exploit_class_downloaded():
@ -183,7 +184,8 @@ class Log4ShellExploiter(WebRCE):
return False
def _wait_for_victim_to_download_agent(self):
timer = Timer(LONG_REQUEST_TIMEOUT)
timer = Timer()
timer.set(LONG_REQUEST_TIMEOUT)
while not timer.is_expired():
if self._agent_http_server_thread.downloads > 0: