Skip to content

Commit

Permalink
Fix ScanServices string
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaRigaki committed Apr 2, 2024
1 parent 7e5da9c commit a339c20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agents/llm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def validate_action_in_state(llm_response: dict, state: GameState) -> bool:
case "ScanNetwork":
if action_params["target_network"] in known_nets:
valid = True
case "ScanServices":
case "ScanServices" | "FindServices":
if (
action_params["target_host"] in known_hosts
or action_params["target_host"] in contr_hosts
Expand Down Expand Up @@ -139,7 +139,7 @@ def create_action_from_response(llm_response: dict, state: GameState) -> tuple:
"source_host": IP(src_host),
},
)
case "ScanServices":
case "ScanServices" | "FindServices":
src_host = action_params["source_host"]
action = Action(
ActionType.FindServices,
Expand All @@ -154,7 +154,7 @@ def create_action_from_response(llm_response: dict, state: GameState) -> tuple:
src_host = action_params["source_host"]
if len(list(state.known_services[IP(target_ip)])) > 0:
for serv in state.known_services[IP(target_ip)]:
if serv.name == target_service:
if serv.name == target_service.lower():
parameters = {
"target_host": IP(target_ip),
"target_service": Service(
Expand Down

0 comments on commit a339c20

Please sign in to comment.