Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README.md

🌐 Basic Network Sniffer

Basic Network Sniffer Banner

Python Scapy Linux License Status Educational

A Python-based network packet sniffer built using Scapy to capture and inspect live network traffic for networking and cybersecurity learning.


📖 Overview

Basic Network Sniffer is an educational Python application that captures live network packets and displays useful information such as source and destination IP addresses, protocols, ports, and packet payloads. It provides hands-on experience with packet sniffing, protocol analysis, and network monitoring while helping users understand how data travels across a network.


✨ Features

  • 📡 Live packet capture
  • 🌐 Source & destination IP detection
  • 🔍 TCP, UDP, ICMP and ARP packet identification
  • 🌍 DNS packet analysis
  • 📦 Packet payload inspection
  • 📊 Real-time packet statistics
  • 💾 Export captured data to JSON and TXT
  • 📁 Analyze PCAP files
  • 🎨 Colorized command-line interface
  • 🖥️ Network interface detection
  • ⚡ Lightweight and beginner-friendly

🎥 Demo


📸 Screenshots

Main Menu


🔒 Authentication

User: admin Pass: elitejod

⚙️ Installation

git clone https://github.com/JOD7777/-CodeAlpha_Basic-Network-Sniffer.git
cd  -CodeAlpha_Basic-Network-Sniffer
ls
cd Source
ls
python sniffer.py
python3 -m venv venv
source venv/bin/activate

▶️ Usage

Run the sniffer:

# Interactive menu
sudo python3 sniffer.py

# Direct capture
sudo python3 sniffer.py --capture eth0

# Analyze existing PCAP
python3 sniffer.py --analyze capture.pcap

# List interfaces
sudo python3 sniffer.py --interfaces

📂 Project Structure

Basic-Network-Sniffer/
│
├── assets/
│   ├── banner.png
│   ├── demo.gif
│   └── screenshots/
│
├── src/
│   ├── main.py
│   ├── sniffer.py
│   ├── analyzer.py
│   └── utils.py
│
├── requirements.txt
├── README.md
├── LICENSE
├── .gitignore
└── docs/

📊 Example Output

[TCP ] 192.168.1.5 → 142.250.183.78
Port: 51234 → 443

[DNS ] 192.168.1.5 → 8.8.8.8
Query: github.com

Capture Summary
-------------------------
Total Packets : 1245
TCP           : 910
UDP           : 201
DNS           : 78
ICMP          : 56

🛠 Technologies Used

  • Python 3
  • Scapy
  • Socket Programming
  • Colorama
  • JSON
  • Logging

🛣️ Roadmap

  • Packet filtering
  • Save captures as PCAP
  • CSV export
  • IPv6 support
  • Improved protocol parsing
  • Simple GUI interface

🚀 Future Improvements

  • HTTP/HTTPS request visualization
  • Traffic graphs
  • Search and filter packets
  • Geo-IP lookup
  • Packet replay
  • Cross-platform enhancements

🤝 Contributing

Contributions are welcome! Feel free to fork the repository, improve the project, and submit a pull request.


📄 License

This project is licensed under the MIT License.


⚠️ Disclaimer

This project is intended for educational purposes and authorized network monitoring only. Capture and analyze traffic only on networks you own or have explicit permission to test. Unauthorized packet interception may violate applicable laws or organizational policies.


👨‍💻 Author

Supriyo Malik

Advanced Networking & Cyber Security Student

⭐ If you found this project helpful, please consider starring the repository.

About

A Python-based Basic Network Sniffer built with Scapy to capture and analyze live network traffic. It displays source and destination IP addresses, protocols, ports, and packet details in real time. Designed for networking and cybersecurity education, this lightweight tool helps users understand packet structures and network communication.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages