Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

PdfBleach: improve magic header detection #27

Open
ghost opened this issue Jul 27, 2017 · 1 comment
Open

PdfBleach: improve magic header detection #27

ghost opened this issue Jul 27, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 27, 2017

On the PDF reference manual, the file header section stipulates that:

Acrobat viewers require only that the header appear somewhere within
the first 1024 bytes of the file.

In the same section, we also notice that:

Acrobat viewers also accept a header of the form %!PS−Adobe−N.n PDF−M.m

Since the user can be able to open correctly the file in his PDF viewer, it should be made sure that docbleach will handle these documents.

@ghost
Copy link
Author

ghost commented Dec 13, 2017

Related: https://twitter.com/angealbertini/status/940221513348902914

This also works without any file extension, and if you add a PDF signature at offset zero: %PDF- 1 0 obj<</Resources<</Font<</<</BaseFont//Subtype/>>>>>>/Contents<<>>stream / 700Tf10 250Td(:p)Tjendstream>>endobj trailer<</Root<</Pages<</Kids[1 0R]/Count 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant