Skip to content

pdf2john: accept space-padded xref offsets - #6019

Open
shai20000 wants to merge 1 commit into
openwall:bleeding-jumbofrom
shai20000:fix/pdf2john-space-padded-xref
Open

pdf2john: accept space-padded xref offsets#6019
shai20000 wants to merge 1 commit into
openwall:bleeding-jumbofrom
shai20000:fix/pdf2john-space-padded-xref

Conversation

@shai20000

Copy link
Copy Markdown

Some encrypted PDFs pad their cross-reference table with spaces instead of zeros.
These open fine in normal readers, but pdf2john rejected the table and produced an empty hash, so John had nothing to crack. Relax the parser to accept them. Well-formed PDFs are unaffected.

Fixes #6018

@shai20000
shai20000 force-pushed the fix/pdf2john-space-padded-xref branch from b0fb710 to 131e065 Compare July 22, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdf2john emits empty hash for encrypted PDFs with space-padded xref offsets

1 participant