Last active
July 20, 2019 03:10
-
-
Save mvanorder/33c7da77e2e6b81a10796feb1ada18ec to your computer and use it in GitHub Desktop.
Generate a random key string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a random string of random characters randomized in lenght of 42 to 64 | |
# the characters used are char 33 through 126, or: | |
# '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~' | |
print(''.join((chr(random.randrange(33, 127)) for i in range(random.randrange(42, 65))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment