blob: 25b513de440f90d394d6063da94a46412ae7ff0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-aa,v 1.2 2007/01/03 15:02:51 adrianp Exp $
--- scapy.py.orig 2006-10-19 16:58:09.000000000 +0100
+++ scapy.py
@@ -1829,6 +1829,7 @@ except ImportError:
LINUX=sys.platform.startswith("linux")
OPENBSD=sys.platform.startswith("openbsd")
FREEBSD=sys.platform.startswith("freebsd")
+NETBSD=sys.platform.startswith("netbsd")
DARWIN=sys.platform.startswith("darwin")
BIG_ENDIAN= struct.pack("H",1) == "\x00\x01"
X86_64 = (os.uname()[4] == 'x86_64')
@@ -2006,7 +2007,7 @@ except IOError:
ETHER_TYPES={}
try:
- f=open("/etc/ethertypes")
+ f=open("@PKG_SYSCONFDIR@/ethertypes")
for l in f:
try:
if l[0] in ["#","\n"]:
@@ -2446,8 +2447,8 @@ if PCAP:
def get_working_if():
try:
return pcap.lookupdev()
- except pcap.pcapc.EXCEPTION:
- return 'lo'
+ except:
+ return 'lo0'
def attach_filter(s, filter):
warning("attach_filter() should not be called in PCAP mode")
|