forked from p15670423/monkey
BB: Rename get_ips_of_targets() -> get_target_ips_from_serialized_config() and pass correct arguments
This commit is contained in:
parent
c6ffd16e48
commit
690fb71e10
|
@ -11,7 +11,7 @@ class IslandConfigParser:
|
|||
return agent_configuration.to_json()
|
||||
|
||||
@staticmethod
|
||||
def get_ips_of_targets(raw_config: Mapping) -> Iterable:
|
||||
def get_target_ips_from_serialized_config(raw_config: Mapping) -> Iterable:
|
||||
return dpath.util.get(
|
||||
raw_config, "agent_configuration.propagation.network_scan.targets.subnets", "."
|
||||
)
|
||||
|
|
|
@ -91,7 +91,7 @@ class TestMonkeyBlackbox:
|
|||
):
|
||||
raw_config = IslandConfigParser.get_serialized_config(agent_configuration)
|
||||
analyzer = CommunicationAnalyzer(
|
||||
island_client, IslandConfigParser.get_ips_of_targets(raw_config)
|
||||
island_client, IslandConfigParser.get_target_ips_from_serialized_config(raw_config)
|
||||
)
|
||||
log_handler = TestLogsHandler(
|
||||
test_name, island_client, TestMonkeyBlackbox.get_log_dir_path()
|
||||
|
@ -146,7 +146,7 @@ class TestMonkeyBlackbox:
|
|||
raw_config = IslandConfigParser.get_serialized_config(zerologon_test_configuration)
|
||||
zero_logon_analyzer = ZerologonAnalyzer(island_client, expected_creds)
|
||||
communication_analyzer = CommunicationAnalyzer(
|
||||
island_client, IslandConfigParser.get_ips_of_targets(raw_config)
|
||||
island_client, IslandConfigParser.get_target_ips_from_serialized_config(raw_config)
|
||||
)
|
||||
log_handler = TestLogsHandler(
|
||||
test_name, island_client, TestMonkeyBlackbox.get_log_dir_path()
|
||||
|
|
|
@ -36,7 +36,9 @@ class ExploitationTest(BasicTest):
|
|||
|
||||
def print_test_starting_info(self):
|
||||
LOGGER.info("Started {} test".format(self.name))
|
||||
machine_list = ", ".join(IslandConfigParser.get_ips_of_targets(self.raw_config))
|
||||
machine_list = ", ".join(
|
||||
IslandConfigParser.get_target_ips_from_serialized_config(self.raw_config)
|
||||
)
|
||||
LOGGER.info(f"Machines participating in test: {machine_list}")
|
||||
print("")
|
||||
|
||||
|
|
Loading…
Reference in New Issue