Parse pcap and write all data to output directory (will be created if it does not exist):
$ net capture -read traffic.pcap -out traffic_ncap
Convert timestamps to UTC:
$ net dump -read TCP.ncap.gz -select Timestamp,SrcPort,Dstport -utc
Show Audit Record File Header
To display the header of the supplied audit record file, the -header flag can be used:
$ net capture -read TCP.ncap.gz -header
+----------+---------------------------------------+
| Field | Value |
+----------+---------------------------------------+
| Created | 2018-11-15 04:42:22.411785 +0000 UTC |
| Source | Wednesday-WorkingHours.pcap |
| Version | v0.3.3 |
| Type | NC_TCP |
+----------+---------------------------------------+
Print Structured Audit Records
Audit records can be printed structured, this makes use of the proto.MarshalTextString() function. This is sometimes useful for debugging, but very verbose.
To ensure values in the generated CSV would not contain the separator string, the -check flag can be used.
This will determine the expected number of separators for the audit record type, and print all lines to stdout that do not have the expected number of separator symbols. The separator symbol will be colored red with ansi escape sequences and each line is followed by the number of separators in red color.
The -sep flag can be used to specify a custom separator.
$ net util -read TCP.ncap.gz -check
$ net util -read TCP.ncap.gz -check -sep=";"