So, let's go ahead and look at our first packet. I'm going to go ahead and create one with a payload with a message MyFirstPacket embeded inside an ICMP packet. Then I will use Wireshark to show you the packet breakdown and details of how I did it.
The breakdown is as follows:
- p: This is the name of the packet
- IP(): This is the type of packet you want to create, in this case an IP packet
- (dst="192.168.0.6"): This is the destination to send the packet to (in this case my router)
- /ICMP(): If you want to create an ICMP packet with the default values provided by scapy
- /"MyFirstPacket"): The payload to include which you don't have to provide in order for it to work