First nmap merge. keep it simple.

I applied my first major Nmap patch today, Yay! major milestone. From my patch email:
I have just applied a patch that reorganizes where the ping
probe information for -PS, -PU, -PA, and -PO is stored. Previously
this information was stored haphazardly in the global class ‘NmapOps’,
I moved them into the ’scan_lists’ struct which isn’t stored as a
global.
Ideally this wont change any functionality so if something is acting
weird with respect to the probes listed above, it may be my fault.
The most likely places a bug may appear would be in traceroute.(cc/h),
idle_scan.(cc/h), service_scan.(cc/h), services.(cc/h), targets.cc,
and scan_engine.cc. I have gone through all these functions thoroughly
but it is possible that I missed something.
Cheers,
Michael
About 80% of the settings in Nmap are stored internally as global variables, it helps out a lot in simplifying how Nmap works (anything to help simplify a program that complex is welcome) but in some cases it can also block new features. For instance, it is imposable to specify a unique range of scan ports for each host in your scan; when you scan multiple hosts they all must have the same - globally stored - parameters.
Its kind of disappointing due to how powerful Nmaps parallelism is; if you need to specify two different option sets for two different host scans you effectively have to start Nmap twice. While this might be trivial for two hosts, imagine 10,000 hosts, each one with unique scan options; you cant possibly start each nmap scan at the same time due to memory limitations so the only options are to ether take a lowest common denominator type scan that encompass all options, or brute force the list a few commands at a time.
But to rectify this would require a massive redesign of how Nmap fundamentally functions - with the chance of introducing a massive amount of bugs into this pretty stable software package - and would necessarily complicate the command line interface to a point that might be overwhelming to a new user(lets not forget about GNU/Hurd).

Fundamental software design problem:

  • Make sure you keep the software in a state that all users can use it
  • Add awesome new feature that can do your taxes and clean the kitchen sink
  • Keep the software in a state that no normal user can use the advanced features without adding any new functionality and start charging $1,500 per seat *COUGH*Nessus*COUGH*

Cheers,
Michael

Organization: Nmap Security Scanner Original: Source