Agent: Get local network interfaces inside _build_master()

This commit is contained in:
Mike Salvatore 2021-12-16 19:17:05 -05:00
parent 637053e6cd
commit 9e127b49ae
1 changed files with 4 additions and 4 deletions

View File

@ -153,9 +153,7 @@ class InfectionMonkey:
StateTelem(is_done=False, version=get_version()).send() StateTelem(is_done=False, version=get_version()).send()
TunnelTelem().send() TunnelTelem().send()
local_network_interfaces = InfectionMonkey._get_local_network_interfaces() self._build_master()
self._build_master(local_network_interfaces)
register_signal_handlers(self._master) register_signal_handlers(self._master)
@ -167,7 +165,9 @@ class InfectionMonkey:
return local_network_interfaces return local_network_interfaces
def _build_master(self, local_network_interfaces: List[NetworkInterface]): def _build_master(self):
local_network_interfaces = InfectionMonkey._get_local_network_interfaces()
victim_host_factory = self._build_victim_host_factory(local_network_interfaces) victim_host_factory = self._build_victim_host_factory(local_network_interfaces)
self._master = AutomatedMaster( self._master = AutomatedMaster(