A Python-based network protocol analyzer built using the scapy library. This tool captures and analyzes network traffic for protocols like TCP, UDP, and HTTP. It provides an interactive command-line interface (CLI) for users to select protocols and analyze packets in real-time.
Interactive CLI: User-friendly menu for selecting protocols and specifying the number of packets to capture.
-
Python 3.x
-
scapy library
- Clone the repository:
git clone https://github.com/livepwn/livepacket.git
cd livepacket
- Install the required dependencies:
pip install scapy
- Run the script:
chmod +x livepacket.py
or
sudo python livepacket.py
Note: sudo is required for packet capture on most systems.
Running the Analyzer Start the script:
sudo python liveport.py
Follow the on-screen prompts:
Select a protocol to analyze (TCP, UDP, or HTTP).
Specify the number of packets to capture.
View the captured packets and analysis in real-time.
Example
Copy
=== Protocol Analyzer ===
1. Analyze TCP Traffic
2. Analyze UDP Traffic
3. Analyze HTTP Traffic
4. Exit
Enter your choice (1-4): 3
Enter the number of packets to capture: 5
[*] Starting protocol analyzer for HTTP...
[+] TCP Packet Detected
Source IP: 192.168.1.100
Destination IP: 192.168.1.1
Source Port: 54321
Destination Port: 80
Payload: b'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n'
[!] HTTP Traffic Detected
HTTP Data: GET / HTTP/1.1
Host: example.com
Do you want to analyze another protocol? (y/n): n
[*] Exiting...
- The interactive CLI makes it easy for users to select protocols and analyze traffic without needing to write custom scripts.
- Captures and analyzes packets in real-time, providing immediate insights into network traffic.
- The modular design allows for easy addition of new protocols and features.
- Built with Python and scapy, the tool is lightweight and does not require heavy dependencies.
Protocol | Description |
---|---|
TCP | Analyzes TCP packets and payloads. |
UDP | Analyzes UDP packets and payloads. |
HTTP | Analyzes HTTP traffic on port 80. |
-
HTTPS Support: Add support for analyzing HTTPS traffic (port 443).
-
Packet Saving: Save captured packets to a .pcap file for offline analysis.
-
Advanced Filtering: Add filters for IP addresses, port ranges, and specific protocols.
-
GUI: Develop a graphical user interface (GUI) for easier interaction.
-
Scapy: The powerful Python library used for packet manipulation and analysis.
-
Python Community: For providing excellent resources and support.
- For questions or feedback, please open an issue on GitHub or contact:
Your Name: [email protected]
GitHub: livepwn