kbandla / dpkt

fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
Other
1.1k stars 271 forks source link

No PPI Support #72

Open kbandla opened 9 years ago

kbandla commented 9 years ago

From pedrogfr...@gmail.com on August 17, 2010 13:00:57

What steps will reproduce the problem? 1. Get a PCAP with PPI info (e.g., in Kismet)

  1. Try to open it using dpkt with the code on http://www.jjguy.com/pcaputils/ What is the expected output? What do you see instead? I see: Traceback (most recent call last): File "parser2.py", line 4, in pcapReader = dpkt.pcap.Reader(file(sys.argv[1], "rb")) File "/usr/lib/pymodules/python2.6/dpkt/pcap.py", line 105, in init self.dloff = dltoff[self.__fh.linktype] KeyError: 192 What version of the product are you using? On what operating system? 1.6+svn54-1 on Ubuntu 10.04 Please provide any additional information below. http://nmap.org/svn/libpcap/pcap-common.c defines 'LINKTYPE_PPI' as '192'. http://www.cacetech.com/documents/PPI%20Header%20format%201.0.9.pdf provides PPI spec.

NOTE: even if it isn't worth it to support PPI may I sugest a better error message for it than an exception?

Original issue: http://code.google.com/p/dpkt/issues/detail?id=45

kbandla commented 9 years ago

From pedrogfr...@gmail.com on August 23, 2010 08:56:07

Also as a nicer way to fail, it can suggest using tool 'wlan2eth' described on http://www.securityfocus.com/archive/137/506588/30/60/threaded to strip the PPI headers (the wlan2eth's actual homepage is http://www.willhackforsushi.com/?page_id=79 ) before exiting with an error.