fix length check and add log

This commit is contained in:
ophirharpazg 2020-09-01 12:43:20 +03:00
parent bdba20133d
commit a7b84b966c
1 changed files with 6 additions and 1 deletions

View File

@ -114,7 +114,12 @@ class DrupalExploiter(WebRCE):
"""
# We need 5 URLs for a "full-chain": check remote files, check architecture, drop monkey, chmod it and run it.
num_urls_needed_for_full_exploit = 5
return len(self.vulnerable_urls) > num_urls_needed_for_full_exploit
num_available_urls = len(self.vulnerable_urls)
result = num_available_urls >= num_urls_needed_for_full_exploit
if not result:
LOG.info(f'{num_urls_needed_for_full_exploit} URLs are needed to fully exploit a Drupal server '
f'but only {num_available_urls} found')
return result
def is_response_cached(r: requests.Response) -> bool: