Trafficpp is a simple and lightweight network traffic sniffer built using C++ and libpcap
. It captures and analyzes network packets, providing detailed information about Ethernet, IP, and TCP headers.
- Network Traffic Sniffing:
- Capture and analyze network packets.
- Packet Information:
- Ethernet, IP, and TCP headers.
- Packet Filtering:
- Filter packets based on IP address, port number, and protocol.
- Packet Logging:
- Log packet information to a file.
- CMake
- Install CMake on MacOS:
brew install cmake
- Install CMake on Ubuntu:
sudo apt-get install cmake
- Install CMake on Fedora:
sudo dnf install cmake
- Install CMake on MacOS:
libpcap
library- Install
libpcap
on MacOS:brew install libpcap
- Install
libpcap
on Ubuntu:sudo apt-get install libpcap-dev
- Install
libpcap
on Fedora:sudo dnf install libpcap-devel
- Install
git clone https://github.com/hsiang086/trafficpp.git
cd traffcpp
mkdir build && cd build && cmake ..
make
sudo ./bin/setpermission.sh
./bin/Traffcpp [options]
--help
or-h
: Display help message.--run
or-r
: Start capturing network packets.--version
or-v
: Display version information.
This project is licensed under the MIT License - see the LICENSE file for details.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.