1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-26 17:41:08 +01:00

Land #606, minor fixes for Python 2.5

minor fixes to make python meterpreter comptaible with Python 2.5
This commit is contained in:
Spencer McIntyre 2023-02-17 11:55:42 -05:00
commit ea70c919f1
No known key found for this signature in database
GPG Key ID: 58101BA0D0D9C987
2 changed files with 14 additions and 13 deletions

View File

@ -1865,7 +1865,7 @@ def stdapi_net_config_get_arp_table(request, response):
result = GetIpNetTable(ipnet_table, size, False)
if result == ERROR_INSUFFICIENT_BUFFER:
ipnet_table = ctypes.cast(ctypes.create_string_buffer(b'', size.value), ctypes.c_void_p)
ipnet_table = ctypes.cast(ctypes.create_string_buffer(bytes(), size.value), ctypes.c_void_p)
elif result != ERROR_SUCCESS and result != ERROR_NO_DATA:
return error_result_windows(result), response

View File

@ -361,7 +361,8 @@ if DEBUGGING:
file_handler.setLevel(logging.DEBUG)
logging.getLogger().addHandler(file_handler)
class SYSTEM_INFO(ctypes.Structure):
if has_windll:
class SYSTEM_INFO(ctypes.Structure):
_fields_ = [("wProcessorArchitecture", ctypes.c_uint16),
("wReserved", ctypes.c_uint16),
("dwPageSize", ctypes.c_uint32),