Skip to content

Commit d8c466e

Browse files
committed
Password Generator
1 parent c1ad770 commit d8c466e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pass.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
3+
import random
4+
5+
print("\n***********[Strong Random Password Generator]***********\n")
6+
7+
try:
8+
9+
A = int(input('\033[1;32mEnter your Password Length (10 to 74) = \033[1;m'))
10+
s = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
11+
passlen = (A)
12+
p = "".join(random.sample(s, passlen))
13+
14+
except (SyntaxError, ValueError): ## Python3X
15+
16+
print("Empty Input or Wrong Input Value")
17+
18+
else:
19+
20+
print('\n\033[1;35mYOUR SECURE PASSWORD = %s \033[1;m\n' %p)

0 commit comments

Comments
 (0)