MCPcopy
hub / github.com/jtesta/ssh-audit / _get_cbc_ciphers_enabled

Function _get_cbc_ciphers_enabled

src/ssh_audit/ssh_audit.py:442–452  ·  view source on GitHub ↗

Returns a list of CBC ciphers that the peer supports.

(algs: Algorithms)

Source from the content-addressed store, hash-verified

440 return ret
441
442 def _get_cbc_ciphers_enabled(algs: Algorithms) -> List[str]:
443 '''Returns a list of CBC ciphers that the peer supports.'''
444 ret = []
445
446 if algs.ssh2kex is not None:
447 ciphers_supported = algs.ssh2kex.client.encryption if client_audit else algs.ssh2kex.server.encryption
448 for cipher in ciphers_supported:
449 if cipher.endswith("-cbc") or cipher.endswith("-cbc@openssh.org") or cipher.endswith("-cbc@ssh.com") or cipher == "rijndael-cbc@lysator.liu.se":
450 ret.append(cipher)
451
452 return ret
453
454 def _get_cbc_ciphers_not_enabled(db: Dict[str, Dict[str, List[List[Optional[str]]]]], algs: Algorithms) -> List[str]:
455 '''Returns a list of all CBC ciphers in our algorithm database.'''

Callers 2

post_process_findingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected