Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xzer0x/netmon-proc
Network traffic monitoring for processes
https://github.com/0xzer0x/netmon-proc
Last synced: about 1 month ago
JSON representation
Network traffic monitoring for processes
- Host: GitHub
- URL: https://github.com/0xzer0x/netmon-proc
- Owner: 0xzer0x
- License: gpl-3.0
- Created: 2024-07-20T05:37:18.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T17:50:41.000Z (4 months ago)
- Last Synced: 2024-10-01T00:56:54.317Z (about 2 months ago)
- Language: Python
- Homepage: https://pypi.org/project/netmon-proc/
- Size: 94.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Network Monitoring for Processes
`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.
## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)## Features
- 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.## Installation
You can install `netmon-proc` from PyPI or by pulling the Docker image.
### From PyPI
1. Install the package using pip:
```sh
pip install netmon-proc
```### From Docker
1. Pull the Docker image:
```sh
docker pull 0xzer0x/netmon-proc
```2. Run the container:
```sh
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
```### From Source
1. Clone the repository:
```sh
git clone https://github.com/0xzer0x/netmon-proc.git
cd netmon-proc
```2. Install main dependencies:
```sh
poetry install --without=dev
```3. Build the package:
```sh
poetry build
```4. Install the package:
```sh
pip install dist/netmon_proc-0.x.x-py3-none-any.whl
```## Usage
### Command Line Interface
`netmon-proc` provides a CLI for starting the network monitoring tool. Below are some usage examples.
```sh
netmon-proc --help
```### Example Command
To start monitoring network traffic for a specific process with a BPF filter and output the results in a table format:
```sh
netmon-proc --filter "tcp port 443" --format table --metrics rx_bytes firefox
```## License
This project is licensed under the GPL v3 License. See the [LICENSE](LICENSE) file for more details.