netmon-proc
is a network monitoring CLI tool designed to monitor network traffic and provide detailed metrics for specified processes. It leverages Scapy for packet sniffing and offers multiple formatting options for the output.
- Real-time network traffic monitoring for specific processes.
- Metrics aggregation and reporting.
- Support for different output formats, including JSON and tabular formats.
- Threaded implementation for efficient performance.
- Customizable filtering using BPF (Berkeley Packet Filter) syntax.
You can install netmon-proc
from PyPI or by pulling the Docker image.
- Install the package using pip:
pip install netmon-proc
- Pull the Docker image:
docker pull 0xzer0x/netmon-proc
- Run the container:
docker container run -it --pid=host --network=host --cap-add=CAP_NET_RAW --cap-add=CAP_SYS_PTRACE --security-opt apparmor=unconfined 0xzer0x/netmon-proc
- Clone the repository:
git clone https://github.com/0xzer0x/netmon-proc.git
cd netmon-proc
- Install main dependencies:
poetry install --without=dev
- Build the package:
poetry build
- Install the package:
pip install dist/netmon_proc-0.x.x-py3-none-any.whl
netmon-proc
provides a CLI for starting the network monitoring tool. Below are some usage examples.
netmon-proc --help
To start monitoring network traffic for a specific process with a BPF filter and output the results in a table format:
netmon-proc --filter "tcp port 443" --format table --metrics rx_bytes firefox
This project is licensed under the GPL v3 License. See the LICENSE file for more details.