Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion AIDojoCoordinator/worlds/WhiteBoxNSGCoordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def _generate_all_actions(self)-> list:
# Collect all data from all hosts
for data in self._data.values():
all_data.update(data)

# sort all components to have a consistent order
all_ips = sorted(list(all_ips))
all_networks = sorted(list(all_networks))
all_data = sorted(list(all_data))

# Network Scans
for source_host, target_network in itertools.product(all_ips, all_networks):
Expand All @@ -71,7 +76,7 @@ def _generate_all_actions(self)-> list:
}
))
# Service Exploits
for source_host, target_host in itertools.product(all_ips, ip_with_services.keys()):
for source_host, target_host in itertools.product(all_ips, sorted(ip_with_services.keys())):
for service in ip_with_services[target_host]:
actions.append(Action(
ActionType.ExploitService,
Expand Down