Skip to content

fix: normalize metasploit session command failure reasons - #14

Merged
setuidloot merged 1 commit into
mainfrom
fix/issue-94-session-command-reasons
Apr 28, 2026
Merged

setuidloot merged 1 commit into
mainfrom
fix/issue-94-session-command-reasons

Conversation

@setuidloot

Copy link
Copy Markdown
Owner

Summary

  • normalize send_session_command failure reasons to explicit values (session_busy, session_missing, session_object_unavailable, command_timeout, command_error) while preserving existing status values
  • include session_id in responses and detect Meterpreter shell-mode mismatch from Unknown command output to return shell_mode_mismatch with actionable guidance
  • add regression assertions for the normalized reasons plus a new mismatch test

Test plan

  • python3 -m pytest tests/test_session_locking.py tests/test_tools_integration.py
  • python3 -m pytest tests/test_session_locking.py tests/test_timeout_cap.py tests/test_version_bump.py
  • poetry build
  • python3 -m pytest (currently fails in this environment with numerous pre-existing unrelated test failures)

Made with Cursor

Return explicit session command reasons for busy/missing/timeout/error paths and detect meterpreter shell-mode mismatches so callers can react deterministically.

Made-with: Cursor
@setuidloot
setuidloot merged commit 19c6e8d into main Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant