Agent: Use address_to_ip_port() in _running_on_island()

This commit is contained in:
Mike Salvatore 2021-12-17 10:55:58 -05:00
parent 89368f729f
commit 50930017fb
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class InfectionMonkey:
) )
def _running_on_island(self, local_network_interfaces: List[NetworkInterface]) -> bool: def _running_on_island(self, local_network_interfaces: List[NetworkInterface]) -> bool:
server_ip = self._default_server.split(":")[0] server_ip, _ = address_to_ip_port(self._default_server)
return server_ip in {interface.address for interface in local_network_interfaces} return server_ip in {interface.address for interface in local_network_interfaces}
def _is_another_monkey_running(self): def _is_another_monkey_running(self):