draios/sysdig — pull request #240 by acarpi (2014-09-08 19:17:55+00:00)
Title: Adding -b --print-base64 format, -j and other print formats are no longer mutually exclusive

This pull request implements two features:

1. implementing the option -b / --print-base64.
Currently the other print-format are some pretty-printed string representation of a binary buffer. The base64 option can be useful whenever a user needs to access to the I/O buffer's actual binary information 'as is' over a media handling only textual data.

2. using the -j option is no longer mutually exclusive with other print format options (i.e., -A, -x, -X, -b)
Right now the json option will show evt.buffer in the "normal" format only. This raise an issue whenever evt.buffer contains binary information supposed to be consumed externally: i.e., by a python script parsing the json output and making some manipulation of evt.buffer. This patch will change the json representation according to the chosen print format. Whenever a print format is not specified the -j option will default to 'normal'.

The combination of those two options can make sysdig working with an external script making some manipulation of the actual I/O buffer: i.e., sysdig will capture a .gz file transfer and pass this information to a python script able to decompress it.

Thanks
Alessandro