diff --git a/gestion/chgpass.py b/gestion/chgpass.py index 98a5c710..0b530128 100755 --- a/gestion/chgpass.py +++ b/gestion/chgpass.py @@ -69,11 +69,11 @@ Il ne doit pas ## 3 - Cracklib test = commands.getoutput("echo '%s' | /usr/sbin/crack_testlib" % mdp) - if test.split(':')[1] != ' ok' : + if test.split(':')[-1] != ' ok' : commentaire = { ' it does not contain enough DIFFERENT characters' : 'Il y a trop de caractères identiques.' , ' it is based on a dictionary word' : 'Le mot de passe est basé sur un mot du dictionnaire' - }.get(test.split(':')[-1],test.split(':')[1]) + }.get(test.split(':')[-1],test.split(':')[-1]) cprint(commentaire,'rouge') continue