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

Update python/meterpreter/meterpreter.py

Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
This commit is contained in:
Alex Romero 2023-02-24 17:28:35 +03:30 committed by GitHub
parent 285cf5183d
commit 624a976086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1282,13 +1282,13 @@ class PythonMeterpreter(object):
continue
if not channel.proc_h is proc_h:
continue
if has_windll:
CloseHandle = ctypes.windll.kernel32.CloseHandle
CloseHandle.argtypes = [ctypes.c_void_p]
CloseHandle.restype = ctypes.c_long
CloseHandle(proc_h_id)
self.close_channel(channel_id)
break
if has_windll:
CloseHandle = ctypes.windll.kernel32.CloseHandle
CloseHandle.argtypes = [ctypes.c_void_p]
CloseHandle.restype = ctypes.c_long
CloseHandle(proc_h_id)
debug_print('[*] closed and removed process id: ' + str(proc_h.pid) + ', handle: ' + str(proc_h_id))
return True