Don't return local IPs.

Return computer fqdn for further information
This commit is contained in:
Daniel Goldberg 2017-09-11 16:56:23 +03:00
parent bdc9b2fcb9
commit 7b4fb5d4f0
1 changed files with 11 additions and 2 deletions

View File

@ -46,7 +46,11 @@ class InfoCollector(object):
self.info = {}
def get_hostname(self):
self.info['hostname'] = socket.gethostname()
"""
Adds the computer hostname to the system information.
:return:
"""
self.info['hostname'] = socket.getfqdn()
def get_process_list(self):
processes = {}
@ -72,4 +76,9 @@ class InfoCollector(object):
self.info['process_list'] = processes
def get_network_info(self):
self.info['network'] = {'subnets': get_host_subnets(), 'local_ips': local_ips()}
"""
Adds network information from the host to the system information.
Currently returns a list of networks accessible from host, containing host ip and the subnet range.
:return: None
"""
self.info['network_info'] = {'networks': get_host_subnets()}