Skip to content

Commit

Permalink
python: avoid outdated PCAP format
Browse files Browse the repository at this point in the history
  • Loading branch information
didier-barvaux committed Apr 24, 2018
1 parent 40d5296 commit a195abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/python/pcap.py
Expand Up @@ -114,6 +114,7 @@ def __init__(self, filename):
self.pcap.parse_info()
self.linktype = self.pcap.section_info.link_type
else:
print("unknown format")
return None

def get_file_format(self):
Expand All @@ -136,6 +137,7 @@ def get_file_format(self):
elif magic_num == 0x0A0D0D0A:
return FileFormat.PCAP_NG, buf
else:
print("unknown magic number %x" % magic_num, file=sys.stderr)
return FileFormat.UNKNOWN, buf

def read_packet(self):
Expand Down
Binary file not shown.

0 comments on commit a195abd

Please sign in to comment.