I am trying to send an ICMP packet in python using scapy using my Debian VPS but I am not trying to spoof the IP or anything, but since my server doesn't spoof it won't send it anyways, but I cannot figure out any other way to create an ICMP packet and send it. How can I do this?
Asked
Active
Viewed 433 times
1 Answers
1
Build an IP and an ICMP layer, like this:
from scapy.layers.inet import IP, ICMP
DESTINATION = "192.168.111.4"
packet = IP(dst=DESTINATION, ttl=20) / ICMP()
# print(packet)

jfleach
- 501
- 1
- 8
- 21
-
Would this require a server that spoofs? – Feitan Portor Sep 10 '18 at 16:23
-
You usually need to be root for crafting any sort of packet. – jfleach Sep 10 '18 at 16:25