Skip to content

Commit

Permalink
Explicitly read pcaps as binary in community-id-pcap
Browse files Browse the repository at this point in the history
Many thanks to @adulau for flagging this in corelight/community-id-spec#15.
  • Loading branch information
ckreibich committed Jul 23, 2019
1 parent 5e788f2 commit 8988980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/community-id-pcap
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PcapIterator(object):
self._pcap = pcap

def process(self):
with open(self._pcap) as hdl:
with open(self._pcap, 'r+b') as hdl:
reader = dpkt.pcap.Reader(hdl)
for tstamp, pktdata in reader:
self._process_packet(tstamp, pktdata)
Expand Down

0 comments on commit 8988980

Please sign in to comment.