forked from p15670423/monkey
Fix get_interface_to_target to always return an IP
This commit is contained in:
parent
8c14136213
commit
17d3795581
|
@ -389,7 +389,9 @@ class HTTPTools(object):
|
|||
|
||||
def get_interface_to_target(dst):
|
||||
if sys.platform == "win32":
|
||||
return get_close_matches(dst, local_ips())[0]
|
||||
ips = local_ips()
|
||||
matches = get_close_matches(dst, ips)
|
||||
return matches[0] if (len(matches) > 0) else ips[0]
|
||||
else:
|
||||
# based on scapy implementation
|
||||
|
||||
|
|
Loading…
Reference in New Issue