This script is designed to automate the process of decrypting a file using various OpenSSL encryption modes. It tries to decrypt an input file using a specified password and iterates through a predefined list of OpenSSL modes until it successfully decrypts the file or exhausts all options.
- Bash shell (typically available on Unix-based systems)
- OpenSSL installed on your system
- Copy the script into a file, e.g.,
decrypt_script.sh
. - Make the script executable:
chmod +x decrypt_script.sh
Run the script with the password and the input file as arguments:
./decrypt_script.sh [password] [input_file]
[password]
: The password used for decryption.[input_file]
: The path to the encrypted file.
The script includes a wide range of OpenSSL encryption modes, such as AES (various forms), ARIA, Blowfish, Camellia, CAST, DES, RC2, SEED, and SM4.
- Ensure you have the right to decrypt the file.
- The script does not perform extensive error handling.
- The script stops as soon as it successfully decrypts the file with a mode.