qpdf: Extracting PDF Streams, (Sat, Nov 2nd)
2024-11-2 21:8:21 Author: isc.sans.edu(查看原文) 阅读量:2 收藏

In diary entry "Analyzing PDF Streams" I answer a question asked by a student of Xavier: "how can you export all streams of a PDF?". I explained how to do this with my pdf-parser.py tool.

I recently found another method, using the open-source tool qpdf. Since version 11, you can extract streams with qpdf.

If you want the contents of the streams inside a single JSON object (BASE64 encoded), use this command:

qpdf.exe --json --json-stream-data=inline exampl.pdf

And if you want the contents of the streams in separate files (filename prefix "stream"), use this command:

qpdf.exe --json --json-stream-data=file --json-stream-prefix=stream exampl.pdf

Didier Stevens
Senior handler
blog.DidierStevens.com


文章来源: https://isc.sans.edu/diary/rss/31406
如有侵权请联系:admin#unsafe.sh