calculating download speed from .pcap file

P

patrick

hi,

im looking for a way to calculate download speed for a http connection
inside my .pcap file.
but doing even a simple read with dpkt doesnt really work.

import pcap, dpkt
import socket

pcapReader = dpkt.pcap.Reader(file("http-download.pcap"))
for ts, data in pcapReader:
print ts, len(data)
eth = dpkt.ethernet.Ethernet(data)
print eth


according to this howto:
http://jon.oberheide.org/blog/2008/10/15/dpkt-tutorial-2-parsing-a-pcap-file/
it should output something reable, but instead i get ascii art. nothing
readable.

ts and len(data) work as expected, the first is the timestamp and the
second the packet length.

any idea whats wrong?



ive had some progresss with scapy when working with icmp, but when
reading the TCP sequence numbers output differs from wireshark/tcpdump.
posted it here:
http://thread.gmane.org/gmane.comp.security.scapy.general/4952


greets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top