mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-31 21:06:25 -06:00
Merge 72be86794e
into 401357b8cb
This commit is contained in:
commit
dd66f45d41
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
|
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
|
||||||
import os
|
import os
|
||||||
import random
|
import base64
|
||||||
|
|
||||||
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
|
print(base64.urlsafe_b64encode(os.urandom(64))[:50])
|
||||||
random.seed = (os.urandom(2048))
|
|
||||||
print(''.join(random.choice(charset) for c in range(50)))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user