and having close() #defined to my_close() in nbase_winunix.h, I'm just defining close()
to closesocket() in nbase_winunix.h and removing my_close() from winfix.cc. I'm also
defining EWOULDBLOCK to WSAEWOULDBLOCK in nbase_winunix.h.
Nmap builds fine with these changes, and since it's just defining close() to something
that already exists, it shouldn't negatively affect other branches.
These are things I noticed while trying to cleanly "re-port" Ncat to VC++2008.
nse_main and nse_nsock. nse_main now uses Lua to create printable output
while a cleaner hexify procedure has been placed in nsock.
nse_string is removed as a result.
Visual C++ 2008 runtime components if they aren't already installed
on a system. These are some reasonably small DLLs that are
generally necessary for applications compiled with Visual C++ (with
dynamic linking). Many or most systems already have these installed
from other software packages. The lack of these components led to
the error message "The Application failed to intialize properly
(0xc0150002)." with Nmap 4.65. A related change is that Nmap on
Windows is now compiled with /MD rather than /MT so that it
consistently uses these runtime libraries. The patch was created by
Rob Nicholls.
o Our WinPcap installer now starts the NPF driver running as a
service immediately upon installation and after restarts. You can
disable this with new checkboxes. This behavior is important for
Vista and Windows Server 2008 machines when User Account
Control (UAC) is enabled. [Rob Nicholls]
o Nmap and Nmap-Winpcap silent installation now works. Nmap can
be silently installed with the /S option to the installer.
If you install Nmap from the zip file, you can install just
Winpcap silently with the /S option to that
installer. [Rob Nicholls]
o Our WinPcap installer is now included with the Nmap Win32 zip
file. [Fyodor]
o Numerous miscellaneous improvements were made to our Win32
installer, such as using the "Modern" NSIS UI for WinPcap,
improving the option description labels, and showing a finish
page in all cases. [Rob Nicholls]
Now does most of it's work through Lua:
From Nmap-dev: "Many of the changes consist of changing how Nmap interfaces
with Lua that were sometimes awkward or inflexible. Most of the functions
have been made to be callable directly by Lua which offers many technical
advantages: stack management is alleviated, errors are handled cleanly and
are more descriptive, and there is increased reusability."
Additionally:
-- Moved all lua_State * symbols from "l" to "L". This is to maintain
consistency with other Lua libraries (convention) and to make our macros portable.
-- Moved file system manipulation over to nse_fs.cc (from nse_init.cc)
The necessary libraries (lib and dll) and headers required for compilation and
linking are in mswin32/OpenSSL. A detailed upgrade guide is available in
mswin32/OpenSSL/upgrade-guide.txt.
Thanks to Thomas Buchanan for doing the initial work and writing up the initial
build guide.
My openssl-testing branch has been posted on nmap-dev for 12 days and has been
tested by (at least) Thomas, Jah and I, with no reports of failure.
http://seclists.org/nmap-dev/2008/q2/0249.html
Ensuring the safety of assert() calls by keeping NDEBUG undefined throughout
Nmap, Nbase and Nsock.
I've tested this on Linux and Windows XP without problems. On Windows I've
removed the definitions of _DEBUG and NDEBUG from the *.vcproj files.
line length) during Nmap windows build so that it looks much better
when presented by the Windows executable (NSIS) installer. Thanks
to Jah for the patch (which was modified slightly by Fyodor).
Windows rather than VersionNumber to more reliably detect Vista
machines. This should prevent the XP version of Packet.dll from
being installed on Vista. [Rob Nicholls]
localhost as an unprivileged user (nmap --unprivileged localhost). The
error looked like
Skipping SYN Stealth Scan against localhost (127.0.0.1) because Windows does not support scanning your own machine (localhost) this way.
Now connect scan is used instead of SYN scan.
before pcre was made a C module. Remove the nse_pcrelib.vcproj file,
change snprintf to Snprintf, and add a typecast to avoid a warning on
Windows. This and r6026 should be considered a unit.