This Python script is designed to assist in decrypting and recovering the password for encrypted PDF files. There are two approaches beind used,
a brute force approach to systematically try different combinations of characters until the correct password is found and a dictionary read to read all possible passwords from a dictionary.
This can be useful if you have forgotten the password to a PDF file that you encrypted yourself and need to regain access to its contents.
- Brute force approach to password recovery
- Supports specifying minimum and maximum password lengths
- Customizable character set for generating password combinations
- Progress tracking to monitor attempts and elapsed time
- Dictionary password hit and miss
- Reads all passwords in a dictionary line by line and returns which opens file
- Supports an existing dictionary or customizable dictionary
-
Install the required dependencies:
pip install pikepdf
-
Update the script with the path to your encrypted PDF file and specify the desired password length (optional).
-
Run the script:
python Bruteforce_crack.py
or
python Dictionary_crack.py
-
Wait for the script to finish running. If the correct password is found, it will be printed along with the elapsed time.
This project is licensed under the MIT License.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
- This script utilizes the pikepdf library for working with PDF files.
Important
This script is provided for educational and informational purposes only. Use it responsibly and ensure that you have the legal right to access the PDF file you are attempting to decrypt.