corrected "selected" field assignment in InteractMenu.py
The "selected" field in the InteractMenu was not assigned correctly before. I changed it to assign the agent_name to the "selected" field, similarly as in other menus. Without this correction if you rename an agent, interact with its new name, and issue the "shell" command, the client will crash because it will try to find the agent in "state.agents" by session ID, even though it should search by name. Exception that occurs in this case without my correction:
(Empire: web05) > shell
Traceback (most recent call last):
File "/home/tamas/repos/Empire/empire.py", line 26, in
Thanks. works for me.
Probably would be better (but more work to fix) to have the state key be the session_id and just use name for display interaction purposes, but I'm fine with this soution.
Can you run the linting? Looks like its failing there. poetry run black . https://github.com/BC-SECURITY/Empire/blob/main/.github/CONTRIBUTING.md#code-formatting-and-linting