USArmyResearchLab / Dshell

Dshell is a network forensic analysis framework.
Other
5.45k stars 1.14k forks source link

Jsonwrite #69

Closed amm3 closed 8 years ago

amm3 commented 8 years ago

Added support for out.write() to jsonout module. My implementation iterates blobs or connections, creates kw entries for connection related info and then adds raw data to a "data" member. The idea here is that stream data information could be extracted for upstream storage and/or processing.

The change involved moving the kw filtering function that was previously part of the alert() function into a pseudo-private member function called _filter_data().

Additionally, I noted that the followstream module was called self.out.setColorMode() in the preModule. This is fine if the output module implements this function, but not all do. So I wrapped it in a dir() check of the output module.

dev195 commented 8 years ago

Thanks for the fix! I can't believe we didn't notice the followstream thing sooner.

amm3 commented 8 years ago

Yeah, it's a bit of an edge case. 99.9% of the time most people would use followstream with colorout. I only noticed it because I was testing the write() functionality in jsonout.