Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace when session does not exist #1

Open
whotwagner opened this issue Jul 28, 2023 · 0 comments
Open

Stacktrace when session does not exist #1

whotwagner opened this issue Jul 28, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@whotwagner
Copy link
Contributor

Currently a stacktrace occurs if a meterpreter-session is defined that does not exist:

Traceback (most recent call last):
  File "/home/aecid/penpal/venv/bin/penpal", line 8, in <module>
    sys.exit(main())
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/__main__.py", line 78, in main
    sys.exit(hacky.main())
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/penpal.py", line 109, in main
    self.msfsession.run(command)
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/baseexecutor.py", line 87, in run
    self.exec(command)
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/baseexecutor.py", line 98, in exec
    result = self._exec_cmd(command)
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/msfsessionexecutor.py", line 42, in _exec_cmd
    session_id = self.sessionstore.get_session_by_name(command.session, self.msf.sessions)
  File "/home/aecid/penpal/venv/lib/python3.10/site-packages/penpal/msfsessionstore.py", line 17, in get_session_by_name
    if v['exploit_uuid'] == self.sessions[name]:
KeyError: 'foothold'

This Error needs to be caught and handled properly

@whotwagner whotwagner added the enhancement New feature or request label Jul 28, 2023
@whotwagner whotwagner self-assigned this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant