-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgetpass.py
More file actions
executable file
·50 lines (41 loc) · 1.15 KB
/
getpass.py
File metadata and controls
executable file
·50 lines (41 loc) · 1.15 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
from modules import config,classm
from modules import password
from sys import argv
#script, pwdlen = argv
def genpwd(pwdlen):
newpass = password.generate_pass(int(pwdlen))
print(f"Your new password is: {newpass}")
print("""
Expire0 Pytool. Select an option below:
1. Login lookup
2. Insert new entry
3. Delete an entry
4. Backup data to a SQL file
5. Modify an entry
6. Generate a random password
7. Exit
""")
selection = input("Select a menu option: ")
selection1 = int(selection)
if selection1 <= 7:
if selection1 == 1:
classm.exconnect()
elif selection1 == 2:
classm.inconnect()
elif selection1 == 3:
classm.delconnect()
elif selection1 == 4:
print(classm.backup())
elif selection1 == 5:
classm.mod()
elif selection1 == 6:
len1 = input("Enter the password length > 10: ")
if int(len1) < 10:
print("Please enter a password length greater than 10")
else:
genpwd(int(len1))
elif selection1 == 7:
exit()
else:
print("Please select a valid option:")