diff --git a/monkey/infection_monkey/exploit/drupal.py b/monkey/infection_monkey/exploit/drupal.py index fc876641d..f28c002c3 100644 --- a/monkey/infection_monkey/exploit/drupal.py +++ b/monkey/infection_monkey/exploit/drupal.py @@ -46,17 +46,20 @@ class DrupalExploiter(WebRCE): :return: None (in-place addition) """ for url in potential_urls: - node_ids = find_exploitbale_article_ids(url) - if node_ids is None: - LOG.info('Could not find a Drupal node to attack') - continue - for node_id in node_ids: - node_url = urljoin(url, str(node_id)) - if self.check_if_exploitable(node_url): - self.add_vuln_url(url) # This is for report. Should be refactored in the future - self.vulnerable_urls.append(node_url) - if stop_checking: - break + try: + node_ids = find_exploitbale_article_ids(url) + if node_ids is None: + LOG.info('Could not find a Drupal node to attack') + continue + for node_id in node_ids: + node_url = urljoin(url, str(node_id)) + if self.check_if_exploitable(node_url): + self.add_vuln_url(url) # This is for report. Should be refactored in the future + self.vulnerable_urls.append(node_url) + if stop_checking: + break + except Exception as e: # We still don't know which errors to expect + LOG.error(f'url {url} failed in exploitability check: {e}') if not self.vulnerable_urls: LOG.info("No vulnerable urls found")