Skip to content
Snippets Groups Projects
Commit ad473cc8 authored by Dirk Loss's avatar Dirk Loss
Browse files

Increased number of iface guesses on Windows for dnet/pcap mapping

Some people have reported dnet interface names like "eth14"
on Windows.
parent d3648de7
No related branches found
No related tags found
No related merge requests found
...@@ -102,11 +102,11 @@ class NetworkInterface(object): ...@@ -102,11 +102,11 @@ class NetworkInterface(object):
def _update_pcapdata(self): def _update_pcapdata(self):
"""Supplement more info from pypcap and the Windows registry""" """Supplement more info from pypcap and the Windows registry"""
# XXX: We try eth0 - eth9 by bruteforce and match by IP address, # XXX: We try eth0 - eth29 by bruteforce and match by IP address,
# because only the IP is available in both pypcap and dnet. # because only the IP is available in both pypcap and dnet.
# This may not work with unorthodox network configurations and is # This may not work with unorthodox network configurations and is
# slow because we have to walk through the Windows registry. # slow because we have to walk through the Windows registry.
for n in range(10): for n in range(30):
guess = "eth%s" % n guess = "eth%s" % n
win_name = pcapdnet.pcap.ex_name(guess) win_name = pcapdnet.pcap.ex_name(guess)
if win_name.endswith("}"): if win_name.endswith("}"):
......
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