Use SCAPY to generate a custom packet and capture thepacket:
1.) Create a packet in Scapy.
2.) Send your packet to either your loopback adapter or to anothermachine on your network.
3.) Capture the sent packet using a network sniffer such as Windumpor Wireshark
following screenshots :
a.) A screenshot of the packet being sent from SCAPY
b.) A screenshot of the captured packet
Solution