Take Bro .log files and output as csv. Logs must be *.log (or the glob can be specified with --glob argument)
Original usecase was to convert bro logs for use with Vega Voyager 2 (https://github.com/vega/voyager/)
Save bro log dir straight to csv
Save csv to current dir
Overwrite existing files
Define fields to output (if --fields is unspecified it will save all)
Output to standard out and align on csv columns!
$ python bro2csv.py --help
usage: bro2csv.py [-h] -i ./bro_logs/http.log [./bro_logs/http.log ...]
[-f host [host ...]] [--overwrite] [--stdo] [--cwd]
[--glob "*.log"]
Translate bro logs (TSV) to CSV
optional arguments:
-h, --help show this help message and exit
-i ./bro_logs/http.log [./bro_logs/http.log ...], --input ./bro_logs/http.log [./bro_logs/http.log ...]
Specific bro log path - individual file or directory.
Must be .log
-f host [host ...], --fields host [host ...]
Bro output fields
--overwrite Overwrite any existing files
--stdo Print to standard out (as csv)
--cwd Save files to the current working directory instead of
beside original files.
--glob "*.log" Glob for bro logs. Must be quoted, e.g. "*.log" -
can't be used when the input is a file (obviously...)