nfstream/examples
2024-05-10 18:46:03 +02:00
..
csv_generator.py black formatting 2024-05-10 18:46:03 +02:00
flow_printer.py black formatting 2024-05-10 18:46:03 +02:00
README.md Documentation minor improvements. 2022-10-30 20:05:33 +01:00
wfeatures_pandas.py black formatting 2024-05-10 18:46:03 +02:00

Example Applications

We provide some simple examples to demonstrate how NFStream can be integrated within your Python application.

Setup your environment

python3 -m pip install --upgrade pip
virtualenv venv-py -p /usr/bin/python3
source venv-py/bin/activate
pip install --upgrade nfstream

flow_printer

usage: python3 flow_printer.py input

positional arguments:
  input                 input pcap file or network interface (root privileges required)

csv_generator

usage: python3 csv_generator.py input

positional arguments:
  input                 input pcap file or network interface (root privileges required)

Generated CSV will be stored in the same directory and named input.csv.

Live Capture Notes: For live interface capture, root privileges. Example:

sudo venv-py/bin/python3 flow_printer.py eth0

sudo venv-py/bin/python3 csv_generator.py eth0