Skip to content
Snippets Groups Projects
Commit a6a63509 authored by Guillaume Valadon's avatar Guillaume Valadon Committed by GitHub
Browse files

Merge pull request #444 from p-l-/enh-tcpdump

Get constant values from "consts" since it is no longer in arch
parents 3817d3f1 ac6dd4fe
No related branches found
No related tags found
No related merge requests found
...@@ -18,12 +18,11 @@ import warnings ...@@ -18,12 +18,11 @@ import warnings
warnings.filterwarnings("ignore","tempnam",RuntimeWarning, __name__) warnings.filterwarnings("ignore","tempnam",RuntimeWarning, __name__)
from scapy.config import conf from scapy.config import conf
from scapy.consts import DARWIN, WINDOWS
from scapy.data import MTU from scapy.data import MTU
from scapy.error import log_runtime,log_loading,log_interactive, Scapy_Exception from scapy.error import log_runtime,log_loading,log_interactive, Scapy_Exception
from scapy.base_classes import BasePacketList from scapy.base_classes import BasePacketList
WINDOWS=sys.platform.startswith("win32")
########### ###########
## Tools ## ## Tools ##
########### ###########
...@@ -1148,7 +1147,7 @@ u'64' ...@@ -1148,7 +1147,7 @@ u'64'
stdout=subprocess.PIPE if dump or getfd else None, stdout=subprocess.PIPE if dump or getfd else None,
stderr=open(os.devnull), stderr=open(os.devnull),
) )
elif sys.platform.startswith("darwin"): elif DARWIN:
# Tcpdump cannot read from stdin, see # Tcpdump cannot read from stdin, see
# <http://apple.stackexchange.com/questions/152682/> # <http://apple.stackexchange.com/questions/152682/>
tmpfile = tempfile.NamedTemporaryFile(delete=False) tmpfile = tempfile.NamedTemporaryFile(delete=False)
......
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