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

Improve error message for incompatible sessions #18825

Conversation

cgranleese-r7
Copy link
Contributor

This PR adds better error message when interacting with a module and passing a session that is not compatible.

Example - using a MSSQL session when the module expects a Meterpreter session.

Now the error message will reach into the module and return the modules expected session types and platfrom.

Before

image

After

image

Verification

  • Start msfconsole
  • Choose a module that takes a session as an option
  • Get a session that is incompatible with the module
  • Run the module while using the incompatible session
  • Verify the error message is now updated to include the expected session type and platform

@cgranleese-r7 cgranleese-r7 added enhancement rn-enhancement release notes enhancement labels Feb 12, 2024
@adfoster-r7 adfoster-r7 merged commit 9e456a2 into rapid7:master Feb 12, 2024
51 checks passed
@adfoster-r7
Copy link
Contributor

Release Notes

Improves the error messages when the current session is not compatible with a post module

@cgranleese-r7 cgranleese-r7 deleted the improve-error-message-for-incompatible-sessions branch February 12, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants