Skip to content

Commit

Permalink
Fixed new pylint warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtesta committed Mar 13, 2024
1 parent 3313046 commit cb0f6b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/ssh_audit/ssh_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,8 @@ def output_recommendations(out: OutputBuffer, algs: Algorithms, algorithm_recomm
for cve_list in VersionVulnerabilityDB.CVE['PuTTY']:
vuln_version = float(cve_list[1])
cvssv2_severity = cve_list[4]

if vuln_version > max_vuln_version:
max_vuln_version = vuln_version
if cvssv2_severity > max_cvssv2_severity:
max_cvssv2_severity = cvssv2_severity
max_vuln_version = max(vuln_version, max_vuln_version)
max_cvssv2_severity = max(cvssv2_severity, max_cvssv2_severity)

fn = out.warn
if max_cvssv2_severity > 8.0:
Expand Down
3 changes: 1 addition & 2 deletions src/ssh_audit/ssh_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ def send_kexinit(self, key_exchanges: List[str] = ['curve25519-sha256', 'curve25

def send_banner(self, banner: str) -> None:
self.send(banner.encode() + b'\r\n')
if self.__state < self.SM_BANNER_SENT:
self.__state = self.SM_BANNER_SENT
self.__state = max(self.__state, self.SM_BANNER_SENT)

def ensure_read(self, size: int) -> None:
while self.unread_len < size:
Expand Down

0 comments on commit cb0f6b6

Please sign in to comment.