Nmap Development mailing list archives

Re: Hacking on Source and Tested a build


From: Daniel Miller <bonsaiviking () gmail com>
Date: Mon, 22 Dec 2014 14:50:26 -0600

List, I forgot to CC you on this reply, which might be interesting to some
folks:

On Tue, Dec 16, 2014 at 12:26 AM, Edgar Aroutiounian <
edgar.factorial () gmail com> wrote:

Howdy.

From the TODO, I saw

o Make and test build on a newer OS X than 10.6 (10.10 was recently released)

I’m on the latest and greatest OS X,

Darwin TuringMachine.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19
00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

I just built the tool and it seems to work. I’m new to nmap but did this
test with the newly built binary, (This is all from source)

nmap -T4 -A -O www.my_favorite_site.com and it worked just as well as my
brew installed version of nmap.

The build did produce 12 warnings, which seems somewhat unnerving.


Edgar,

Thanks for checking on this. This todo item actually refers to our full
internal build process that produces a .dmg installer for OS X. I
appreciate knowing that the Nmap binary ought to work just fine, since
occasionally there are incompatibilities that creep in over time. We do
still need to do a full test of the build system, though, since we often
have issues with bundling the proper libraries.


I’m also interesting in hacking not he source itself, without meaning to
offend anyone, the codebase is kind of all over the place. Is it firmly
C++? Is there some janitorial work available?


Nmap's codebase is a collection of tools and modified libraries.
Considering the scope of the project, the number of collaborators, and the
age and history of the codebase, it is actually fairly well organized. Of
course, we always seek to improve. Here's a breakdown of the source tree,
along with some comments regarding possible improvements:

/ - Top source directory. This contains the nmap program's source code
(C++), the various nmap-* datafiles, and the CHANGELOG, INSTALL, and
HACKING files. It might be best to have a subdirectory for the nmap
program, like we do for the other subprojects.

/docs/ - Documentation. Contains the Nmap man page, docbook sources,
licenses, and other info. The various build instructions, especially for
Windows and OS X are scattered about, and could be collected here and
refined.

/todo/ - The todo/nmap.txt file is our project's TODO list. This directory
also contains our done.txt list of completed tasks, and individual
developers' todo files as well. We are testing Github Issues as a
bugtracker, so we may be migrating most of this content there. In any case,
lots of these items are stagnant.

/libpcap/, /libpcre/, /liblua/, /liblinear/ - External libraries (C) are
included to make dependencies easier for users who build from source. We
have made a few modifications to libpcap, but you can usually substitute
the development versions of these libraries from the upstream projects or
from your OS's package system.

/libdnet-stripped/ - Another external library (C), the original libdnet
project had some unneeded subprojects that we stripped out, but the source
has also been modified over time to fix bugs and improve portability. The
original libdnet is not currently maintained, and would probably not be a
suitable drop-in replacement.

/libnetutil/ - an internal library (C++) that provides network-related
functions or classes that make it easier to handle things like network
interfaces, routing tables, raw packet manipulation, etc.

/nbase/ - an internal library (C) of base (often compatibility) routines.
Programs using libnbase can guarantee the availability of functions like
(v)snprintf and inet_pton.  This library also provides consistency and
extended features for some functions.

/nsock/ - an internal library (C) for parallel socket event handling. This
library could use some better documentation in the form of a README, but
it's pretty well internally documented with examples and comments.

/nselib/ - Lua libraries, documentation, and datafiles for the Nmap
Scripting Engine (NSE).

/scripts/ - NSE scripts (Lua) and the script.db database.

/zenmap/ - The official Nmap GUI front-end (Python). This is a well-managed
subproject with decent documentation.

/ncat/ - A Netcat replacement (C) built on Nsock.

/ndiff/ - A tool (Python) for finding differences between Nmap scans. Also
serves as a parser for Nmap XML output files.

/nping/ - A packet crafting and network measurement tool (C++). This has
stagnated a bit as the primary developer works on integrating a separate
development branch.

/nmap-update/ - A tool (C) for updating Nmap's datafiles and NSE scripts
and libraries that do not need a recompiled nmap. The use of this tool is
not currently supported, but Nmap committers have access to the
infrastructure for testing and development.

/mswin32/ - Data files and a Visual Studio solution file for building on
Windows. Includes the necessary components to build an executable installer.

/macosx/ - Data files (.pmdoc) for building OS X Applications. This is
supplemented by the files in /zenmap/install_scripts/macosx

If you are looking for specific ways to contribute, check out the
todo/nmap.txt file.

Dan


_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: