diff --git a/conf/runit/secret_generator.py b/conf/runit/secret_generator.py index 70ee032..e22ca7b 100644 --- a/conf/runit/secret_generator.py +++ b/conf/runit/secret_generator.py @@ -1,13 +1,5 @@ -import secrets +import random +import string -generated_key = secrets.token_urlsafe(50) - -print(''.join(generated_key)) - - -### Use for old python versions < 3.6 -##import random -##import string -# -##haystack = string.ascii_letters + string.digits + string.punctuation -##print(''.join([random.SystemRandom().choice(haystack.replace('/', '').replace('\'', '').replace('\"', '')) for _ in range(50)])) +haystack = string.ascii_letters + string.digits + string.punctuation +print(''.join([random.SystemRandom().choice(haystack.replace('/', '').replace('\'', '').replace('\"', '')) for _ in range(50)]))