Skip to content

Commit c0757d9

Browse files
authored
Update to V1.0.3
1 parent 9d91e7f commit c0757d9

File tree

3 files changed

+196
-108
lines changed

3 files changed

+196
-108
lines changed

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
# PasswordManagerProject V1.0.2
2-
PasswordManagerProject V1.0.2 Remastered
1+
# PasswordManagerProject V1.0.3
2+
## Choose an option:
3+
#### 1. Generate Password
4+
Allows you to create a password
5+
> 1. Uppercase # ABC
6+
> 2. Lowercase # abc
7+
> 3. Numbers # 123
8+
> 4. Mix # Ab3
9+
> 5. GenericPassword (Cap,Num and Sym # Ab3!
10+
>> Additionally, you can choose to save password (Not implemented in this version)
11+
#### 2.View Passwords
12+
Not implemented yet, but will allow you to see
13+
> Shows you all passwords as a list in the txt document.
14+
#### 3. View Accounts
15+
Not implemented yet, but will allow you to see
16+
> Email, Name and Password (Keys (Not implemented) used for that account
17+
#### 4. Add Account
18+
Not yet implemented but will allow you to create an account using
19+
> Email, Name and Password (Key (Not implemented)
20+
#### 5. Delete Account
21+
Not implemented yet, but will allow you to see
22+
> Delete an account...
23+
#### 6. Help menu
24+
Opens the help menu
25+
#### 7. Exit
26+
Exits the program
327

4-
Choose an option:
5-
1. Generate Password
6-
Allows you to create a password
7-
2. View Passwords
8-
Not implemented as of yet, but will allow you to see
9-
- Shows you all passwords as a list in the txt document.
10-
3. View Accounts
11-
Not implemented as of yet, but will allow you to see
12-
- Email, Name and Password (Keys (Not implemented) used for that account
13-
4. Add Account
14-
Not yet implemented but will allow you to create an account using
15-
- Email, Name and Password (Key (Not implemented)
16-
5. Delete Account
17-
Not implemented as of yet, but will allow you to see
18-
- Delete an account...
19-
6. Exit Application
20-
21-
-----
22-
1. Uppercase " # ABC
23-
2. Lowercase " # abc
24-
3. Numbers " # 123
25-
4. Mix " # Ab3
26-
5. GenericPassword (Cap,Num and Sym" # Ab3!
27-
6. Debug(Unsafe size) " # Size of 200000 (Not implemented)
28-
29-
Please report any bugs if you find any.
3028
-----
3129

3230
# Imports
33-
As of version 1.0.2
34-
import string
35-
import random
36-
import time
31+
As of version 1.0.3:
32+
- *string*
33+
- *random*
34+
- *time*
35+
36+
-----
37+
GitHub repo: [PasswordManager](https://github.com/Shini9000/PasswordManagerProject)<br>
38+
Author: [Linktree](https://linktr.ee/shini9000)

help.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Usage on using program:
2+
Using the password generator requires a selection on what type of password you wish to generate:
3+
4+
1. Uppercase
5+
- Contains Uppercase characters
6+
- This generates a password similar to "WOJHPWRJHR"
7+
- It will take into consideration what length you want [Character amount].
8+
2. Lowercase
9+
- Contains Lowercase characters
10+
- This generates a password similar to "dlobycyyng"
11+
- It will take into consideration what length you want [Character amount].
12+
3. Numbers
13+
- Contains Number characters
14+
- This generates a password similar to "0828292346"
15+
- It will take into consideration what length you want [Character amount].
16+
4. Mix
17+
- Contains Uppercase, Lowercase & Number characters
18+
- This generates a password similar to "w7NhR9Me6d"
19+
- It will take into consideration what length you want [Character amount].
20+
5. GenericPassword
21+
- Contains Uppercase, Lowercase, Numbers and Symbols characters
22+
- This generates a password similar to "O[F[|<25?\"
23+
- It will take into consideration what length you want [Character amount].
24+
25+
Leaving feedback:
26+
Please feel free to leave feedback on all my repos on github (see README.MD)
27+
I accept contact through
28+
- Discord
29+
- Instagram
30+
- Github
31+
- Email
32+
- Website (Not available as of release 1.0.3)
33+

main.py

Lines changed: 129 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,100 +2,153 @@
22
import random
33
import time
44

5-
project_version = '1.0.2'
5+
project_version = '1.0.3'
6+
admin_signedin = False
67

78
print(f"Welcome to the PasswordManager Application version: " + project_version +
89
f"\nFor more information please go to the github @"
910
f"\nhttps://github.com/Shini9000/PasswordManagerProject"
1011
f"\nAnd thank you for downloading and testing my application :)\n\n")
1112

13+
""" safe keeping module
14+
def savepassword(result_string):
15+
print(result_string)
16+
if input(f'Do you wish to save this password?').capitalize() == 'Y':
17+
print(f'Not implemented as of V1.0.3')#
18+
admin_signedin = not False
19+
admin_signon(admin_signedin)
20+
else:
21+
print(f'Returning to main menu!')
22+
23+
24+
def admin_signon(admin_signedin):
25+
print(admin_signedin)
26+
input('A')
27+
"""
28+
29+
# Function to generate the password
30+
def generatepassword():
31+
print(f"Generate a new password")
32+
password_type_select = input(f"\n\nSelect an type: "
33+
f"\n 1. Uppercase " # ABC
34+
f"\n 2. Lowercase " # abc
35+
f"\n 3. Numbers " # 123
36+
f"\n 4. Mix " # Ab3
37+
f"\n 5. GenericPassword (Cap,Num and Sym" # Yz1!
38+
f"\nEnter selection: ")
39+
try:
40+
selection = int(password_type_select)
41+
except ValueError:
42+
print(f"not a digit")
43+
if selection not in (1, 2, 3, 4, 5):
44+
print(f'Please select a valid option!')
45+
generatepassword()
46+
match selection:
47+
case 1:
48+
# Uppercase password generator
49+
letters = string.ascii_uppercase
50+
result_string = ''.join(
51+
(random.choice(letters) for i in range(int(input("Select a password length: ")))))
52+
result_string.startswith("\n")
53+
print("\n" + result_string + "\n")
54+
print(f'Returning to main menu!')
55+
case 2:
56+
# Lowercase password generator
57+
letters = string.ascii_lowercase
58+
result_string = ''.join(
59+
(random.choice(letters) for i in range(int(input("Select a password length: ")))))
60+
result_string.startswith("\n")
61+
print("\n" + result_string + "\n")
62+
print(f'Returning to main menu!')
63+
case 3:
64+
# Number password generator
65+
numbers = string.digits
66+
result_string = ''.join(
67+
(random.choice(numbers) for i in range(int(input("Select a password length: ")))))
68+
result_string.startswith("\n")
69+
print("\n" + result_string + "\n")
70+
print(f'Returning to main menu!')
71+
case 4:
72+
# Mix password generator
73+
generic_letters = string.ascii_letters
74+
numbers = string.digits
75+
string_line = numbers + generic_letters
76+
result_string = ''.join(
77+
(random.choice(string_line) for i in range(int(input("Select a password length: ")))))
78+
result_string.startswith("\n")
79+
print("\n" + result_string + "\n")
80+
print(f'Returning to main menu!')
81+
case 5:
82+
# Generic password generator
83+
string_letters = string.ascii_letters
84+
string_numbers = string.digits
85+
string_symbols = string.punctuation
86+
string_line = string_letters + string_symbols + string_numbers
87+
result_string = ''.join(
88+
(random.choice(string_line) for i in range(int(input("Select a password length: ")))))
89+
result_string.startswith("\n")
90+
print("\n" + result_string + "\n")
91+
print(f'Returning to main menu!')
92+
savepassword(result_string)
93+
94+
95+
def savepassword(result_string):
96+
print(result_string)
97+
if input(f'Do you wish to save this password?').capitalize() == 'Y':
98+
print(f'Not implemented as of V1.0.3')
99+
admin_signedin = not False
100+
admin_signon(admin_signedin)
101+
else:
102+
print(f'Returning to main menu!')
103+
104+
def admin_signon(admin_signedin):
105+
print(admin_signedin)
106+
input('A')
107+
12108
# true loop
13109
while True:
14-
time.sleep(3.5)
110+
time.sleep(2.5)
15111
# Main menu loop
16112
user_input = input(f"Choose an option: "
17113
f"\n 1. Generate Password "
18114
f"\n 2. View Passwords "
19115
f"\n 3. View Accounts "
20116
f"\n 4. Add Account "
21117
f"\n 5. Delete Account "
22-
f"\n 6. Exit Application "
118+
f"\n 6. Help menu" # Help menu
119+
f"\n 7. Exit Application "
23120
f"\nEnter Input: ")
24121
try:
25122
val = int(user_input)
26123
except ValueError:
27124
print(f"not a digit")
28125
# Check if input is valid
29-
if val in (1, 2, 3, 4, 5, 6):
30-
match val:
31-
# Proceed to generate a password
32-
case 1:
33-
print(f"Generate a new password")
34-
password_type_select = input(f"Select an type: "
35-
f"\n1. Uppercase " # ABC
36-
f"\n2. Lowercase " # abc
37-
f"\n3. Numbers " # 123
38-
f"\n4. Mix " # Ab3
39-
f"\n5. GenericPassword (Cap,Num and Sym" # Ab3!
40-
f"\n6. Debug(Unsafe size) " # Size of 200000
41-
f"\n\nEnter selection: ")
42-
try:
43-
selection = int(password_type_select)
44-
except ValueError:
45-
print(f"not a digit")
46-
match selection:
47-
case 1:
48-
letters = string.ascii_uppercase
49-
result_string = ''.join(
50-
(random.choice(letters) for i in range(int(input("Select a password length: ")))))
51-
result_string.startswith("\n")
52-
print("\n" + result_string + "\n")
53-
print(f'Returning to main menu!')
54-
case 2:
55-
letters = string.ascii_lowercase
56-
result_string = ''.join(
57-
(random.choice(letters) for i in range(int(input("Select a password length: ")))))
58-
result_string.startswith("\n")
59-
print("\n" + result_string + "\n")
60-
print(f'Returning to main menu!')
61-
case 3:
62-
numbers = string.digits
63-
result_string = ''.join(
64-
(random.choice(numbers) for i in range(int(input("Select a password length: ")))))
65-
result_string.startswith("\n")
66-
print("\n" + result_string + "\n")
67-
print(f'Returning to main menu!')
68-
case 4:
69-
generic_letters = string.ascii_letters
70-
numbers = string.digits
71-
string_line = numbers + generic_letters
72-
result_string = ''.join(
73-
(random.choice(string_line) for i in range(int(input("Select a password length: ")))))
74-
result_string.startswith("\n")
75-
print("\n" + result_string + "\n")
76-
print(f'Returning to main menu!')
77-
case 5:
78-
string_letters = string.ascii_letters
79-
string_numbers = string.digits
80-
string_symbols = string.punctuation
81-
string_line = string_letters + string_symbols + string_numbers
82-
result_string = ''.join(
83-
(random.choice(string_line) for i in range(int(input("Select a password length: ")))))
84-
result_string.startswith("\n")
85-
print("\n" + result_string + "\n")
86-
print(f'Returning to main menu!')
87-
# Not implemented as of V1.0.1
88-
case 2:
89-
print(f'Test 2')
90-
case 3:
91-
print(f'Test 3')
92-
case 4:
93-
print(f'Test 4')
94-
case 5:
95-
print(f'Test 5')
96-
# Exit the programme
97-
case 6:
98-
print(f'Test 6')
99-
quit('Quit programme')
100-
else:
101-
print("Enter a valid number")
126+
if val not in (1, 2, 3, 4, 5, 6, 7):
127+
print(f'Please select a valid option!')
128+
continue
129+
match val:
130+
# Proceed to generate a password
131+
case 1:
132+
generatepassword()
133+
# Not implemented as of V1.0.1
134+
case 2:
135+
print(f'Password management not available in version: ' + project_version)
136+
case 3:
137+
print(f'Account management not available in version: ' + project_version)
138+
case 4:
139+
print(f'Test 4')
140+
case 5:
141+
print(f'Account management not available in version: ' + project_version)
142+
case 6:
143+
print(f'Help menu')
144+
file = open("help.txt")
145+
print(file.read())
146+
input('Press enter to continue... ')
147+
file.close()
148+
print(f'Returning to main menu please wait.')
149+
continue
150+
151+
# Exit the programme
152+
case 7:
153+
print(f'Test 7')
154+
quit('Quit programme')

0 commit comments

Comments
 (0)