Generate master password from Simo.
This commit is contained in:
1 parent
7ce4df7038
commit
67cddce4d4
4 files changed
+17
-27
No files matched your search
@@ -23,6 +23,8 @@ import string
|
||||
import tempfile
|
||||
import logging
|
||||
import subprocess
|
||||
from random import Random
|
||||
from time import gmtime
|
||||
import os
|
||||
import stat
|
||||
import socket
|
||||
@@ -331,3 +333,13 @@ def parse_generalized_time(timestr):
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
|
||||
def ipa_generate_password():
|
||||
rndpwd = ''
|
||||
r = Random()
|
||||
r.seed(gmtime())
|
||||
for x in range(12):
|
||||
# rndpwd += chr(r.randint(32,126))
|
||||
rndpwd += chr(r.randint(65,90)) #stricter set for testing
|
||||
return rndpwd
|
||||
|
||||
Reference in new issue
Block a user