Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
PiranhaSa committed Dec 5, 2024
1 parent f015803 commit c7b5eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agent/exploits/cve_2024_51378.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def _get_csrf_token(self, base_url: str) -> str:
try:
resp = self.session.get(base_url, timeout=DEFAULT_TIMEOUT.seconds)
resp.raise_for_status()
return resp.cookies.get("csrftoken", "")
except requests_exceptions.RequestException as e:
return str(resp.cookies.get("csrftoken", ""))
except requests_exceptions.RequestException:
return ""

Check warning on line 59 in agent/exploits/cve_2024_51378.py

View check run for this annotation

Codecov / codecov/patch

agent/exploits/cve_2024_51378.py#L58-L59

Added lines #L58 - L59 were not covered by tests

def _attempt_rce(self, base_url: str, csrf_token: str, endpoint: str) -> bool:
Expand All @@ -78,5 +78,5 @@ def _attempt_rce(self, base_url: str, csrf_token: str, endpoint: str) -> bool:
response.json().get("requestStatus") is not None
and "uid=" in response.text
)
except requests_exceptions.RequestException as e:
except requests_exceptions.RequestException:
return False

0 comments on commit c7b5eb5

Please sign in to comment.