mlodic / pdfid Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi, I got the following output when I ran the provided test file, where I tried to check the content of the disarmed_pdf_buffers = disarm_pdfs_by_buffer(filenames, file_buffers)
by printing it out:
STARTING DISARM
/JS -> /js
PDFiD 0.2.7 ./Dante.pdf
PDF Header: %PDF-1.7
obj 20
endobj 20
stream 5
endstream 5
xref 1
trailer 1
startxref 1
/Page 1
/Encrypt 0
/ObjStm 0
/JS 1
/JavaScript 0
/AA 0
/OpenAction 0
/AcroForm 0
/JBIG2Decode 0
/RichMedia 0
/Launch 0
/EmbeddedFile 0
/XFA 0
/Colors > 2^24 0
{'buffers': []} <-- nothing in the returned buffer
And in testing 3.1, analyze_pdfs_by_buffer
actually loaded the file by filename instead of checking the sanitized buffer, which I believe is not the expected behavior.
Hi, I got the following error when testing the library on a pdf exploit generated by Metasploit module exploit/windows/fileformat/adobe_pdf_embedded_exe_nojs
: NameError: name 'name' is not defined
.
I believe that the error was introduced in the following line:
Line 698 in f7674ff
Deleting L697 and L698 will fix the issue.
Hello,
I use pdfid with a django project but since I have upgraded to version 1.1.0, I got a lot of error 'NoneType' object has no attribute 'append'
This is caused by the line 577: disarmed_filebuffers.append(disarmed_pdf_buffer.getvalue())
Somebody knows how to fix this ?
Thank you
If a PDF is given with hex characters (for example obfuscated JS tags like /JavaScript
--> /#4AavaScript
), the following error is encountered:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/worker/venv/lib/python3.10/site-packages/pdfid/pdfid.py", line 1096, in PDFiDMain
ProcessFile(filename, options, plugins, list_of_dict["reports"], disarmed_buffers["buffers"])
File "/home/worker/venv/lib/python3.10/site-packages/pdfid/pdfid.py", line 819, in ProcessFile
PDFID2Dict(xmlDoc, options.nozero, options.force, list_of_dict)
File "/home/worker/venv/lib/python3.10/site-packages/pdfid/pdfid.py", line 698, in PDFID2Dict
filename_dict['%s_hexcode_count' % name] = int(node.getAttribute('HexcodeCount'))
NameError: name 'name' is not defined
The bit of code responsible for this is in the function PDFID2Dict
here where in line 698 it references a variable name
that does not exist within the scope of the function (or anywhere else for that matter):
Lines 683 to 720 in f7674ff
name
is supposed to be in the first place. If anyone can help, that would be much appreciated. :)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.