forked from osmocom/wireshark
Test: Fix default capture interface discovery.
Change-Id: Id033a0e4e1e81ae9e84774b2d76f95049a2e2b3a Reviewed-on: https://code.wireshark.org/review/27315 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
83b8c9c988
commit
751e9463ce
|
@ -118,8 +118,12 @@ def getDefaultCaptureInterface():
|
|||
if not sys.platform.startswith('win32'):
|
||||
return
|
||||
try:
|
||||
dumpcap_d_blob = str(subprocess.check_output((cmd_dumpcap, '-D'), stderr=subprocess.PIPE))
|
||||
for d_line in dumpcap_d_blob.splitlines():
|
||||
dumpcap_d_data = subprocess.check_output((cmd_dumpcap, '-D'), stderr=subprocess.PIPE)
|
||||
if sys.version_info[0] >= 3:
|
||||
dumpcap_d_stdout = dumpcap_d_data.decode('UTF-8', 'replace')
|
||||
else:
|
||||
dumpcap_d_stdout = unicode(dumpcap_d_data, 'UTF-8', 'replace')
|
||||
for d_line in dumpcap_d_stdout.splitlines():
|
||||
iface_m = re.search('(\d+)\..*(Ethernet|Network Connection|VMware|Intel)', d_line)
|
||||
if iface_m:
|
||||
capture_interface = iface_m.group(1)
|
||||
|
|
Loading…
Reference in New Issue