RustImplementation #23

Merged
mysticmomba merged 118 commits from RustImplementation into master 2025-11-04 18:13:24 -05:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit 07021fe072 - Show all commits
+2 -1
View File
@@ -283,4 +283,5 @@ def moveAgentToRelatedPolicy(
logger.error(f"Unknown mode '{mode}'. Use 'audit' or 'enforcement'.")
return
api.agent_move(agent.agentid, target_policy)
result = api.agent_move(agent.agentid, target_policy)
return result
+5 -3
View File
@@ -72,10 +72,10 @@ def menu_main(api: AirlockAPIWrapper):
elif choice == "2":
menu_otp(api)
elif choice == "3":
choices = ["audit", "enforcement", "Cancel"]
choices = ["audit", "enforcement", "Exit"]
print(colorText("Move devices to which state?:", "yellow"))
direction = Selector.select_string(choices, False, False)
if direction == "Cancel":
if direction == "Exit":
pass
else:
devices = selectAgents(api)
@@ -85,7 +85,9 @@ def menu_main(api: AirlockAPIWrapper):
confirm = Selector.confirm()
if direction and devices and confirm:
for device in devices:
moveAgentToRelatedPolicy(api,device, str(direction))
result = moveAgentToRelatedPolicy(api,device, str(direction))
logger.info(f"{device.hostname}: result: {result}")
get_sanitized_input("Press enter to continue")
elif choice == "4":
findAgents(api,False)
elif choice == "5":