Can't get pcap file scanner to terminate normally

E

Earl Eiland

I'm using pcapy to scan a packet capture file. I've tried a variety of
tests to end the loop at EOF, but can't seem to avoid the program
terminating with a pcapy.PcapError. I've tested for empty lists (while
Raw == [] or Passed == []:) and strings (while Raw ==""] or Passed ==
"":) as well as the test in the sample below.

while Raw and Passed :
if Raw_IP != Passed_IP:
Dropped.dump(Raw_hdr, Raw_data)
else:
Passed_hdr, Passed_data = Passed.next()
Raw_hdr, Raw_data = Raw.next()
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top