2

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?

Feitan Portor
  • 130
  • 2
  • 8

1 Answers1

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