Thursday 7 March 2013

Update: PDFiD Version 0.1.0

I start with PDFiD. From version 0.1.0 on, you can also pass a URL or a ZIP file as argument to PDFiD:

pdfid.py http://example.com/doc.pdf
pdfid.py maldoc.zip

When you pass a URL as argument, PDFiD will download the PDF document and analyze it. The PDF document will not be written to disk. Supported protocols are http and https.

Passing a ZIP file as argument instructs PDFiD to open the ZIP file and analyze the first file it finds in the ZIP archive. If the ZIP file is password protected, PDFiD will try to access the compressed file with password infected. Same as with URLs, the PDF file in the ZIP container is not written to disk.

“The urllib2 module has been split across several modules in Python 3 named urllib.request and urllib.error.” Since there is no “six” support for these renames you have to use the try/except technique for the Python 3 compatibility (ex. try: from urllib2 import urlopen; except ImportError: from urllib.request import urlopen).