mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-25 20:11:40 +01:00
Shorten variables.
This commit is contained in:
parent
a70b93862a
commit
684ea315ec
35
ssh-audit.py
35
ssh-audit.py
@ -1270,26 +1270,25 @@ def output(banner, header, kex=None, pkm=None):
|
|||||||
maxlen)
|
maxlen)
|
||||||
output_security(banner, maxlen)
|
output_security(banner, maxlen)
|
||||||
if pkm is not None:
|
if pkm is not None:
|
||||||
alg_db = SSH1.KexDB.ALGORITHMS
|
adb = SSH1.KexDB.ALGORITHMS
|
||||||
ciphers = pkm.supported_ciphers
|
ciphers = pkm.supported_ciphers
|
||||||
auths = pkm.supported_authentications
|
auths = pkm.supported_authentications
|
||||||
title, alg_type = 'SSH1 host-key algorithms', 'key'
|
title, atype = 'SSH1 host-key algorithms', 'key'
|
||||||
output_algorithms(title, alg_db, alg_type, ['ssh-rsa1'], maxlen)
|
output_algorithms(title, adb, atype, ['ssh-rsa1'], maxlen)
|
||||||
title, alg_type = 'SSH1 encryption algorithms (ciphers)', 'enc'
|
title, atype = 'SSH1 encryption algorithms (ciphers)', 'enc'
|
||||||
output_algorithms(title, alg_db, alg_type, ciphers, maxlen)
|
output_algorithms(title, adb, atype, ciphers, maxlen)
|
||||||
title, alg_type = 'SSH1 authentication types', 'aut'
|
title, atype = 'SSH1 authentication types', 'aut'
|
||||||
output_algorithms(title, alg_db, alg_type, auths, maxlen)
|
output_algorithms(title, adb, atype, auths, maxlen)
|
||||||
if kex is None:
|
if kex is not None:
|
||||||
return
|
adb = KexDB.ALGORITHMS
|
||||||
alg_db = KexDB.ALGORITHMS
|
title, atype = 'key exchange algorithms', 'kex'
|
||||||
title, alg_type = 'key exchange algorithms', 'kex'
|
output_algorithms(title, adb, atype, kex.kex_algorithms, maxlen)
|
||||||
output_algorithms(title, alg_db, alg_type, kex.kex_algorithms, maxlen)
|
title, atype = 'host-key algorithms', 'key'
|
||||||
title, alg_type = 'host-key algorithms', 'key'
|
output_algorithms(title, adb, atype, kex.key_algorithms, maxlen)
|
||||||
output_algorithms(title, alg_db, alg_type, kex.key_algorithms, maxlen)
|
title, atype = 'encryption algorithms (ciphers)', 'enc'
|
||||||
title, alg_type = 'encryption algorithms (ciphers)', 'enc'
|
output_algorithms(title, adb, atype, kex.server.encryption, maxlen)
|
||||||
output_algorithms(title, alg_db, alg_type, kex.server.encryption, maxlen)
|
title, atype = 'message authentication code algorithms', 'mac'
|
||||||
title, alg_type = 'message authentication code algorithms', 'mac'
|
output_algorithms(title, adb, atype, kex.server.mac, maxlen)
|
||||||
output_algorithms(title, alg_db, alg_type, kex.server.mac, maxlen)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_int(v):
|
def parse_int(v):
|
||||||
|
Loading…
Reference in New Issue
Block a user