Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Zenmap couldn't termate nmap.exe process when exiting
From: David Fifield <david () bamsoftware com>
Date: Wed, 22 Jun 2011 09:16:54 -0700

On Wed, Jun 22, 2011 at 08:47:47AM -0700, David Fifield wrote:
On Wed, Jun 22, 2011 at 03:05:15PM +0300, Shinnok wrote:

Just fixed this in latest SVN revision r24238.
This was a trivial one:

-# Not sure if this works. Must research a bit more about this
-# subprocess's method to see how it works.
-# In the meantime, this should not raise any exception because
-# we don't care if it killed the process as it never killed it anyway.
-from subprocess import TerminateProcess
-TerminateProcess(self.command_process._handle, 0)
+import win32api
+win32api.TerminateProcess(int(self.command_process._handle), 0)

This doesn't work for me; Python installed according to the instructions
in docs/win32-installer-zenmap-buildguide.txt doesn't have the win32api
module. If I remove the try...pass I get an exception when trying to
kill a scan.

Not that this is saying much because the subprocess.TerminateProcess
method seems totally broken. ('module' object has no attribute
'TerminateProcess'.) It looks like longstanding code whose brokenness
was hidden by the try...catch block it's in.

David Fifield
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]