This project is developed as part of my CodeAlpha Cybersecurity Internship.
It focuses on understanding how data flows through a network by capturing and analyzing live packets using the Scapy library in Python.
The tool captures packets in real time, displays useful information such as source and destination IPs, protocols (TCP, UDP, ICMP, ARP), and saves all captured packets into a .pcap file for detailed analysis using Wireshark.
- 📡 Capture real-time network traffic
- 🧩 Display IP addresses, ports, and protocol information
- 🗃️ Save captured packets in
.pcapformat - 🧠 Understand network communication and protocol structure
- 💻 Fully compatible with Kali Linux (VirtualBox supported)
- Python 3
- Scapy library
- Wireshark (for analysis)
- Kali Linux
- Clone the repository:
git clone https://github.com/Kavin-cse/CodeAlpha_NetworkSniffer.git cd CodeAlpha_NetworkSniffer - Install Scapy (if not already installed):
sudo apt install python3-pip pip install scapy
- Run the sniffer:
sudo python3 sniffer_scapy.py
- Stop the capture with Ctrl + C.
The captured packets will be saved as:
captured_packets.pcap
- Open this file in Wireshark for detailed analysis.
-
Understood how network packets are structured
-
Gained hands-on experience in packet sniffing using Scapy
-
Learned to analyze packet data in Wireshark
-
Improved understanding of network protocols (TCP, UDP, ICMP, ARP)
Kavin M
Cybersecurity Intern — CodeAlpha