Skip to main content

A flexible and powerful network data analysis library

Project description

build doc quality release python platform license

nfstream is a flexible and lightweight network data analysis library.

nfstream main features

  • Performance: nfstream was designed to be fast with a small CPU and memory footprint.

  • Layer-7 visibility: nfstream dissection is based on nDPI (~300 applications including Tor, Messenger, WhatsApp, etc.).

  • Flexibility: add a flow metric in 2 lines of code using nfstream plugins method.

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

Use

  • 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.streamer import Streamer
my_capture_streamer = Streamer(source="instagram.pcap") # or capture from a network interface
for flow in my_capture_streamer:  # or for flow in my_live_streamer
    print(flow)  # print, append to pandas Dataframe or whatever you want :)!
  • Didn’t find a specific flow feature? add a plugin to the Streamer in few lines:

def my_awesome_plugin(packet_information, flow, direction):
 if packet_information.length > 666:
     return flow.metrics['count_pkts_gt_666'] + 1

streamer_awesome = Streamer(source='devil.pcap', user_metrics={'count_pkts_gt_666': my_awesome_plugin})
for export in streamer_awesome:
   print(export.metrics['count_pkts_gt_666']) # now you will see your created metric in generated flows
  • More example and details are provided on the official Documentation.

Getting Started

Prerequisites

apt-get install python-dev install pypy3-dev 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
# move to nfstream directory and run
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.

License

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

Project 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

nfstream-1.1.5-cp38-cp38-manylinux1_x86_64.whl (691.3 kB view details)

Uploaded CPython 3.8

nfstream-1.1.5-cp37-cp37m-manylinux1_x86_64.whl (691.3 kB view details)

Uploaded CPython 3.7m

nfstream-1.1.5-cp37-cp37m-macosx_10_14_x86_64.whl (218.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

nfstream-1.1.5-cp37-cp37m-macosx_10_13_x86_64.whl (220.8 kB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

nfstream-1.1.5-cp36-cp36m-manylinux1_x86_64.whl (691.3 kB view details)

Uploaded CPython 3.6m

nfstream-1.1.5-cp36-cp36m-macosx_10_13_x86_64.whl (219.3 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

nfstream-1.1.5-cp27-cp27m-macosx_10_14_x86_64.whl (218.8 kB view details)

Uploaded CPython 2.7m macOS 10.14+ x86-64

nfstream-1.1.5-cp27-cp27m-macosx_10_13_x86_64.whl (219.3 kB view details)

Uploaded CPython 2.7m macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nfstream-1.1.5-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 691.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.8.0

File hashes

Hashes for nfstream-1.1.5-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0768a7ffeda8aa988b25cd25058f3731ba8473fce529144722f425efca5e5f52
MD5 7c3e8e19d97c23411280a30b03f4e1c8
BLAKE2b-256 c37da753f1f382a68ffcbe9152eec18865b94d17a692e4e29159c7ec73baffeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.5-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 691.3 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.1

File hashes

Hashes for nfstream-1.1.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 053b3d2d60ee4cecd882e3fc807bb359d59c8c2955babb8ed24068e289638aa2
MD5 4c63f9927cdafb8747f9f067768c0d9f
BLAKE2b-256 880cfd62a5847cb2f049eeb38f25cecd1649479efe98a58aa796136bb23ec57f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nfstream-1.1.5-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 262faad2ab7914341a134caca631bbc1bf2a6875b538034eb2842476641e5049
MD5 ee1c02f3dc1842d743548447901981f3
BLAKE2b-256 4a7a8b6fefed9292adc1d15c6e8f3aadabf345ebbe51d286f7475800ca762b9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.5-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 220.8 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.0

File hashes

Hashes for nfstream-1.1.5-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fc7fdb594c3deb8f17eae3955d6e48fbb2034e566973d78a022455cd03d949be
MD5 d7befa8cf7bfe0021246da97ea3afbf6
BLAKE2b-256 53280ff6f285a5bf7fc3b15bc28d195567311c6ceebbc8d01d3011f28b71ea10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.5-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 691.3 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7

File hashes

Hashes for nfstream-1.1.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5796179131f903ea637c20290a7241f2f77d29788d1628c05a258c8b0bf2e338
MD5 1888672210fd6c2b698080eaae57a087
BLAKE2b-256 322d321911383f725fefac2eae58f5d695bacb5383c3c5a7dd2869c732062506

See more details on using hashes here.

File details

Details for the file nfstream-1.1.5-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: nfstream-1.1.5-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 219.3 kB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.5

File hashes

Hashes for nfstream-1.1.5-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a09ce0069cbf83b1e3c48d0e8c77dfd9ee64a3f077912dfa90b9729a2b69189b
MD5 7885af8ee5c3740410db8e364f1e02ed
BLAKE2b-256 a60a4337761eb36d0299303d4af9cdf0b95160e7713d96bddd86d1834ac50911

See more details on using hashes here.

File details

Details for the file nfstream-1.1.5-cp27-cp27m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: nfstream-1.1.5-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 218.8 kB
  • Tags: CPython 2.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4

File hashes

Hashes for nfstream-1.1.5-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e9560f7739aceb4e17a2d608d0cce5fdeb768d77242cb66d786dd06e3991d4fe
MD5 cb3b7ea69bf2c9cd001b965ca6ee0e1f
BLAKE2b-256 65a61c2026868692b9f871636a924c19a50f9657541ac2783f2c61fd5a0c8d2c

See more details on using hashes here.

File details

Details for the file nfstream-1.1.5-cp27-cp27m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: nfstream-1.1.5-cp27-cp27m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 219.3 kB
  • Tags: CPython 2.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.5

File hashes

Hashes for nfstream-1.1.5-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b6ba8efd7120bf4754591bbbe149f03e05e43db4dbdf35b1dad84634fcc50617
MD5 cab4e914430dd139cd61bd632833f6be
BLAKE2b-256 2d3672386cb14a9e6a2d6c201053ac9536d226860b959c0eec340bfde8ae27b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page