Use larger set from which to choose chars for random passwords.
Use SystemRandom() instead of Random() so that the randomicity is non-deterministic.
This commit is contained in:
1 parent
1b613fafa6
commit
599fe1a0f5
2 files changed
+3
-5
No files matched your search
@@ -365,10 +365,9 @@ def parse_generalized_time(timestr):
|
||||
|
||||
def ipa_generate_password():
|
||||
rndpwd = ''
|
||||
r = random.Random()
|
||||
r = random.SystemRandom()
|
||||
for x in range(12):
|
||||
# rndpwd += chr(r.randint(32,126))
|
||||
rndpwd += chr(r.randint(65,90)) #stricter set for testing
|
||||
rndpwd += chr(r.randint(32,126))
|
||||
return rndpwd
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user