Giter VIP home page Giter VIP logo

cicflowmeter's Introduction

Python CICFlowMeter

This project is cloned from Python Wrapper CICflowmeter and customized to fit my need. Therefore, it is not maintained actively. If there are any problems, please create an issue or a pull request.

Installation

git clone https://github.com/datthinh1801/cicflowmeter.git
cd cicflowmeter
python3 setup.py install

Usage

usage: cicflowmeter [-h] (-i INPUT_INTERFACE | -f INPUT_FILE) [-c] [-u URL_MODEL] output

positional arguments:
  output                output file name (in flow mode) or directory (in sequence mode)

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT_INTERFACE    capture online data from INPUT_INTERFACE
  -f INPUT_FILE         capture offline data from INPUT_FILE
  -c, --csv, --flow     output flows as csv

Convert pcap file to flow csv:

cicflowmeter -f example.pcap -c flows.csv

Sniff packets real-time from interface to flow csv: (need root permission)

cicflowmeter -i eth0 -c flows.csv

cicflowmeter's People

Contributors

datthinh1801 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cicflowmeter's Issues

pkg_resources.DistributionNotFound: The 'cicflowmeter==0.1.6' distribution was not found and is required by the application

I have installed cicflowmeter via pip and uninstalled it because of some errors I had.
I wanted to try this version but this errors appear when trying to execute it.
The full install output is here:

ubuntu@ubuntu1604:/opt/cicflowmeter$ sudo python3 setup.py install
running install
/usr/local/lib/python3.7/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
/usr/local/lib/python3.7/dist-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pi p and other standards-based tools.
EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
creating src/cicflowmeter.egg-info
writing manifest file 'src/cicflowmeter.egg-info/SOURCES.txt'
writing manifest file 'src/cicflowmeter.egg-info/SOURCES.txt'
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/cicflowmeter
copying src/cicflowmeter/constants.py -> build/lib/cicflowmeter
copying src/cicflowmeter/flow_session.py -> build/lib/cicflowmeter
copying src/cicflowmeter/init.py -> build/lib/cicflowmeter
copying src/cicflowmeter/utils.py -> build/lib/cicflowmeter
copying src/cicflowmeter/flow.py -> build/lib/cicflowmeter
copying src/cicflowmeter/sniffer.py -> build/lib/cicflowmeter
creating build/lib/cicflowmeter/features
copying src/cicflowmeter/features/flag_count.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/packet_count.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/response_time.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/packet_time.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/packet_length.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/init.py -> build/lib/cicflowmeter/features
copying src/cicflowmeter/features/flow_bytes.py -> build/lib/cicflowmeter/features
creating build/lib/cicflowmeter/features/context
copying src/cicflowmeter/features/context/packet_flow_key.py -> build/lib/cicflowmeter/features/context
copying src/cicflowmeter/features/context/packet_direction.py -> build/lib/cicflowmeter/features/context
copying src/cicflowmeter/features/context/init.py -> build/lib/cicflowmeter/features/context
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/cicflowmeter
creating build/bdist.linux-x86_64/egg/cicflowmeter/features
creating build/bdist.linux-x86_64/egg/cicflowmeter/features/context
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/constants.py to constants.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/flow_session.py to flow_session.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/init.py to init.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/flag_count.py to flag_count.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/packet_count.py to packet_count.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/response_time.py to response_time.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/packet_time.py to packet_time.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/packet_length.py to packet_length.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/init.py to init.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/context/packet_flow_key.py to packet_flow_key.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/context/packet_direction.py to packet_direction.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/context/init.py to init.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/features/flow_bytes.py to flow_bytes.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/utils.py to utils.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/flow.py to flow.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/cicflowmeter/sniffer.py to sniffer.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/cicflowmeter.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Removing /usr/lib/python3.7/site-packages/cicflowmeter-0.1.6-py3.7.egg
Copying cicflowmeter-0.1.6-py3.7.egg to /usr/lib/python3.7/site-packages

And this is the error output

ubuntu@ubuntu1604:/opt/cicflowmeter$ sudo cicflowmeter -i ens33 -c flows.csv
Traceback (most recent call last):
File "/usr/bin/cicflowmeter", line 10, in
from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/cicflowmeter", line 13, in
from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/cicflowmeter", line 15, in
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 3266, in
@_call_aside
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 3241, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 573, in _build_master
ws.require(requires)
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 891, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/init.py", line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cicflowmeter==0.1.6' distribution was not found and is required by the application

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.