Skip to content

Instantly share code, notes, and snippets.

@diogomonica
Created November 28, 2010 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save diogomonica/719373 to your computer and use it in GitHub Desktop.
Save diogomonica/719373 to your computer and use it in GitHub Desktop.
from scapy.all import *
capture = rdpcap(sys.argv[1])
for packet in capture:
if packet.haslayer(UDP) and packet.haslayer(IP) and packet.haslayer(Raw):
if packet.getlayer(Raw).load == sys.argv[2]:
start = packet.time
if packet.getlayer(Raw).load == sys.argv[3]:
end = packet.time
print (end - start)*1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment