From 3ebdb47daad5a29d85215e13840974ca25216357 Mon Sep 17 00:00:00 2001 From: Riley Date: Mon, 25 Mar 2024 14:07:47 -0400 Subject: [PATCH] 1.2.2 --- .DS_Store | Bin 0 -> 6148 bytes CHANGELOG.MD | 5 +++++ Mango.py | 58 +++++++++++++++++++++++++++------------------------ README.md | 35 ++++++++++++++++++++++++++++++- 4 files changed, 70 insertions(+), 28 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 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') diff --git a/README.md b/README.md index 3c4dffd..e8d85a0 100644 --- a/README.md +++ b/README.md @@ -1 +1,34 @@ -# MangoPasswordGenerator \ No newline at end of file +# 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#).