Skip to content

Instantly share code, notes, and snippets.

@uebayasi
Created June 14, 2016 11:10
Show Gist options
  • Save uebayasi/201ed58eacb0e7cd8f52ef276b3b866e to your computer and use it in GitHub Desktop.
Save uebayasi/201ed58eacb0e7cd8f52ef276b3b866e to your computer and use it in GitHub Desktop.
Sending a minimal Ethernet frame using Scapy and tcpreplay
# scapy
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
Welcome to Scapy (2.3.2)
>> x = Ether(src='00:11:22:33:44:55', dst='aa:bb:cc:dd:ee:ff')
>> wrpcap('x.pcap', x)
>> ^D
# ifconfig vether123 up
# ifconfig vether123 inet6 autoconf
# tcpreplay --intf1 vether123 x.pcap
Actual: 1 packets (14 bytes) sent in 0.000272 seconds.
Rated: 51470.5 Bps, 0.411 Mbps, 3676.47 pps
Statistics for network device: vether123
        Attempted packets:         1
        Successful packets:        1
        Failed packets:            0
        Truncated packets:         0
        Retried packets (ENOBUFS): 0
        Retried packets (EAGAIN):  0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment