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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m

nfstream-1.1.2-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.2-cp36-cp36m-manylinux1_x86_64.whl (692.0 kB view details)

Uploaded CPython 3.6m

nfstream-1.1.2-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.2-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.2-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.2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e76b30ef001e7cd0d7e9592ecc4a3f53f8c7190977843777b9957d0ac6983733
MD5 e89a1de9c2c342dba779ddc48a806b8d
BLAKE2b-256 fd4de9ae09427c18a0507700a3de7c6868151b365df036ccbb99ebf7e5262ca8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 873f683d21d381e649c01e6bb6181b4b763727c4f7f05b4e3b57755a83472052
MD5 377b75ccbd6f260a82e8d1fdc14a8eef
BLAKE2b-256 4f97e13689046302dccd9559607f118bdcf7ac0d1bb78adad158c332c496304a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 406f35d0198b972c2985ef906ccb4b85f82bac01428af80935822308e194aeaf
MD5 36eef4e171ba7cf5075159502e557fa7
BLAKE2b-256 2b180a5de6de9dc7a427eb55219d086bba42f683f9c69d69ebb3cdec08e0f668

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b90165c22d42b39023fdc2d06f280c5a7db20dd0ce6bd860b5ea76a7abd8cba7
MD5 34f9087b7b109adb061c3d2dca9767af
BLAKE2b-256 1dbdf215f8541d18f3c3e8e2ede534388488ca40ed00a3ca512998a631b92299

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fb22e99e4e5d669586cf68f84862d0f697d0fe3bb4df788cd12475fee376be7b
MD5 fcf9610f42a40e1f579f56b46de9375b
BLAKE2b-256 cb9d26a1b91513105108058bb03890724be843b04e5173c67c81681f32a74774

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b868b44c4cd0a0a15fae926c8c7753ad2bf33e336716db8b9fa98d0c086686c0
MD5 74416fa6b778a68d2ea95e991dac2e3a
BLAKE2b-256 8e2f1ffd0a0b0024471fe47661a9a1f0ffb02b44789d2b567a5e219219708701

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfstream-1.1.2-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.2-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 dc53e0100baafaa2734320ca88b2db6b98f17d1f8a6e91bec06fcdfa95287eb5
MD5 1ad016cabd6f8c826497371d77ae25bb
BLAKE2b-256 2e3a4862bb2229bf2699627e4dcc47fd694ae104a3c829014d8696e65d0e5286

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