U2SpewFoo is a lightweight tool for dumping the contents of unified2 files to stdout.
Example usage:
u2spewfoo snort.log
Example Output:
(Event) sensor id: 0 event id: 4 event second: 1299698138 event microsecond: 146591 sig id: 1 gen id: 1 revision: 0 classification: 0 priority: 0 ip source: 10.1.2.3 ip destination: 10.9.8.7 src port: 60710 dest port: 80 protocol: 6 impact_flag: 0 blocked: 0 Packet sensor id: 0 event id: 4 event second: 1299698138 packet second: 1299698138 packet microsecond: 146591 linktype: 1 packet_length: 54 [ 0] 02 09 08 07 06 05 02 01 02 03 04 05 08 00 45 00 ..............E. [ 16] 00 28 00 06 00 00 40 06 5C B7 0A 01 02 03 0A 09 .(....@.\....... [ 32] 08 07 ED 26 00 50 00 00 00 62 00 00 00 2D 50 10 ...&.P...b...-P. [ 48] 01 00 A2 BB 00 00 ...... (ExtraDataHdr) event type: 4 event length: 33 (ExtraData) sensor id: 0 event id: 2 event second: 1299698138 type: 9 datatype: 1 bloblength: 9 HTTP URI: / (ExtraDataHdr) event type: 4 event length: 78 (ExtraData) sensor id: 0 event id: 2 event second: 1299698138 type: 10 datatype: 1 bloblength: 12 HTTP Hostname: example.com