-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandPass.py
More file actions
29 lines (23 loc) · 818 Bytes
/
randPass.py
File metadata and controls
29 lines (23 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import secrets
import string
if __name__ == "__main__":
print("Random Passwords generate.")
def randPasswordsNumbers(arg1):
alphabet = string.digits
password = passwordGenerate(arg1,alphabet)
return password
def randPasswordLetters(arg1):
alphabet = string.ascii_letters
password = passwordGenerate(arg1,alphabet)
return password
def randPasswordsMedium(arg1):
alphabet = string.ascii_letters + string.digits
password = passwordGenerate(arg1,alphabet)
return password
def randPasswordsHard(arg1):
alphabet = string.ascii_letters + string.digits + string.punctuation
password = passwordGenerate(arg1,alphabet)
return password
def passwordGenerate(arg1,arg2):
passwordGenerate = ''.join(secrets.choice(arg2) for i in range(arg1))
return passwordGenerate