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.3-cp38-cp38-manylinux1_x86_64.whl (692.0 kB view details)

Uploaded CPython 3.8

nfstream-1.1.3-cp37-cp37m-manylinux1_x86_64.whl (692.0 kB view details)

Uploaded CPython 3.7m

nfstream-1.1.3-cp37-cp37m-macosx_10_14_x86_64.whl (219.5 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

nfstream-1.1.3-cp36-cp36m-manylinux1_x86_64.whl (692.0 kB view details)

Uploaded CPython 3.6m

nfstream-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl (220.0 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

nfstream-1.1.3-cp27-cp27m-macosx_10_14_x86_64.whl (219.5 kB view details)

Uploaded CPython 2.7m macOS 10.14+ x86-64

nfstream-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl (220.0 kB view details)

Uploaded CPython 2.7m macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 692.0 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.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 21c73220602a3a4c094de5a7ee598b117920a9e7b214b1083d38dec780947e29
MD5 e6df261cf87e410eb58fb3ca3400134f
BLAKE2b-256 14f5819f2f9e848e128a1af484f425c9c86d861d2e57b77e4b2879ee557cca8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 692.0 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.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 41b2d07cf649c8d572a2531a91c50223d53ca9d66d65a74ba862fdd1b5f3d131
MD5 c4e6353ec781337388fadb20d973c199
BLAKE2b-256 bc168880a09a74585ba4c26ae1a7e6f918b848ddf6e3bff910448e1e3916ca41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 219.5 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.3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 dd8e92e176b483fcfbf7266526632935ed35865de4dbc2dcd8eb9f1209bfd676
MD5 cecb428c6642cdd3f75c71dc872d5f97
BLAKE2b-256 7fc2a7a7bce769c7e38c985a9ace77f2ca6ca3ea5b2d65b0ffedefd5492a6289

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 692.0 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.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 621513a81632ec2251211816ccbb83f6dd8dca9193f742e2e4fed9e9a382cc5c
MD5 5987230013fc4804d2759b04f9b1bf44
BLAKE2b-256 ecd5d1ead2f1461b79f8984cfde2bd1fdfa85d3608ddc0321610b4dc662f2fdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 220.0 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.3-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d14c9d44e792a57e8f17973f5e39ff0ac187928f2ae6024546c57a4482250361
MD5 64e0c010f2f357b081417e31ed426feb
BLAKE2b-256 d351b7e5d9cdd21e21e350a0a84192ec3435827395c31e6441844928d7ec6373

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 219.5 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.3-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e832d3e127c6594b3b41cf8babdd265623f6119b57af20bfeb9d84c7ab85404d
MD5 83ca3366280125b4d3d44abe75f4dde0
BLAKE2b-256 ec4ccf199e54e480faf2b4f097afcb167ef56e7492ee708395dbdbb4127b16a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.3-cp27-cp27m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 220.0 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.3-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 992a4bd6f684da9bafbb7d94089a6f765feee2ff31c3b8fb609d4e99027e0823
MD5 19ea0040703cea4c1b82d0d12152c683
BLAKE2b-256 3f7ce4a0783b99760722a4932147b0c78b3c9e670e6959f71a92789e867df8b5

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