scapy
scapy python library
from scapy.all import *
define packet (ARP):
arp = ARP(op = 3)
arp.hwsrc = "6c:7e:67:b7:a6:ec"
arp.hwdst = "6c:7e:67:b7:a6:ec"
arp.psrc = "0.0.0.0"
arp.pdst = "0.0.0.0"
define Ethernet frame (and include arp):
eth = Ether(dst="ff:ff:ff:ff:ff:ff")/arp
and so on with upper layers:
ip = IP()/eth
tcp = TCP()/ip
'''