A Python-based network packet analyzer for capturing, analyzing, and visualizing network traffic patterns.
- Real-time packet capture and analysis
- Network behavior clustering using K-means
- Interactive network visualization
- BPF filter support
- Customizable packet count and interface selection
- Email and webhook alerts
- REST API
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
-
Configure alerts (optional):
- Create a
.env
file with email settings - Add webhook URLs in the configuration
- Create a
-
Start the application:
python packet_pirate.py -i eth0 -c 100 -f "tcp port 80"
Access the dashboard at http://0.0.0.0:8080
to view:
- Real-time traffic statistics
- Protocol distribution
- Packet size analysis
- Anomaly detection results
- Alert history
-i, --interface
: Network interface (default: eth0)-c, --count
: Number of packets to capture (default: 100)-f, --filter
: BPF filter string-o, --output
: Save results to file
See API Documentation for REST endpoints and examples.
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License