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

Update python meterpreter to include hex error code when format message fails #659

Conversation

adfoster-r7
Copy link
Contributor

No description provided.

@@ -2899,7 +2899,7 @@ def stdapi_railgun_api(request, response):
if last_error == ERROR_SUCCESS:
error_message = 'The operation completed successfully.'
else:
error_message = 'FormatMessage failed to retrieve the error.'
error_message = 'FormatMessage failed to retrieve the error for value ' + hex(last_error) + '.'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this change so that it's more clear when an exception is raised that relies on this value, what the underlying problem is

Before:

[-] [should start W32Time] Exception: RuntimeError : Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value.

After:

[-] [should start W32Time] Exception: RuntimeError : Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.

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.

2 participants