This repository contains a Python program for decoding a substitution cipher text using frequency analysis and letter substitution.
These instructions will get you a copy of the project up and running on your local machine.
Python 3.9 or above.
Clone this repository
git clone https://github.com/danielfeitopin/monoalphabet-cipher-breaker.git
Change directory to the cloned repository
cd monoalphabet-cipher-breaker
The program can be run using the following commands:
python monoalphabet_breaker.py <path_to_cipher_file>
monoalphabet_breaker.py <path_to_cipher_file>
The program performs the following steps:
- Reads the cipher text file.
- Analyzes the text for letter frequencies and statistics.
- Prompts the user for substitution commands to decode the text.
- Displays the substituted text and the substitution table.
Commands:
help: Show this help menu.
set a b: Includes 'a' as the plain text key with value 'b' in the confirmed dict.
unset a: Removes key 'a' from confirmed dict.
exit: Quit the program.
Contributions are welcome! If you have improvements, bug fixes, or new modules to add, feel free to submit a pull request.
The content of this repository is licensed under the MIT License.
Feel free to get in touch with me!