From 8d61e5591b8e45dbba6a343bab5a1c1a16fcce24 Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Wed, 14 Jun 2023 22:21:53 +0100 Subject: [PATCH] Update python meterpreter to include hex error code when format message fails --- python/meterpreter/ext_server_stdapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/meterpreter/ext_server_stdapi.py b/python/meterpreter/ext_server_stdapi.py index af5dcd85e..e3243851a 100644 --- a/python/meterpreter/ext_server_stdapi.py +++ b/python/meterpreter/ext_server_stdapi.py @@ -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) + '.' else: raise RuntimeError('unknown platform')