mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-06 10:38:54 +00:00
Revised patch for more password entropy
This commit is contained in:
parent
dc4d589ce0
commit
0824f004d9
4 changed files with 16 additions and 6 deletions
|
|
@ -174,6 +174,8 @@ def randompass():
|
|||
# we play it safe :)
|
||||
import random
|
||||
import string
|
||||
# as of python 2.4, this reseeds the PRNG from urandom
|
||||
random.seed()
|
||||
lower = ''.join(random.choice(string.ascii_lowercase) for x in range(6))
|
||||
upper = ''.join(random.choice(string.ascii_uppercase) for x in range(6))
|
||||
number = ''.join(random.choice(string.digits) for x in range(6))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue