Skip to content
Snippets Groups Projects
Commit 179f281a authored by Phil's avatar Phil
Browse files

Replaced RuntimeWarning with Scapy_Exception

parent e178d18f
No related branches found
No related tags found
No related merge requests found
......@@ -453,10 +453,10 @@ class RawPcapReader:
elif magic == "\xd4\xc3\xb2\xa1": #little endian
self.endian = "<"
else:
raise RuntimeWarning, "Not a pcap capture file (bad magic)"
raise Scapy_Exception("Not a pcap capture file (bad magic)")
hdr = self.f.read(20)
if len(hdr)<20:
raise RuntimeWarning, "Invalid pcap file (too short)"
raise Scapy_Exception("Invalid pcap file (too short)")
vermaj,vermin,tz,sig,snaplen,linktype = struct.unpack(self.endian+"HHIIII",hdr)
self.linktype = linktype
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment