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
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