From 40a60d12364e92f1f464996f89caeb8e6e0ca834 Mon Sep 17 00:00:00 2001 From: gpotter2 Date: Fri, 24 Feb 2017 22:50:18 +0100 Subject: [PATCH] Added XP check --- scapy/arch/pcapdnet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/arch/pcapdnet.py b/scapy/arch/pcapdnet.py index 24f4081e9..98c2d59c9 100644 --- a/scapy/arch/pcapdnet.py +++ b/scapy/arch/pcapdnet.py @@ -7,7 +7,7 @@ Packet sending and receiving with libdnet and libpcap/WinPcap. """ -import time,struct,sys +import time, struct, sys, platform import socket if not sys.platform.startswith("win"): from fcntl import ioctl @@ -45,7 +45,7 @@ if conf.use_winpcapy: if "winpcap" in version.lower(): if os.path.exists(os.environ["WINDIR"] + "\\System32\\Npcap\\wpcap.dll"): warning("Winpcap is installed over Npcap. Will use Winpcap (see 'Winpcap/Npcap conflicts' in scapy's docs)", True) - else: + elif platform.release() != "XP": warning("WinPcap is now deprecated (not maintened). Please use Npcap instead", True) elif "npcap" in version.lower(): conf.use_npcap = True