diff --git a/monkey/infection_monkey/network/info.py b/monkey/infection_monkey/network/info.py index 5ada2e29f..5bdce4887 100644 --- a/monkey/infection_monkey/network/info.py +++ b/monkey/infection_monkey/network/info.py @@ -157,22 +157,3 @@ def get_interfaces_ranges(): # limit subnet scans to class C only res.append(CidrRange(cidr_range="%s/%s" % (address_str, netmask_str))) return res - - -if is_windows_os(): - - def get_ip_for_connection(target_ip): - return None - - -else: - - def get_ip_for_connection(target_ip): - try: - query_str = "ip route get %s" % target_ip - resp = check_output(query_str.split()) - substr = resp.split() - src = substr[substr.index("src") + 1] - return src - except Exception: - return None