CICFlowMeter V3 Python Implementation
Project description
Python CICFlowMeter (PyFlowmeter)
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
pip install --upgrade pip
pip install pyflowmeter
Usage
from pyflowmeter.sniffer import create_sniffer
This function returns a scapy.sendrecv.AsyncSniffer object.
Parameters
-
input_file[default=None]- A .pcap file where capture offline data from
-
input_interface[default=None]- Interface or list of interfaces (default: None for sniffing on all interfaces).
-
server_endpoint[default=None]- A server endpoint where the data of the flow will be sent. If it is set to
None, no data will be sent.
- A server endpoint where the data of the flow will be sent. If it is set to
-
verbose[default=False]- Wheather or not to print a message when a new packet is read.
Examples
Sniff packets real-time from interface and send the flow to a server (need root permission):
from pyflowmeter.sniffer import create_sniffer
sniffer = create_sniffer(
server_endpoint='http://127.0.0.1:5000/send_traffic',
verbose=True
)
sniffer.start()
try:
sniffer.join()
except KeyboardInterrupt:
print('Stopping the sniffer')
sniffer.stop()
finally:
sniffer.join()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyflowmeter-0.1.7.tar.gz.
File metadata
- Download URL: pyflowmeter-0.1.7.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61839d1a2a8f073638d832a240e150d92a3b1c2e04ea3c75178c6de23cf54c96
|
|
| MD5 |
b4fc9a0db6c371eb566c212fb62b6d85
|
|
| BLAKE2b-256 |
39d6e2741e79987125a818aefd8006a76e47d499159d6043694574d3c89475cd
|
File details
Details for the file pyflowmeter-0.1.7-py3-none-any.whl.
File metadata
- Download URL: pyflowmeter-0.1.7-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08a54525f853e19426b8c69a7c05b0d717413e9fdf80892c2de84c54e8bf878a
|
|
| MD5 |
130304e83b8ba092777af6fd8a92630e
|
|
| BLAKE2b-256 |
b5e60ef7869f8c4f8e8bf3e341ae55746285b421f21452b7b49f4bf4e5f3ee70
|