diff --git a/CHANGELOG b/CHANGELOG
index 191e01b48..90c8f8cc4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,11 @@
# Nmap Changelog ($Id$); -*-text-*-
+o Nmap now prints a warning when you specify a target name which
+ resolves to multiple IP addresses. Nmap proceeds to scan only the
+ first of those addresses (as it always has done). Thanks to Doug
+ Hoyte for the patch. The warning looks like this:
+ Warning: Hostname google.com resolves to 3 IPs. Using 66.102.7.99.
+
Nmap 4.03
o Updated the LibPCRE build system to add the -fno-thread-jumps option
@@ -8,26 +14,34 @@ o Updated the LibPCRE build system to add the -fno-thread-jumps option
people have reported on such systems. Thanks to Kurt Grutzmacher
(grutz(a)jingojango.net) for sending the configure.ac patch.
-o Increased a write buffer length to avoid Nmap from quitting with the
- message "log_vwrite: write buffer not large enough -- need to
- increase". Thanks to Dave (dmarcher(a)pobox.com) for reporting the
- issue.
-
o Made some portability fixes to keep Nmap compiling with the newest
Visual Studio 2005. Thanks to KX (kxmail(a)gmail.com) for
suggesting them.
o Service fingerprints are now provided in the XML output whenever
they would appear in the interactive output (i.e. when a service
- respons with data but is unrecognized). They are shown in a new
+ response with data but is unrecognized). They are shown in a new
'servicefp' attribute to the 'service' tag. Thanks to Brandon Enright
(bmenrigh(a)ucsd.edu) for sending the patch.
-o WinPcap 3.1 binaries are now shipped in the Nmap tarball, along with
- a customized (for Nmap) installer written by Doug Hoyte. That new
- WinPcap installer is now used in the Nmap self-installer.
+o Improved the Windows build system -- mswin32/Makefile now takes care
+ of packaging Nmap and creating the installers once Visual Studio (GUI)
+ is done building the Release version of mswin32/nmap.sln. If someone
+ knows how to do this (build) step on the command line (using the
+ Makefile), please let me know. Or if you know how to at least make
+ 'Release' (rather than Debug) the default configuration, that would be
+ valuable.
-o Fixed (I hope) a problem where aggresive --min-parallelization
+o WinPcap 3.1 binaries are now shipped in the Nmap tarball, along with
+ a customized installer written by Doug Hoyte. That new WinPcap
+ installer is now used by the Nmap self-installer (if you request
+ WinPcap installation). Some Nmap users were uncomfortable with a
+ "phone home" feature of the official WinPcap installer. It connects
+ back to CACE Technologies, ostensibly to display news and (more
+ recently) advertisements. Our new installer omits that feature, but
+ should be otherwise perfectly compatible with WinPcap 3.1.
+
+o Fixed (I hope) a problem where aggressive --min-parallelization
option values could cause Nmap to quit with the message "box(300, 100,
15) called (min,max,num)". Thanks to Richard van den Berg
(richard.vandenberg(a)ins.com) for reporting the problem.
@@ -35,10 +49,15 @@ o Fixed (I hope) a problem where aggresive --min-parallelization
o Fixed a rare crash bug thanks to a report and patch from Ganga
Bhavani (GBhavani(a)everdreamcorp.com)
+o Increased a write buffer length to avoid Nmap from quitting with the
+ message "log_vwrite: write buffer not large enough -- need to
+ increase". Thanks to Dave (dmarcher(a)pobox.com) for reporting the
+ issue.
+
Nmap 4.02ALPHA2
o Updated to a newer XSL stylesheet (for XML to HTML output
- tranformation) by Benjamin Erb. This new version includes IP
+ transformation) by Benjamin Erb. This new version includes IP
address sorting, removal of javascript requirements, some new
address, hostname, and Nmap version information, and various minor
tweaks and fixes.
@@ -54,7 +73,7 @@ o Made some changes to various Nmap initialization functions which
(ldv(a)altlinux.org) for the patch.
o Cleaned up the code a bit by making a bunch (nearly 100) global
- symols (mostly function calls) static. I was also able to removed
+ symbols (mostly function calls) static. I was also able to removed
some unused functions and superfluous config.h.in defines. Thanks
to Dmitry V. Levin (ldv(a)altlinux.org) for sending a list of
candidate symbols.
@@ -69,7 +88,7 @@ o Changed Nmap to cache interface information rather than opening and
closing it (with dnet's eth_open and eth_close functions) all the
time.
-o Applied a one-character Visual Studio 2005 compatability patch from
+o Applied a one-character Visual Studio 2005 compatibility patch from
kx (kxmail(a)gmail.com). It changed getch() into _getch() on Windows.
Nmap 4.02ALPHA1
@@ -83,8 +102,7 @@ o Added the --log-errors option, which causes most warnings and error
different system that does not yet support this option.
o Rewrote much of the Nmap results output functions to be more
- efficient and support --log-errors. I hope I didn't break
- anything.
+ efficient and support --log-errors.
o Fixed a flaw in the scan engine which could (in rare cases)
lead to a deadlock situation that prevents a scan from completing.
@@ -3092,7 +3110,7 @@ o On the suggestion of the ever-helpful LaMont Jones (lamont(a)hp.com),
libpcap/nbase use symlinks rather than copeis of the file
o Applied patch from LaMont Jones (lamont(a)hp.com) which makes Nmap
- compatable with gcc 3.0 (apparently printf() is a macro in that
+ compatible with gcc 3.0 (apparently printf() is a macro in that
version)
o Applied patch from Colin Phipps (cph(a)netcraft.com) which fixes a
@@ -3256,7 +3274,7 @@ o Added XML output (-oX). Hopefully this will help those of you
o Applied patch from Stefan Rapp (s.rapp(a)hrz.uni-dortmund.de) which
fixes a variable argument integer promotion problem in the new
- snprintf compatability file. This is important for Redhat 7
+ snprintf compatibility file. This is important for Redhat 7
systems.
o Reorganized output-related routines so that they now reside in
@@ -3265,11 +3283,11 @@ o Reorganized output-related routines so that they now reside in
Nmap 2.54BETA5
-o Revamped the 'compatability libraries' subsystem. Moved all of that
+o Revamped the 'compatibility libraries' subsystem. Moved all of that
to a new library called 'libnbase' and changed Nmap and NmapFE to
use that. I included a better version of *snprintf and some other
- compatability files. Obviously I cannot test these changes on every
- whacked OS that needs this compatability cruft, so please let me
+ compatibility files. Obviously I cannot test these changes on every
+ whacked OS that needs this compatibility cruft, so please let me
know if you run into compilation problems.
o Fixed a problem found by Martyn Tovey (martyn(a)netcraft.com) when
@@ -3296,7 +3314,7 @@ o I tried to install Nmap on yet another machine without lex/yacc or
o Applied patch by Jay Freeman (saurik) (saurik(a)saurik.com) to make
Nmap C++-clean (this was lot of tedious work! Thanks!). Note that
Nmap still uses a normal C compiler by default, but Nmap derivatives
- may appreciate C++ compatability. Note that this only applies to
+ may appreciate C++ compatibility. Note that this only applies to
"Nmap proper", not libpcap.
o Added a HACKING file for people who want to help with Nmap
@@ -3516,7 +3534,7 @@ o Added "Host: [machinename] (ip) Status: Down" to machine logs when
the verbose option is given (just like down hosts are reported to
stdout when verbose is given). Suggested by Alek Komarnitsky.
-o Applied NetBSD compatability patch provided by Mipam (reinoud at
+o Applied NetBSD compatibility patch provided by Mipam (reinoud at
ibbnet.org) which changes an autoconf macro to check for
getopt_long_only instead of getopt_long.
diff --git a/TargetGroup.cc b/TargetGroup.cc
index 767526e51..f5dbc90b4 100644
--- a/TargetGroup.cc
+++ b/TargetGroup.cc
@@ -199,9 +199,16 @@ int TargetGroup::parse_expr(const char * const target_expr, int af) {
if (netmask != 32 || namedhost) {
targets_type = IPV4_NETMASK;
if (!inet_aton(target_net, &(startaddr))) {
- if ((target = gethostbyname(target_net)))
+ if ((target = gethostbyname(target_net))) {
+ int count=0;
+
memcpy(&(startaddr), target->h_addr_list[0], sizeof(struct in_addr));
- else {
+
+ while (target->h_addr_list[count]) count++;
+
+ if (count > 1)
+ error("Warning: Hostname %s resolves to %d IPs. Using %s.", target_net, count, inet_ntoa(*((struct in_addr *)target->h_addr_list[0])));
+ } else {
fprintf(stderr, "Failed to resolve given hostname/IP: %s. Note that you can't use '/mask' AND '[1-4,7,100-]' style IP ranges\n", target_net);
free(hostexp);
return 1;
diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt
index cfb7ee136..db76d6fd5 100644
--- a/docs/nmap.usage.txt
+++ b/docs/nmap.usage.txt
@@ -1,4 +1,4 @@
-Nmap 4.02CSW ( http://www.insecure.org/nmap/ )
+Nmap 4.03 ( http://www.insecure.org/nmap/ )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
diff --git a/docs/nmap.xsl b/docs/nmap.xsl
index ee86e3479..d117dea65 100644
--- a/docs/nmap.xsl
+++ b/docs/nmap.xsl
@@ -373,10 +373,10 @@
The process stopped at