PacketProbe is a basic network packet analyzer developed in Python using scapy
. This tool captures and analyzes network packets, displaying information such as source and destination IP addresses, protocols, and payload data.
- Capture and analyze network packets.
- Display source and destination IP addresses.
- Identify the protocol used (TCP, UDP, ICMP).
- Show source and destination ports.
- View the payload data of packets.
- Python 3.x: This program requires Python version 3.x. You can check your Python version by running
python --version
orpython3 --version
in your terminal. If you do not have Python 3.x installed, you can download it from the official Python website.
-
Clone the repository:
git clone https://github.com/PhantomMenace404/PRODIGY_CS_05.git cd PRODIGY_CS_05
-
Install dependencies:
pip install scapy rich
-
Run the script:
sudo python3 packet_probe.py -i <network_interface>
Replace
<network_interface>
with the appropriate network interface (e.g.,eth0
,wlan0
). Note that sudo privileges are required to capture packets. -
Interact with the program:
- The tool will start capturing packets on the specified network interface.
- Information about each captured packet will be displayed in a table format.
- To stop capturing packets, press
Ctrl + C
.
╭──────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Field │ Value │
├──────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Source IP │ 127.0.0.1 │
│ Destination IP │ 2**.***.***.***.*** │
│ Protocol │ UDP │
│ Source Port │ 55963 │
│ Destination Port │ 1900 │
│ Payload │ b'M-SEARCH * HTTP/1.1\r\nHOST: 2**.**.***.**:1900\r\nMAN: "ssdp:discover"\r\nMX: 1\r\nST: │
│ │ urn:dial-multiscreen-org:service:dial:1\r\nUSER-AGENT: Chromium/1**.*.**.** Windows\r\n\r\n' │
╰──────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────── Packet Info ──────────────────────────╮
│ ╭──────────────────────┬─────────────────────────────────────╮ │
│ │ Field │ Value │ │
│ ├──────────────────────┼─────────────────────────────────────┤ │
│ │ Source IP │ 1*.**.*.** │ │
│ │ Destination IP │ 1*.***.**.** │ │
│ │ Protocol │ ICMP │ │
│ │ Payload │ b'abcdefghijklmnopqrstuvwabcdefghi' │ │
│ ╰──────────────────────┴─────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────╯