Skip to content

Commit

Permalink
Fix comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmasdoufi-ol committed Dec 24, 2024
1 parent 6d935b9 commit 826652f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions agent/exploits/cve_2024_50379.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def check(self, target: definitions.Target) -> list[definitions.Vulnerability]:
root_response = requests.get(
target.origin, timeout=DEFAULT_TIMEOUT.seconds, verify=False
)
if root_response.status_code != 200:
if not (200 <= root_response.status_code < 600 and root_response.text):
return vulnerabilities

# Extract version information
Expand All @@ -86,8 +86,7 @@ def check(self, target: definitions.Target) -> list[definitions.Vulnerability]:
test_response.status_code in (201, 204)
or _is_version_vulnerable(tomcat_version) is True
):
vulnerability = self._create_vulnerability(target)
vulnerabilities.append(vulnerability)
vulnerabilities = [self._create_vulnerability(target)]

except requests.RequestException:
return vulnerabilities
Expand Down

0 comments on commit 826652f

Please sign in to comment.