Nmap Development mailing list archives
[PATCH] RE: Zenmap Build Guide
From: "Rob Nicholls" <robert () robnicholls co uk>
Date: Sat, 6 Nov 2010 16:12:49 -0000
Hi David, Thanks for that! I had assumed that the error message was down to what I'd installed, which it was in a way, but it seems it was down to the source code. Although the page you provided says it's a fix for Python 2.7, it seems to fix the problem with my Python 2.6.6 based installation. I've attached a patch that tweaks the line to say subprocess._subprocess.STARTF_USESHOWWINDOW in zenmapCore\NmapCommand.py. However, this does break older (e.g. your 2.6.1) Python installations, as it results in the error "'module' object has no attribute '_subprocess'". This happens on Python 2.6.5 or lower. Should we include the attached patch and upgrade to 2.6.6 or should we stick with the current code (and I'll downgrade to 2.6.5)? I can update the build guide at some point to match whatever's decided (either way, I'm pretty sure that GTK+ 2.14 is too old to support gio). I also noticed that http://www.py2exe.org/index.cgi/Tutorial#Step52 says we should be distributing the Visual C++ 2008 Redistributable (and not the SP1 version we used to install, and not the 2010 version that's currently in SVN) when using Python 2.6 or above with py2exe. I'd already updated the Nmap installer and Visual C++ 2008 SP1 redistributable to use the new 2010 version, but should I look into adding the Visual C++ 2008 RTM (with the ATL fix) redistributable to the Nmap installer to support Zenmap? I'm not entirely sure why no one has complained about Zenmap not working (I'll try the installer on a clean installation of Windows 7 at some point to see what happens). Perhaps the VC++ 2008 SP1 redistributable allowed Zenmap to run okay (even though py2exe claim SP1 is the wrong version), or people have already installed it (either with older versions of Nmap or for other applications). It will make the Nmap installer a bit bigger though :( Rob -----Original Message----- From: nmap-dev-bounces () insecure org [mailto:nmap-dev-bounces () insecure org] On Behalf Of David Fifield Sent: 06 November 2010 01:24 To: Rob Nicholls Cc: nmap-dev () insecure org Subject: Re: Zenmap Build Guide On Sat, Oct 30, 2010 at 11:11:15AM +0100, Rob Nicholls wrote:
Is there any chance someone can look into updating the build guide? I'd offer to do it, but I've spent the last few days hitting my head against a brick wall trying to find a combination of third party binaries that work properly together (I've even tried Python 2.5 and 2.7 - along with modules built for those versions, although there isn't really any support for 2.7 so I had to give up trying to go
forwards).
I initially hit problems with "ImportError: No module named gio", which I think was introduced when David included it in setup.py in r20329. David's message says he's using GTK+ 2.18.7, but the build guide talks about 2.14 (which I had originally been using) and 2.16. After some digging around, it sounds like GTK+ 2.14 might be too old to contain gio so I tried moving to 2.16 (and some newer versions), with little success (I've tried to find newer win32 builds of the other packages too). In the few cases where I've managed to get Zenmap to compile, it either crashes immediately or (usually) starts, but will crash when trying to run a scan ("Error executing command 'module' object has no attribute
'STARF_USESHOWWINDOW'"). I haven't tried starting a new build environment from scratch for a while, but there's nothing in the build instructions that looks inaccurate to me. Here are the versions I have installed: Windows XP SP3 gtk+-bundle_2.18.7-20100213_win32 Python 2.6.1 Cairo 1.8.8 pygtk-2.16.0-py2.6 pygobject-2.20.0-py2.6 pycairo-1.8.6-py2.6 py2exe-0.6.9-py2.6 GTK+ is installed in C:\GTK and Python is in C:\Python26. There's a note here about possibly requiring subprocess._subprocess.STARTF_USESHOWWINDOW instead of subprocess.STARF_USESHOWWINDOW. http://stackoverflow.com/questions/1016384/cross-platform-subprocess-with-hi dden-window/3443174#3443174 Crashing immediately upon launching is what was happening to me before I added gio. Are you able to run Zenmap without using py2exe? Like this: cd nmap\zenmap C:\Python26\python.exe zenmap David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Attachment:
zenmap_updated_subprocess.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [PATCH] RE: Zenmap Build Guide Rob Nicholls (Nov 06)
- Re: [PATCH] RE: Zenmap Build Guide David Fifield (Nov 06)