Skip to content
Snippets Groups Projects
Commit 9ca71249 authored by gpotter2's avatar gpotter2
Browse files

Small fixes

parent 3b36b636
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
""" """
Customizations needed to support Microsoft Windows. Customizations needed to support Microsoft Windows.
""" """
import os, re, sys, socket, time, itertools, platform, subprocess import os, re, sys, socket, time, itertools, platform
import subprocess as sp import subprocess as sp
from glob import glob from glob import glob
import tempfile import tempfile
...@@ -233,6 +233,7 @@ def win_find_exe(filename, installsubdir=None, env="ProgramFiles"): ...@@ -233,6 +233,7 @@ def win_find_exe(filename, installsubdir=None, env="ProgramFiles"):
break break
return path return path
def is_new_release(ignoreVBS=False): def is_new_release(ignoreVBS=False):
release = platform.release() release = platform.release()
if conf.prog.powershell is None and not ignoreVBS: if conf.prog.powershell is None and not ignoreVBS:
...@@ -285,7 +286,7 @@ if conf.prog.tcpdump != "windump" and conf.use_npcap: ...@@ -285,7 +286,7 @@ if conf.prog.tcpdump != "windump" and conf.use_npcap:
def test_windump_npcap(): def test_windump_npcap():
"""Return wether windump version is correct or not""" """Return wether windump version is correct or not"""
try: try:
p_test_windump = subprocess.Popen([conf.prog.tcpdump, "-help"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p_test_windump = sp.Popen([conf.prog.tcpdump, "-help"], stdout=sp.PIPE, stderr=sp.STDOUT)
stdout, err = p_test_windump.communicate() stdout, err = p_test_windump.communicate()
return "npcap" in stdout.lower() return "npcap" in stdout.lower()
except: except:
......
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