Fix spacing

This commit is contained in:
Daniel Goldberg 2019-11-28 12:46:33 +01:00
parent 58b775cfb5
commit 6bef096e71
6 changed files with 18 additions and 15 deletions

View File

@ -51,15 +51,18 @@ if is_windows_os():
local_hostname = socket.gethostname()
return socket.gethostbyname_ex(local_hostname)[2]
def get_routes():
raise NotImplementedError()
else:
from fcntl import ioctl
def local_ips():
valid_ips = [network['addr'] for network in get_host_subnets()]
return valid_ips
def get_routes(): # based on scapy implementation for route parsing
try:
f = open("/proc/net/route", "r")