1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00

Add response return parameter in fail case

This fixes a small issue where Python meterpreter crashes when MSF
(incorrectly) uses a session type that assumes that Python meterpreter
supports compression when it doesn't. The return value for the function
did not include the response parameter, resulting in Python not being
happy when the function returns as the result was being bound to two
values while only returning one.
This commit is contained in:
OJ 2016-11-28 09:04:45 +10:00
parent b062523320
commit 7a58d43572
No known key found for this signature in database
GPG Key ID: D5DC61FB93260597

View File

@ -902,7 +902,7 @@ class PythonMeterpreter(object):
def _core_loadlib(self, request, response):
data_tlv = packet_get_tlv(request, TLV_TYPE_DATA)
if (data_tlv['type'] & TLV_META_TYPE_COMPRESSED) == TLV_META_TYPE_COMPRESSED:
return ERROR_FAILURE
return ERROR_FAILURE, response
self.last_registered_extension = None
symbols_for_extensions = {'meterpreter':self}