mirror of https://github.com/CIRCL/AIL-framework
fix: [role_manager] add password characters
parent
add0a95814
commit
8483ec8f90
|
@ -66,7 +66,7 @@ def login_analyst(func):
|
||||||
###############################################################
|
###############################################################
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
def gen_password(length=30, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()"):
|
def gen_password(length=30, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!@#$%^&*()"):
|
||||||
random_bytes = os.urandom(length)
|
random_bytes = os.urandom(length)
|
||||||
len_charset = len(charset)
|
len_charset = len(charset)
|
||||||
indices = [int(len_charset * (byte / 256.0)) for byte in random_bytes]
|
indices = [int(len_charset * (byte / 256.0)) for byte in random_bytes]
|
||||||
|
|
Loading…
Reference in New Issue