mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-25 12:01:40 +01:00
Better compression handling.
This commit is contained in:
parent
c485ffb01e
commit
122588cb00
@ -272,9 +272,12 @@ def process_algorithm(alg_type, alg_name, alg_max_len=0):
|
|||||||
f(' ' * len(prefix + alg_name) + padding + ' `- ' + text)
|
f(' ' * len(prefix + alg_name) + padding + ' `- ' + text)
|
||||||
|
|
||||||
def process_kex(kex):
|
def process_kex(kex):
|
||||||
state = 'zlib@openssh.com' in kex.server.compression
|
compressions = [x for x in kex.server.compression if x != 'none']
|
||||||
state = 'enabled' if state else 'disabled'
|
if len(compressions) > 0:
|
||||||
out.good('[info] compression is ' + state)
|
cmptxt = 'enabled ({0})'.format(', '.join(compressions))
|
||||||
|
else:
|
||||||
|
cmptxt = 'disabled'
|
||||||
|
out.good('[info] compression is ' + cmptxt)
|
||||||
ml = lambda l: max(len(i) for i in l)
|
ml = lambda l: max(len(i) for i in l)
|
||||||
maxlen = max(ml(kex.kex_algorithms),
|
maxlen = max(ml(kex.kex_algorithms),
|
||||||
ml(kex.key_algorithms),
|
ml(kex.key_algorithms),
|
||||||
|
Loading…
Reference in New Issue
Block a user