Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: Zenmap from tarball on Mac OS X?

Re: Zenmap from tarball on Mac OS X?

From: Daniel Johnson <daniel_at_daniel-johnson.org>
Date: Mon, 24 Dec 2007 13:03:45 -0500

On Dec 22, 2007, at 1:57 AM, Fyodor wrote:

> On Sat, Dec 08, 2007 at 08:30:47AM -0500, Daniel Johnson wrote:
>>
>>> Can someone here who has Zenmap working on their Mac send to this
>>> list
>>> step-by-step instructions for installing and running Nmap and
>>> Zenmap,
>>> starting with a tarball such as nmap-4.49RC4.tar.bz2? I would
>>> like to
>>> link to and/or summarize the instructions on the Nmap download page
>>> and install guide. Many Mac users will thank you.
>>
>> I don't really have manual build instructions since I use Fink, but I
>> will have a Fink nmap package ready to go when 4.50 is released an I
>> intend to keep it up to date. Note that the latest version will
>> require using Fink's unstable tree, which isn't a big deal since
>> unstable is usually more stable than stable. :) Its page will be
>> here:
>> http://pdb.finkproject.org/pdb/package.php/nmap
>
> Thanks for your notes!
>
> If Fink/Makports/Opendarwin/whatever is the easiest way to get Zenmap
> working, it is OK if the manual instructions include installing those.
> But people might need to know exactly what dependencies they need to
> install on Fink to get it to work. And maybe there are other
> questions they need to answer properly. Or can they just install Fink
> with the defaults and then download the Nmap/Zenmap tarball and run
> them? I'm hoping to get step-by-step instructions for installing
> Zenmap on Mac with the level of detail you can see for command-line
> Nmap compilation at:
>
> http://insecure.org/nmap/install/inst-macosx.html
>
> It would be nice to have instructions for installing it using the Fink
> package, but if we want more developers it would be good to also have
> instructions for getting Zenmap working from svn or the latest
> tarball.

The instructions on the above page are still good, though it might be
worth mentioning that 10.4 needs Xcode 2.5 and 10.5 needs Xcode 3.0.

The command line nmap program will build fine without any additional
dependencies; no need to install Fink or MacPorts.

The only way I've been able to build zenmap is with Fink. First you
need to make sure that X11 is installed. On 10.5 it is by default, but
on 10.4 it's an optional install. There are two parts: a X11User.pkg
installer package on the 10.4 DVD, and a X11SDK.pkg included with
Xcode. Xcode 2.5 should install the SDK by default (older ones didn't)
but that does no good without the X11User.pkg.

Next you need to install Fink. Follow the directions at http://www.finkproject.org/download/index.php?phpLang=en
There is a note there explaining that there isn't a 10.5 binary
installer yet and you must install the source package.

Once Fink is installed, run 'fink selfupdate-rsync' to get the latest
package descriptions. You now need to enable unstable packages. Follow
the directions at http://www.finkproject.org/faq/usage-fink.php?phpLang=en#unstable
If you install Fink from source, it should have asked during setup if
you want to use unstable packages, in which case simply saying yes
there is all that's required.

Now you need to run 'fink install pygtk2-gtk-py25'. That will install
all the necessary packages to use zenmap. This will probably take a
while. :) If you are using an Intel Mac you can also 'fink install
psyco-py25', but it's not available on PowerPC Macs.

Build nmap with:
./configure PYTHON=/sw/bin/python2.5
make
make install DEFAULT_PYTHON_PATH=/sw/bin/python2.5

Note that this will install the python files into /sw/lib/python2.5/
site-packages which is where the Fink nmap package also puts them, so
one would overwrite the other. Maybe someone who knows more about
Python can suggest how to install them somewhere else but have Python
find them. Also, the binaries will go into /usr/local/bin, so it may
be necessary to add /usr/local/bin to PATH, which it isn't by default
on OS X.

> I was glad to see that you have an Nmap 4.50 source packages for the
> unstable Fink distribution on Mac OS X 10.4 and 10.5 at
> http://pdb.finkproject.org/pdb/package.php/nmap . I notice that there
> is no binary distribution of 10.5. Why is that? It doesn't seem that
> there is any binary distribution of Nmap for OS X 10.5, and the one
> for 10.4 is Nmap 3.81 (released in Feb 2005).

No binary distribution has been made for 10.5 yet since it's a
somewhat arduous process which is only done occasionally and it was
decided to wait for a bit more testing of packages on 10.5. Binary
distributions are only made of stable packages, and Nmap 3.81 was the
version in stable when the last bindist was made. The way the system
is supposed to work, packages go into unstable, users test them and
when they report that they work, the packages get moved to stable.
Unfortunately, users almost never report when packages work, just when
they don't work. :( So packages get moved to stable very slowly or not
at all. Generally I try to move my packages if they work for me and I
get no negative feedback for a while. Of course, since the pygtk I
need for nmap is only in unstable, I can't move nmap yet.

Now there are unofficial unstable bindists around. This is a common
one: http://fink.sodan.ecc.u-tokyo.ac.jp/item/14
Those instructions are for 10.3 and 10.4, but I believe they also have
a 10.5 repository now. This is NOT supported by the Fink team, but a
lot of people use it and it generally works well.

>>> Also, if someone wants to figure out how to create an Nmap/Zenmap
>>> .app, that would be great. Maybe it could be offered for Nmap 4.51!
>>> We have a Python packaging system which is supposed to make the
>>> creation of this sort of thing easy.
>>
>> This won't be easy since Mac OS X is lacking many required
>> dependencies. :(
>
> It may not be easy, but I'm hoping there are enough Mac fanatics that
> someone will do it. Windows doesn't come with even fewer dependencies
> and we have an executable installer for that.

I've tried this using py2app and had no luck. :( Even with the
dependencies installed, I encountered many problems including an
inability to relocate libraries because their install_names were too
big, and zenmap looking for share/* in zenmap.app/Contents/MacOS when
py2app put it into zenmap.app/Contents/Resources. Even after hacking
around those issues, double clicking on zenmap.app won't work unless
you are logged in as root. I still had to run zenmap in the Terminal
with sudo, which kinda defeats the purpose of a double-clickable app. :)

Daniel

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

  • application/pkcs7-signature attachment: smime_p7s
Received on Dec 24 2007
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos