mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-31 06:26:14 +00:00
fix: [role_manager] add password characters
This commit is contained in:
parent
add0a95814
commit
8483ec8f90
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue