A professional Python-based network monitoring and packet sniffing tool for capturing, filtering, analyzing, and logging real-time network traffic. Designed for cybersecurity students, penetration testers, and networking professionals.
- 🔍 Real-time packet sniffing with
scapy - 🎛️ Filter by protocol (TCP, UDP, ICMP) or port
- 📊 Summary output with IPs and ports
- 📄 CSV logging with timestamp
- 🎨 Color-coded terminal output
- 🧱 Modular structure for easy extension
- 💬 Command-line interface with argument parsing
- Python 3.x
- Scapy
- argparse
- csv
- datetime
packet_sniffer/
├── packet_sniffer.py # Main CLI script
├── sniffer_core.py # Sniffing and filtering logic
├── packet_logger.py # Logs to CSV
├── utils.py # Color output, timestamps, banner
├── README.md
pip install scapysudo python packet_sniffer.py --protocol tcp --count 100 --output traffic.csvOn Windows, run CMD as Administrator.
python packet_sniffer.py --protocol udp
python packet_sniffer.py --count 50
python packet_sniffer.py --port 80 --protocol tcp- Write to
.pcapformat for Wireshark analysis - Add IP/port exclusion filters
- Integrate with basic GUI (e.g. Tkinter)
- Live protocol statistics
MIT License © 2025 Aliullah
Developed with ❤️ by Aliullah
Feel free to connect on GitHub
⚠️ For educational and ethical use only. Never use on networks without permission.