From bdc9b2fcb97e2a2d8eab9868f95650e478f5659d Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Sun, 10 Sep 2017 13:11:51 +0300 Subject: [PATCH] Return network information. --- chaos_monkey/system_info/__init__.py | 4 ++++ chaos_monkey/system_info/linux_info_collector.py | 1 + chaos_monkey/system_info/windows_info_collector.py | 1 + 3 files changed, 6 insertions(+) diff --git a/chaos_monkey/system_info/__init__.py b/chaos_monkey/system_info/__init__.py index 2238fb542..728dd8966 100644 --- a/chaos_monkey/system_info/__init__.py +++ b/chaos_monkey/system_info/__init__.py @@ -2,6 +2,7 @@ import sys import socket import psutil from enum import IntEnum +from network.info import get_host_subnets, local_ips __author__ = 'uri' @@ -69,3 +70,6 @@ class InfoCollector(object): } pass self.info['process_list'] = processes + + def get_network_info(self): + self.info['network'] = {'subnets': get_host_subnets(), 'local_ips': local_ips()} diff --git a/chaos_monkey/system_info/linux_info_collector.py b/chaos_monkey/system_info/linux_info_collector.py index 64a31c865..6c7570fc0 100644 --- a/chaos_monkey/system_info/linux_info_collector.py +++ b/chaos_monkey/system_info/linux_info_collector.py @@ -14,4 +14,5 @@ class LinuxInfoCollector(InfoCollector): def get_info(self): self.get_hostname() self.get_process_list() + self.get_network_info() return self.info diff --git a/chaos_monkey/system_info/windows_info_collector.py b/chaos_monkey/system_info/windows_info_collector.py index 5cb1253ab..2ba26fd34 100644 --- a/chaos_monkey/system_info/windows_info_collector.py +++ b/chaos_monkey/system_info/windows_info_collector.py @@ -14,6 +14,7 @@ class WindowsInfoCollector(InfoCollector): def get_info(self): self.get_hostname() self.get_process_list() + self.get_network_info() mimikatz_collector = MimikatzCollector() self.info["credentials"] = mimikatz_collector.get_logon_info() return self.info