Nmap Development mailing list archives

Re: Zenmap couldn't termate nmap.exe process when exiting


From: Shinnok <admin () shinnok com>
Date: Fri, 24 Jun 2011 01:58:16 +0300

On 6/24/2011 12:11 AM, David Fifield wrote:
I have the following two alternative approaches that work just fine:

#Use ctypes instead pywin32 which is a standard library in
Python.org distribution
import ctypes
ctypes.windll.kernel32.TerminateProcess(int(self.command_process._handle),
-1)

-or-

# :-P
os.popen('TASKKILL /PID '+str(self.command_process.pid)+' /F')
The ctypes method looks good to me. Please check that it works back to
Windows XP, and then you can commit it.

David Fifield
Tested on Windows XP SP3 with Python(.org) 2.7.

Commited in r24308.
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: