Added new functions to create the Nmap uninstaller and install the VC++ 2008 and 2010 redistributables in the appropriate sections. Previously we only created the uninstaller if the Nmap Core Files were selected, and we didn't install the VC++ files if Nping, Ncat and Ndiff were installed on their own.
instituted to keep memory under control when there are many open
ports. Nathan reported 3 GB of memory use (with an out-of-memory NSE
crash) for one host with tens of thousands of open ports. This limit
can be controlled with the variable CONCURRENCY_LIMIT in
nse_main.lua. [David]
Added support for the pre-scan script data. The output is formatted using HTML 'pre' tags
in order to maintain formatting.
- the top menu entry is conditional and only appears if pre-scan data is present
- the pre-scan script block is currently at the beginning of the page right after
the scan summary
Changed host script and port script output to use 'pre' tags so that lengthy output, such
as that from ssl-cert.nse and snmp-win32-services will be readable.
Added title section for hostscript output
Added table headers for hostscript output
Added MAC vendor text to address section
Fixed a bug in the port script output that caused it to only span 5 columns instead of 6.
Changed color of script output cells in port table as well as hostscript and prescan result
tables slightly to make visual parsing easier.
Changed nmap_xsl_version variable from 9b to 9c
Changed wording related to OS fingerprint being present even though the OS was positively identified.
This occurs when Nmap is run with higher levels of verbosity.
Change the OS guess accuracy percentage to use bold font.
quoting of whitespace using double quotes and backslashes. This
allows recovering the original command line array even when
arguments contain whitespace. [David]
scripts to bail. (This is why Ron saw a backtrace when path-mtu elicited an
EMSGSIZE [a separate issue I'm still working on] instead of path-mtu
recognizing the failure and resending with a smaller MTU like it would do
before.) I'm changing this back to the original design of returning false to
scripts (just like connect-mode send failures).
I've changed safe_error() in nse_utility.cc to support varargs.
referencing deallocated memory.
The class was defined basically as follows:
class ScriptResult
{
private:
std::string output;
public:
std::string get_output() const
{
return this->output;
}
};
The problem was when it was used like this, as in our script output
routines:
const char *s = sr.get_output().c_str();
printf("%s\n", s);
The reason is that the temporary std::string returned by get_output goes
out of scope after the line containing it, which invalidates the memory
pointed to by c_str(). By the time of the printf, s may be pointing to
deallocated memory.
This could have been fixed by returning a const reference that would
remain valid as long as the ScriptResult's output member is valid:
const std::string& get_output() const
{
return this->output;
}
However I noticed that get_output() was always immediately followed by a
c_str(), so I just had get_output return that instead, which has the
same period of validity.
This problem became visiable when compiling with Visual C++ 2010. The
first four bytes of script output in normal output would be garbage
(probably some kind of free list pointer). It didn't happen in XML
output, because the get_output-returned string happened to remain in
scope during that.
adated from a patch by Rob Nicholls. Since gtk.Tooltip was only introduced in
PyGTK 2.12, wrap it in a function that checks if the necessary function is
available.