https://github.com/lakshayd02/network_protocol_analyzer_python
A Python-based Network Protocol Analyzer using Scapy to capture and log network traffic in real-time. Gain insights into network communications for monitoring, analysis, and troubleshooting. đ
https://github.com/lakshayd02/network_protocol_analyzer_python
network-analyzer network-protocol-analyzer packet-sniffer python scapy scapy-library
Last synced: 9 months ago
JSON representation
A Python-based Network Protocol Analyzer using Scapy to capture and log network traffic in real-time. Gain insights into network communications for monitoring, analysis, and troubleshooting. đ
- Host: GitHub
- URL: https://github.com/lakshayd02/network_protocol_analyzer_python
- Owner: LakshayD02
- Created: 2024-07-27T12:40:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T14:07:09.000Z (11 months ago)
- Last Synced: 2025-03-24T08:11:10.600Z (9 months ago)
- Topics: network-analyzer, network-protocol-analyzer, packet-sniffer, python, scapy, scapy-library
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Network Protocol Analyzer Using Python and Scapy đ
## Description
This Network Protocol Analyzer captures and logs network traffic in real-time using Python and the Scapy library. It provides detailed information about network packets, including timestamps, source/destination IP addresses, protocol details (TCP/UDP), and port numbers. The analyzer automatically selects the best available network interface and logs a configurable number of packets to prevent excessive log file sizes. This tool is invaluable for network monitoring, analysis, and troubleshooting.
## Features
* **Real-time Packet Sniffing:** Captures network traffic in real-time using Scapy. đĄ
* **Automatic Interface Selection:** Automatically selects the optimal network interface for capturing packets. đģ
* **Detailed Logging:** Logs essential packet details (timestamp, summary, source/destination IPs, protocol, ports) to `network_traffic.log`. đ
* **Packet Type Identification:** Identifies IP, TCP, and UDP packets and extracts relevant information. đ
* **Configurable Logging Limit:** Limits the number of logged packets (default 20) to manage log file size. đĸ
* **Informative Packet Summaries:** Provides brief summaries of each captured packet. âšī¸
## Technologies Used
* **Python:** The core programming language for the analyzer. đ
* **Scapy:** A powerful Python library for network packet manipulation and analysis. đĄ
## Ideal For
* **Network Administrators:** Monitoring and analyzing network traffic for troubleshooting and security. đ§âđģ
* **Security Researchers:** Investigating network communications and potential threats. đĩī¸ââī¸
* **Network Engineers:** Analyzing network protocols and performance. đ¨âđŧ
* **Python Developers:** Learning about network programming and packet analysis with Scapy. đ§âđ
## How to Run
1. **Clone the repository:** `git clone `
2. **Install Scapy:** `pip install scapy`
3. **Run the program (with appropriate permissions):** `python network_analyzer.py` (or `python3 network_analyzer.py`) You may need administrator or root privileges to capture network traffic.