New function to get weakness level of cipher

This commit is contained in:
nemunaire 2015-02-01 22:12:04 +01:00 committed by nemunaire
parent c28b688943
commit dca9329267
1 changed files with 14 additions and 0 deletions

View File

@ -48,3 +48,17 @@ def test(host, cipher):
except ConnectionResetError:
pass
return False
def weakness_level(cipher):
wl = [
"aNULL:eNULL",
"EXPORT",
"LOW",
"MEDIUM",
"HIGH"
]
for i in range(len(wl)):
if cipher in get(wl[i]):
return i + 1
return 0