Line 0
Link Here
|
|
|
1 |
--- ./scapy/data.py.orig 2009-12-15 03:07:30.000000000 +0100 |
2 |
+++ ./scapy/data.py 2009-12-15 03:08:45.000000000 +0100 |
3 |
@@ -6,6 +6,7 @@ |
4 |
import os,sys,re |
5 |
from dadict import DADict |
6 |
from error import log_loading |
7 |
+from scapy.arch import WINDOWS, FREEBSD |
8 |
|
9 |
############ |
10 |
## Consts ## |
11 |
@@ -46,9 +47,6 @@ |
12 |
|
13 |
MTU = 0x7fff # a.k.a give me all you have |
14 |
|
15 |
-WINDOWS=sys.platform.startswith("win") |
16 |
- |
17 |
- |
18 |
# file parsing to get some values : |
19 |
|
20 |
def load_protocols(filename): |
21 |
@@ -174,6 +172,11 @@ |
22 |
IP_PROTOS=load_protocols(os.environ["SystemRoot"]+"\system32\drivers\etc\protocol") |
23 |
TCP_SERVICES,UDP_SERVICES=load_services(os.environ["SystemRoot"] + "\system32\drivers\etc\services") |
24 |
MANUFDB = load_manuf(os.environ["ProgramFiles"] + "\\wireshark\\manuf") |
25 |
+elif FREEBSD: |
26 |
+ IP_PROTOS=load_protocols("/etc/protocols") |
27 |
+ ETHER_TYPES=load_ethertypes("/etc/ethertypes") |
28 |
+ TCP_SERVICES,UDP_SERVICES=load_services("/etc/services") |
29 |
+ MANUFDB = load_manuf("%%LOCALBASE%%/usr/share/wireshark/wireshark/manuf") |
30 |
else: |
31 |
IP_PROTOS=load_protocols("/etc/protocols") |
32 |
ETHER_TYPES=load_ethertypes("/etc/ethertypes") |