Changeset 898:8679088c941f
- Timestamp:
- 08/31/08 00:34:14
(4 months ago)
- Author:
- Phil <phil@secdev.org>
- Message:
Replaced RuntimeWarning? with Scapy_Exception
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r897 |
r898 |
|
| 454 | 454 | self.endian = "<" |
|---|
| 455 | 455 | else: |
|---|
| 456 | | raise RuntimeWarning, "Not a pcap capture file (bad magic)" |
|---|
| | 456 | raise Scapy_Exception("Not a pcap capture file (bad magic)") |
|---|
| 457 | 457 | hdr = self.f.read(20) |
|---|
| 458 | 458 | if len(hdr)<20: |
|---|
| 459 | | raise RuntimeWarning, "Invalid pcap file (too short)" |
|---|
| | 459 | raise Scapy_Exception("Invalid pcap file (too short)") |
|---|
| 460 | 460 | vermaj,vermin,tz,sig,snaplen,linktype = struct.unpack(self.endian+"HHIIII",hdr) |
|---|
| 461 | 461 | |
|---|