This project is a Python-based interactive tool that uses Scapy to create and send custom ICMP (ping) packets.
It allows you to define the source IP, destination IP, and ICMP ID, then sends the crafted packet and displays the response if one is received.
This makes it useful for:
- Learning how ICMP works
- Debugging networks
- Security testing in controlled environments
- Interactive mode:
- Enter Source IP (spoofing possible if allowed)
- Enter Destination IP
- Enter ICMP ID
- Sends ICMP Echo Request and waits for a reply
- Displays response details using Scapy’s
.show()
- Graceful error handling
- Loop option (send multiple packets in one run)
python -m venv venv
source venv/bin/activate # Linux / Mac
venv\Scripts\activate # Windows
pip install scapy
python icmp.py
$ python icmp.py
src ip > 192.168.1.10
dst ip > www.google.com
icmp id > 123
Continue? (y/n) > y
If there is a reply, you’ll see packet details printed (IP/ICMP headers and more). If no reply is received, you’ll see:
No response received.
Python 3.8+
Scapy Python library
This tool is provided for educational and research purposes only.
You are solely responsible for using it in a legal and ethical manner.
Unauthorized use of ICMP spoofing, packet crafting, or network testing tools may be illegal and could result in severe consequences.
Created by Ayoub GitHub: AYOUB-CODING1