The code published in Farsight Security Blog articles is made available here for easy download.
A simple example of how to use the nmsg
API. It reads packets from a network interface, converts them to NMSG, and
mirrors the payloads to a binary file and to stdout. Originally published in
Farsight Security's Network Message, Volume 4: The C Programming API.
A simple example of how to use the
pynmsg
API. It reads
base
:packet
encoded NMSGs, winnows to IPv4 TCP or UDP packets and prints to
stdout a 5-tuple of source IP, source port, destination IP, destination port,
protocol. If configured to do so, it will also construct base
:ipconn
encoded NMSGs and send to them to a network socket. It was originally published
in
Farsight Security's Network Message, Volume 5: The Python Programming API.
A reusable example of an nmsg
filter
using wdns
to filter interesting
DNS traffic out of a passive DNS stream. Originally published in
Processing Passive DNS With the nmsg C API.