Skip to main content

A flexible and powerful network data analysis library

Project description

build coverage quality doc 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 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.7-cp38-cp38-manylinux1_x86_64.whl (690.2 kB view details)

Uploaded CPython 3.8

nfstream-1.1.7-cp37-cp37m-manylinux1_x86_64.whl (690.2 kB view details)

Uploaded CPython 3.7m

nfstream-1.1.7-cp37-cp37m-macosx_10_14_x86_64.whl (217.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

nfstream-1.1.7-cp37-cp37m-macosx_10_13_x86_64.whl (219.8 kB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

nfstream-1.1.7-cp36-cp36m-manylinux1_x86_64.whl (690.2 kB view details)

Uploaded CPython 3.6m

nfstream-1.1.7-cp36-cp36m-macosx_10_13_x86_64.whl (218.3 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 690.2 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.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 61e841c3e6be22819a3e6d4c519a9e61d049291446bb0c5bd6d4c63e60142165
MD5 d6ab54f339374354de544aaeeb50c320
BLAKE2b-256 12f40bf7cc7a75757a2da1e7807200fce6a0f5d7bec2c49a9ce375216e43f29e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 690.2 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.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cda0ff796b3198848cf3db709beb0d73b351426a854f6268f5b51a380769fd36
MD5 e1790e84b67bc5bcd83eb9b01d1e1ac2
BLAKE2b-256 ce0a0db3c6a267a7661168d6f2d3454786197e268c8e1e3d9cb469d6c5a8add5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 217.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.7-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6350d5b0e46ca9bb22ee75d7f5d090128f59b31e1b304118a50814d91e47359e
MD5 ffd91ef97a28c18cffdefa2b8921ed8b
BLAKE2b-256 28fe7d0d21c2d8cba33f49e9ac5f3fbb076675fa44c9c9fb1108f92941886403

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 219.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.7-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2bc872acf67b496377f3e708c5607f6cf884330bd4eac0ecf04a7c8c3be76cd1
MD5 fd0f43b62ae391e252fcf6b38cfe543c
BLAKE2b-256 de746e6d97cbba89797350782fee9909bc7123e509081650f5e7d2992c157ed9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 690.2 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.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c628d02409b53ad0c0358da60519d6bf9b26b8db844c0216779be91a00ee33e8
MD5 e63c3f85427d47345d33e89ecd64ea7e
BLAKE2b-256 f5099c548f66d6e58f4c41967ff13e123eeb89133573faecd757481e55dcc848

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.7-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 218.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.7-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 49f6f6690e9e7e9c223e8f84b19589b5e439d516660dc9068a767bd15060f38c
MD5 8cd7a7d2f961c2458017a739fb51c5b9
BLAKE2b-256 9ce3f3eb279361b01d9ecc5d8860ef5d91860492b9cb918dee269853a453399b

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