Crates.io | net-agent |
lib.rs | net-agent |
version | 0.1.2 |
source | src |
created_at | 2024-04-10 18:21:36.401555 |
updated_at | 2024-08-20 13:52:02.132643 |
description | net-agent is a binary crate which you can run to capture network traffic. Then all the captured traffic can be loaded to my.netstalker.io for further analysis. |
homepage | |
repository | |
max_upload_size | |
id | 1203850 |
size | 88,522 |
Net-agent is a stand-alone binary crate within the Net Stalker project that allows you to capture network traffic, which then can be uploaded to my.netstalker.io for further analysis.
To install net-agent
, use Cargo:
cargo install net-agent
Before running net-agent
, make sure you have the necessary dependencies installed for your operating system:
Ubuntu/Debian:
sudo apt-get install libpcap-dev
Fedora:
sudo dnf install libpcap-devel
Arch:
sudo pacman -S libpcap
libpcap
should be installed on Mac OS X by default.Install Npcap.
Download the Npcap SDK.
Add the SDK's /Lib
or /Lib/x64
folder to your LIB
environment variable.
You can run net-agent
with the following command-line options:
net-agent [OPTIONS]
The available options are:
-D, --device-name <DEVICE_NAME>
: Specify the network device to capture traffic from.
-N, --number-packages <NUMBER_PACKAGES>
: Specify the number of packages to capture.
-B, --buffer-size <BUFFER_SIZE>
: Specify the buffer size for capturing packages.
-O, --output-directory <OUTPUT_DIRECTORY>
: Specify the output directory for captured traffic (default: "output").
Note: The -C
, --config-file
option conflicts with all other options. If specified, the configuration will be loaded from the specified file.
To use the configuration file, pass the -C
, --config-file
option with the path to the file.
template
device_name = <DEVICE_NAME>
number_packages = <NUMBER_PACKAGES>
buffer_size = <BUFFER_SIZE>
output_directory = <OUTPUT_DIRECTORY>
example
device_name = "eth0"
number_packages = 1000
buffer_size = 2048
output_directory = "captured_traffic"
On linux to run the application with sudo
it usually needs to run
sudo cp ~/.cargo/bin/net-agent /usr/local/bin/
All the contributions to net-agent
are welcome! If you find any issues or have suggestions for improvements, please open an issue on the GitHub repository.
If you want to contribute code to the project, please follow these steps:
Please note that all contributions are subject to review and approval by the project maintainers.
net-agent
is licensed under the Apache License, Version 2.0. See LICENSE for more information.