r/PythonProjects2 • u/ProgramBrave718 • Aug 28 '26
I made a password generator using digits and special characters
2
u/alexice89 Aug 28 '26
I need this for work. I have to update like 10 passwords every month. Too lazy to write a script.
2
0
2
1
u/Fun_Priority_1955 Aug 31 '26
That's cool but could be made so much easier. Not saying its bad that shit is awesome
1
2
u/JamzTyson Aug 28 '26
On Linux we can use pwgen
For other platforms, Python provides useful libraries to make the code very simple:
import secrets
import string
CHARS = string.ascii_letters + string.digits + string.punctuation
def pwgen(length = 8, quantity = 12):
for _ in range(quantity):
print(''.join(secrets.choice(CHARS) for _ in range(length)))Call as pwgen() or pwgen(M, N)
The constant CHARS may be customised for your preferred character set.
1
u/defnot_hedonismbot Aug 28 '26
I like using this format
Word1-word2-word3-0000
Makes it pretty easy to remember and very difficult to brute force (at least on a character basis)
1
1
1
3
u/shubham_555 Aug 28 '26
Good Work!