()
| 34 | |
| 35 | |
| 36 | def main(): |
| 37 | while True: |
| 38 | print('-' * 10 + "\n**Menu**\n" + '-' * 10) |
| 39 | print("1.Encrpyt") |
| 40 | print("2.Decrypt") |
| 41 | print("3.BruteForce") |
| 42 | print("4.Quit") |
| 43 | choice = input("What would you like to do?: ") |
| 44 | if choice not in ['1', '2', '3', '4']: |
| 45 | print ("Invalid choice, please enter a valid choice") |
| 46 | elif choice == '1': |
| 47 | strng = input("Please enter the string to be encrypted: ") |
| 48 | key = int(input("Please enter off-set between 1-94: ")) |
| 49 | if key in range(1, 95): |
| 50 | print (encrypt(strng.lower(), key)) |
| 51 | elif choice == '2': |
| 52 | strng = input("Please enter the string to be decrypted: ") |
| 53 | key = int(input("Please enter off-set between 1-94: ")) |
| 54 | if key in range(1,95): |
| 55 | print(decrypt(strng, key)) |
| 56 | elif choice == '3': |
| 57 | strng = input("Please enter the string to be decrypted: ") |
| 58 | brute_force(strng) |
| 59 | main() |
| 60 | elif choice == '4': |
| 61 | print ("Goodbye.") |
| 62 | break |
| 63 | main() |
no test coverage detected