This is a command-line tool for encrypting and decrypting text using the Caesar cipher. The tool supports both encryption with a given shift key and brute-force decryption.
- Encrypt or decrypt text using a shift key
- Perform brute-force decryption by trying all possible shifts
- Accept input as text or from a file
Ensure you have Python installed on your system.
Clone the repository or download the files:
git clone <repository-url>
cd <repository-folder>Run the script using Python:
python caesar.py [OPTION]... [FILE or TEXT]...--key <int>: Specify the shift value for encryption/decryption--bruteforce: Perform brute-force decryption by trying all possible shifts
Encrypt a text file with a shift of 3:
python caesar.py --key 3 input.txtDecrypt a text using brute force:
python caesar.py --bruteforce "Khoor Zruog"Encrypt direct text input with a shift of 5:
python caesar.py --key 3 "Hello World"caesar.py: Main script handling argument parsing and processingmethods.py: Contains functions for Caesar cipher encryption and brute-force decryption
This script relies on Python's standard libraries and requires no additional dependencies.
This project is licensed under the MIT License.