MCPcopy Create free account
hub / github.com/secdev/scapy / test_windump_npcap

Function test_windump_npcap

scapy/arch/windows/__init__.py:223–233  ·  view source on GitHub ↗

Return whether windump version is correct or not

()

Source from the content-addressed store, hash-verified

221
222if conf.prog.tcpdump and conf.use_npcap:
223 def test_windump_npcap():
224 # type: () -> bool
225 """Return whether windump version is correct or not"""
226 try:
227 p_test_windump = sp.Popen([conf.prog.tcpdump, "-help"], stdout=sp.PIPE, stderr=sp.STDOUT) # noqa: E501
228 stdout, err = p_test_windump.communicate()
229 _windows_title()
230 _output = stdout.lower()
231 return b"npcap" in _output and b"winpcap" not in _output
232 except Exception:
233 return False
234 windump_ok = test_windump_npcap()
235 if not windump_ok:
236 log_loading.warning(

Callers 1

__init__.pyFile · 0.85

Calls 1

_windows_titleFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…