-arch i386" when building a universal binary on Mac OS X, and you can't
generate dependencies while using those flags. Include directories were
previously moved to CPPFLAGS so the right dependencies are still found.
script. This is to enable us to use just CPPFLAGS where we don't want CXXFLAGS
also. An example of this is when we are generating dependencies with -MM. The
Apple GCC won't let us use this flag when we also give "-arch ppc -arch i386"
in CXXFLAGS, as we would when generating a universal binary.
metapackage (.mpkg) installer. The installer lets you pick if you want to
install Nmap or Zenmap or both. It puts Nmap in /usr/local and the previously
developed Zenmap.app in /Applications.
minutes. Part of what printStatusMessage does is display the total
elapsed time. The code looked like this:
log_write(LOG_STDOUT,
"Stats: %d:%02d:%02d elapsed; %d hosts completed (%d up), %d undergoing %s\n",
time/60/24, time/60 % 24, time % 60, o.numhosts_scanned - o.numhosts_scanning,
o.numhosts_up, o.numhosts_scanning, scantype2str(o.current_scantype));
where time is the number of seconds since the program started. However,
this code acts as though each hour has only 24 minutes. That is, after
0:23:59 it would become 1:00:00. This commit changes the 24s to 60s to
make it work right.
was always falling back to the system ARP cache. Of course this
raises the question of whether NmapArpCache is needed in the first
place. [Daniel Roethlisberger]
foudn that five files can be open on Mac OS X: stdin, stdout, stderr, /dev/tty,
and /private/var/run/utmpx. This could cause a non-root scan at a high scan
rateto fail with the message "Too many open files". I was able to cause this
with "nmap --min-rate 5000 localhost -p-".
That command still fails with the same error message, but for an entirely
different reason. After a while, one of the connect calls fails with an errno of
22 = EINVAL, Invalid argument. Whatever this means, the socket doesn't get
closed, Nmap just reports a "Strange error from connect". The socket is still
open but Nmap doesn't include it in its count of open sockets, so it's off by
one (or more, conceivably). This allows it to try to open one too many sockets
and bomb with an error message.
Note that running as non-root is important both because it uses a connect scan
and because non-root users have a lower limit on open files.
I've tried just closing the socket when EINVAL is returned, and that fixes the
problem. But that's likely to differ on different systems. Plus I don't know why
EINVAL is returned; maybe it's an OS bug. This only affects localhost scans and
only at high scan rates, so I'm leaving it alone.
it was 32 characters. The "idle scan against " and the \0 terminator take up 19
characters, leaving only 13, which isn't enough to represent all IP addresses,
let alone host names.