My personal dotfiles for Debian/Ubuntu.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
8 | 02 Feb 2020 15:54 | 6ac0968 | Add passwdgen.py utility | Josh Stockin | 1 | 15 | 0 | G |
1 | #!/usr/bin/env python3.7 |
2 | |
3 | import random |
4 | |
5 | def NewPass(): |
6 | random.seed() |
7 | charactersAllowed = list("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*-=_+ ") |
8 | random.shuffle(charactersAllowed) |
9 | passStr = "" |
10 | for x in range(0,16): |
11 | passStr += charactersAllowed[random.randint(0,len(charactersAllowed)-1)] |
12 | return passStr |
13 | |
14 | if __name__ == "__main__": |
15 | print(f"\"{NewPass()}\"") |
16 |