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:
parent
285cf5183d
commit
624a976086
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user