No project description provided
Project description
pdf2john
This repository is a modern refactoring of the legacy pdf2john.py library, aimed at making the code easier to read and maintain.
Install
Clone the repo
git clone https://github.com/benjamin-awd/pdf2john.git
Install dependencies using Homebrew
brew bundle
Create a virtual environment and install Python dependencies
pyenv virtualenv 3.11.4 pdf2john
pyenv shell pdf2john
poetry install
or if you don't want to use a virtual environment, simply
pip install -r requirements.txt
Usage
Run pdf2john.py with a PDF of choice
python3 pdf2john.py tests/pdf/pypdf/r6-user-password.pdf
To pass the hash to john:
python3 pdf2john.py tests/pdf/pypdf/r6-empty-password.pdf >> .hash
john --format=PDF tests/pdf/pypdf/r6-empty-password.pdf .hash
john --show --format=PDF .hash
Features
- Responsibility for PDF parsing and handling has been delegated to pyHanko (a crytography focused fork of PyPDF2)
- CICD workflow that tests pdf2john against PDFs ranging from Security Handler Revision 2 -> 6
- Removal of legacy Python 2.x support
- Readability improvements (a general attempt to be make the code more Pythonic)
Acknowledgement
This repository was based on the original pdf2john.py code by Shane Quigley
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf2john-0.1.1.tar.gz.
File metadata
- Download URL: pdf2john-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ee133cdf9751922f7cc7907491edc95f04c6aec346c910c01c38c866e3f69db
|
|
| MD5 |
62f418e02108256a33812a6c88e0d77c
|
|
| BLAKE2b-256 |
3e60f2fd13668cc201ff7f4cbd71ea38de6cd9d56357b36a42cf8cea4a010eea
|
File details
Details for the file pdf2john-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pdf2john-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fee836db32ecad4fa2e2eb96898466980f879d726295af282d838b64467dac71
|
|
| MD5 |
4d898f1de48d2967567eb41845e05eea
|
|
| BLAKE2b-256 |
84b2835500f839b10d3b25edd0e7c7af7dd1182746f4dc22adf891532b604cbc
|