Skip to main content
https://github.com/aouinizied/nfstream/blob/master/docs/source/asset/logo_main.png

Latest Release

release

Supported Versions

python

pypy

Supported Platforms

linux

macos

Build Status

build

Documentation Status

doc

Code Coverage

coverage

Code Quality

quality

Discussions Channel

gitter

nfstream main features

  • Performance: nfstream is designed to be fast (x10 faster with pypy3 support) with a small CPU and memory footprint.

  • Layer-7 visibility: nfstream deep packet inspection engine is based on nDPI library. It allows nfstream to perform reliable encrypted applications identification and metadata extraction (e.g. TLS, SSH, DNS, HTTP).

  • Flexibility: add a flow feature in 2 lines as an NFPlugin.

  • Machine Learning oriented: add your trained model as an NFPlugin.

How to use it?

  • Dealing with a big pcap file and just want to aggregate it as network flows? nfstream make this path easier in few lines:

from nfstream import NFStreamer
my_awesome_streamer = NFStreamer(source="facebook.pcap") # or capture from a network interface (source="eth0")
for flow in my_awesome_streamer:
    print(flow)  # print, append to pandas Dataframe or whatever you want :)!
NFEntry(
    flow_id=0,
    first_seen=1472393122365,
    last_seen=1472393123665,
    version=4,
    src_port=52066,
    dst_port=443,
    protocol=6,
    vlan_id=0,
    src_ip='192.168.43.18',
    dst_ip='66.220.156.68',
    total_packets=19,
    total_bytes=5745,
    duration=1300,
    src2dst_packets=9,
    src2dst_bytes=1345,
    dst2src_packets=10,
    dst2src_bytes=4400,
    expiration_id=0,
    master_protocol=91,
    app_protocol=119,
    application_name='TLS.Facebook',
    category_name='SocialNetwork',
    client_info='facebook.com',
    server_info='*.facebook.com',
    j3a_client='bfcc1a3891601edb4f137ab7ab25b840',
    j3a_server='2d1eb5817ece335c24904f516ad5da12'
)
  • Didn’t find a specific flow feature? add a plugin to nfstream in few lines:

 from nfstream import NFPlugin

 class my_awesome_plugin(NFPlugin):
     def on_update(self, obs, entry):
         if obs.length >= 666:
             entry.my_awesome_plugin += 1

streamer_awesome = NFStreamer(source='devil.pcap', plugins=[my_awesome_plugin()])
for flow in streamer_awesome:
   print(flow.my_awesome_plugin) # now you will see your dynamically created metric in generated flows
  • More example and details are provided on the official Documentation.

Getting Started

Prerequisites

apt-get install libpcap-dev

Installation

using pip

Binary installers for the latest released version are available:

pip3 install nfstream

from source

If you want to build nfstream on your local machine:

apt-get install autogen
git clone https://github.com/aouinizied/nfstream.git
cd nfstream
python3 setup.py install

Contributing

Please read Contributing for details on our code of conduct, and the process for submitting pull requests to us.

Authors

Zied Aouini (aouinizied) created nfstream and these fine people have contributed.

Ethics

nfstream is intended for network data research and forensics. Researchers and network data scientists can use these framework to build reliable datasets, train and evaluate network applied machine learning models. As with any packet monitoring tool, nfstream could potentially be misused. Do not run it on any network of which you are not the owner or the administrator.

License

This project is licensed under the GPLv3 License - see the License file for details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nfstream-3.0.2-cp38-cp38-manylinux1_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.8

nfstream-3.0.2-cp37-cp37m-manylinux1_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.7m

nfstream-3.0.2-cp37-cp37m-macosx_10_15_x86_64.whl (250.3 kB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

nfstream-3.0.2-cp37-cp37m-macosx_10_14_x86_64.whl (249.4 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

nfstream-3.0.2-cp37-cp37m-macosx_10_13_x86_64.whl (251.6 kB view details)

Uploaded CPython 3.7mmacOS 10.13+ x86-64

nfstream-3.0.2-cp36-cp36m-manylinux1_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.6m

File details

Details for the file nfstream-3.0.2-pp371-pypy3_71-manylinux1_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-pp371-pypy3_71-manylinux1_x86_64.whl
  • Upload date:
  • Size: 783.6 kB
  • Tags: PyPy
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 PyPy/7.1.1beta

File hashes

Hashes for nfstream-3.0.2-pp371-pypy3_71-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ca25ee07d4bab4297f0a14ec5489cc584e67657fec063a599692ee4bcde21bc4
MD5 0deb6e7232458d5e49c3b17e77227538
BLAKE2b-256 1af6aa41972666734170cb80735bdd5061441180dcf5350bfe57fa4d2ab19cea

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 783.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.8.0

File hashes

Hashes for nfstream-3.0.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 33f85fde9dfd947ddf9a17bbe7ecca33f4de3db3c1ac8be8ba3fd105c63bc44d
MD5 c05855f0b13324002b67926f28401e8d
BLAKE2b-256 924cbdf2137e2fa13ba5d524aa6a1c61fa37a062122a4bd66f2aa51811a93c05

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 783.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.1

File hashes

Hashes for nfstream-3.0.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 72972ffb48d400a0a7c8e66a394518ceb6c88c5c55baeed1505b4d9e5af8bec4
MD5 213617a87c4cfa66ec03a484c1cf3acd
BLAKE2b-256 2d1675e3972527b2862d10337e83148f7e5980a2928d03e97d82a868f67620aa

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 250.3 kB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for nfstream-3.0.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0e2cb3e1d6281690187b59320dcd437183f076557806f2ba12951818d1738563
MD5 9007c331decde1ce8bec8862907090db
BLAKE2b-256 c53264ca6bee621781f320c97a3e72ebf4364bba520573dc592a7a56e668dd52

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 249.4 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.4

File hashes

Hashes for nfstream-3.0.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f2781bbed26b3728b0670781e3bce24ad207abb34ee9bac3abe33e15c6fcfa47
MD5 39bcab55eaf87b84a2db34c8de5a72f0
BLAKE2b-256 36aa9db4132c599172cc3266bf4c0258658fef2a3a3bf1036beaa28799899f1d

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 251.6 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.5

File hashes

Hashes for nfstream-3.0.2-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8a93b832161ab1aa506ac4f204e5254e7cb0065a8f88805c2abefca2df253cb4
MD5 a7ec9dfff7108d0b8ac75fe909a89bec
BLAKE2b-256 d8e3aa8e3e92f07f47af8c376092503f0c44807d72d2fb8d90470abcb30f69bd

See more details on using hashes here.

File details

Details for the file nfstream-3.0.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: nfstream-3.0.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 783.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.6.7

File hashes

Hashes for nfstream-3.0.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3952726010159c4abeda3f422225cf3909b97d583d9090dc678574be1fbec496
MD5 6090ac73a2ed8541622472fc31b584de
BLAKE2b-256 a4f2fea2b1202744db7e102a801ce3157f48568bf01a1a1e3ebac7a981ab47c2

See more details on using hashes here.

Release history Release notifications | RSS feed

6.6.0

49 files

6.5.4

52 files

6.5.3

67 files

6.5.2

67 files

6.5.1

28 files

6.5.0

12 files

6.4.3

27 files

6.4.2

18 files

6.4.1

13 files

6.4.0

18 files

6.3.5

12 files

6.3.4

12 files

6.3.3

12 files

6.3.2

12 files

6.3.1

12 files

6.3.0

12 files

6.2.6

12 files

6.2.5

13 files

6.2.4

13 files

6.2.3

13 files

6.2.2

13 files

6.2.1

13 files

6.2.0

13 files

6.1.3

9 files

6.1.2

11 files

6.1.1

11 files

6.1.0

8 files

6.0.5

11 files

6.0.4

11 files

6.0.3

11 files

6.0.2

11 files

6.0.0

11 files

5.2.0

11 files

5.1.6

11 files

5.1.5

11 files

5.1.4

3 files

5.1.3

11 files

5.1.2

8 files

5.1.1

8 files

5.1.0

8 files

5.0.0

8 files

4.0.1

5 files

4.0.0

5 files

3.2.2

5 files

3.2.1

5 files

3.2.0

5 files

3.1.2

7 files

3.1.1

7 files

3.1.0

8 files

3.0.4

7 files

3.0.3

7 files

This release

3.0.2 This release

7 files

3.0.1

6 files

3.0.0

5 files

2.0.1

5 files

2.0.0

4 files

1.2.1

6 files

1.2.0

6 files

1.1.8

6 files

1.1.7

6 files

1.1.6

6 files

1.1.5

8 files

1.1.4

8 files

1.1.3

7 files

1.1.2

7 files

1.1.1

3 files

1.1.0

3 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page