diff --git a/empire/client/src/menus/InteractMenu.py b/empire/client/src/menus/InteractMenu.py index 3a161ffe4..46180a427 100644 --- a/empire/client/src/menus/InteractMenu.py +++ b/empire/client/src/menus/InteractMenu.py @@ -161,7 +161,7 @@ def use(self, agent_name: str) -> None: state.get_agents() if agent_name in state.agents.keys(): self.name = agent_name - self.selected = state.agents[agent_name]["session_id"] + self.selected = agent_name self.session_id = state.agents[agent_name]["session_id"] self.agent_options = state.agents[agent_name] # todo rename agent_options self.agent_language = self.agent_options["language"] diff --git a/empire/client/src/menus/ShellMenu.py b/empire/client/src/menus/ShellMenu.py index e3d237ae9..89deb79f9 100644 --- a/empire/client/src/menus/ShellMenu.py +++ b/empire/client/src/menus/ShellMenu.py @@ -91,10 +91,10 @@ def shell(self, agent_name: str, shell_cmd: str): Usage: """ - response = state.agent_shell(agent_name, shell_cmd) + response = state.agent_shell(state.agents[agent_name]["session_id"], shell_cmd) if shell_cmd.split()[0].lower() in ["cd", "set-location"]: shell_return = threading.Thread( - target=self.update_directory, args=[agent_name] + target=self.update_directory, args=[state.agents[agent_name]["session_id"]] ) shell_return.daemon = True shell_return.start() diff --git a/empire/client/src/menus/UseModuleMenu.py b/empire/client/src/menus/UseModuleMenu.py index 66cd680a7..d3c0195aa 100644 --- a/empire/client/src/menus/UseModuleMenu.py +++ b/empire/client/src/menus/UseModuleMenu.py @@ -114,7 +114,7 @@ def execute(self): log.error("Agent not set") return response = state.execute_module( - self.record_options["Agent"]["value"], post_body + state.agents[self.record_options["Agent"]["value"]]["session_id"], post_body ) if "status" in response.keys(): if "Agent" in post_body["options"].keys():