fkie-cad / fact_extractor

Standalone Utility for FACT-like extraction
GNU General Public License v3.0
81 stars 31 forks source link

HP PJL extractor metadata causes exception when writing report file #6

Closed njv299 closed 5 years ago

njv299 commented 5 years ago

HP PJL extraction writes the raw PJL commands to the output. These raw commands can contain non-printable characters, and is stored as a bytes object. The fact_extractor unpacker writes the output of each extractor as serialized JSON to the meta.json file, and therefore when HP-PJL extraction results are written an exception of 'TypeError: Object of type 'bytes' is not JSON serializable' occurs.

To reproduce this, try to unpack any file which goes through the HP PJL extractor via the fact_extractor container.

dorpvom commented 5 years ago

This issue will be solved more generally in branch safer-report-generation

dorpvom commented 5 years ago

cf. #7