bulk_extractor
bulk_extractor copied to clipboard
Whitelist stats go to stdout but not to report.xml
Whitelist stats are reported to stdout but not to report.xml.
Specifically:
When bulk_extractor initializes in main.cpp, it reads any alert list(s) and stop list(s) using function word_and_context_list::readfile in file word_and_context_list.cpp. Unfortunately, bulk_extractor does this before opening report.xml as pointer variable dfxml_writer *xreport, so it is not yet ready to write to report.xml.
To fix this:
- Move instantiation of
xreportway up near the top, being careful not to disrupt behavior in the event of an error or if bulk_extractor is being restarted. - Pass the
xreportpointer as a new parameter toword_and_context_list::readfile()so thatreadfilecan write the stats directly into report.xml. - I recommend the same treatment of passing
xreportto any function that prints to stdout wherever the user also wants the output to go into report.xml.
Do we have a test case for this?