Skip to content

Commit

Permalink
1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyrichard committed Mar 25, 2024
1 parent 082736b commit 3ebdb47
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 28 deletions.
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@
#### Version 1.2.1

- Added more characters allowed in the passwords

#### Version 1.2.2

- Updated readme
- You can now only enter integers in the character limits field
58 changes: 31 additions & 27 deletions Mango.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,38 @@ def generatePassword():
if userInput.get() == "":
completedPassword.insert(1.0,"Please enter a number")
else:
numberOfCharacters = int(userInput.get())
if numberOfCharacters > 7 and numberOfCharacters < 33:
password = [None] * numberOfCharacters
for index, values in enumerate(password):
passwordReceived = returnNumber() #65 and 122
passwordChar = chr(passwordReceived)
password[index] = passwordChar
generatedPassword = ''.join(password)
print("Original password:",generatedPassword)
asciiString = "/0123456789:;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`{|}~"
countedInt = 0
for values in userExcludeInput.get():
if values in asciiString:
countedInt += 1
print("Counted int is:",countedInt)
if countedInt == 80:
generatedPassword = "nice try"
else:
for values in generatedPassword:
if values in userExcludeInput.get():
newlyReplaced = chr(returnNumber())
while newlyReplaced in userExcludeInput.get():
try:

numberOfCharacters = int(userInput.get())
if numberOfCharacters > 7 and numberOfCharacters < 33:
password = [None] * numberOfCharacters
for index, values in enumerate(password):
passwordReceived = returnNumber() #65 and 122
passwordChar = chr(passwordReceived)
password[index] = passwordChar
generatedPassword = ''.join(password)
print("Original password:",generatedPassword)
asciiString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@[]^_`{|}~:;<=>?/\\"
countedInt = 0
for values in userExcludeInput.get():
if values in asciiString:
countedInt += 1
print("Counted int is:",countedInt)
if countedInt == 80:
generatedPassword = "nice try"
else:
for values in generatedPassword:
if values in userExcludeInput.get():
newlyReplaced = chr(returnNumber())
print("Replaced", values,"with",newlyReplaced)
generatedPassword = generatedPassword.replace(values, newlyReplaced)
completedPassword.insert(1.0,generatedPassword)
else:
completedPassword.insert(1.0,'Please enter a valid number 8-32')
while newlyReplaced in userExcludeInput.get():
newlyReplaced = chr(returnNumber())
print("Replaced", values,"with",newlyReplaced)
generatedPassword = generatedPassword.replace(values, newlyReplaced)
completedPassword.insert(1.0,generatedPassword)
else:
completedPassword.insert(1.0,'Please enter a valid number 8-32')
except ValueError:
completedPassword.insert(1.0,'Please enter only integer values.')
completedPassword.configure(state='disabled')


Expand Down
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# MangoPasswordGenerator
# Mango

---

A simple, easy to use password generator written in Python

## Geting Started

### Character Limits

The first input field is where you specify how many characters you would like to make the password.
**_We have hard limits of minimum 8 characters and maximum of 32 characters._**
If you enter a value that is not within this range, you will see that the program does not let you generate a password.
You are only allowed to enter numerical values into this field. (**0-9**)

### Exclusions

You may specify to the program certain characters you would like excluded from the final generated password.

The current list of available characters that the program can generate are as follows:

- All numbers **[0-9]**
- Uppercase letters **[A-Z]**
- Lowercase letters **[a-z]**
- Various Symbols **[@[]^\_`{|}~:;<=>?/\\]**

### Generating the password

The program will output the password in a text field that will allow you to copy onto the clipboard.

### License

This software uses the GPL-3.0 license.
You can read more about it [here](https://github.com/BlueberryTechnologies/Mango?tab=GPL-3.0-1-ov-file#).

0 comments on commit 3ebdb47

Please sign in to comment.