Created
October 11, 2016 21:34
-
-
Save danielinux/353db3e7de51983df26dfe3829a3c1dc to your computer and use it in GitHub Desktop.
replay a captured pcap stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from scapy.all import * | |
import time, sys | |
pkts = rdpcap(sys.argv[1]) | |
clk = pkts[0].time | |
for p in pkts: | |
time.sleep(p.time - clk) | |
clk = p.time | |
sendp(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment