mirror of
https://github.com/nmap/nmap.git
synced 2026-01-07 23:19:02 +00:00
Use nmap_fetchfile to find nmap.xsl so the full path to nmap.xsl will be
included in XML output on Windows. This also makes the location of nmap.xsl depend on NMAPDIR, --datadir, etc., rather than being hard-coded.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o XML output now contains the full path to nmap.xml on Windows. [Jah]
|
||||
|
||||
o Zenmap no longer outputs XML elements and attributes that are not in
|
||||
the Nmap XML DTD. This was done mostly by removing things from
|
||||
Zenmap's output, and adding a few new optional things to the Nmap
|
||||
|
||||
@@ -247,11 +247,13 @@ void NmapOps::Initialize() {
|
||||
reason = false;
|
||||
if (datadir) free(datadir);
|
||||
datadir = NULL;
|
||||
if (nmap_fetchfile(tmpxsl, sizeof(tmpxsl), "nmap.xsl") != 1) {
|
||||
#if WIN32
|
||||
Strncpy(tmpxsl, "nmap.xsl", sizeof(tmpxsl));
|
||||
#else
|
||||
Snprintf(tmpxsl, sizeof(tmpxsl), "%s/nmap.xsl", NMAPDATADIR);
|
||||
#endif
|
||||
}
|
||||
if (xsl_stylesheet) free(xsl_stylesheet);
|
||||
xsl_stylesheet = strdup(tmpxsl);
|
||||
spoof_mac_set = false;
|
||||
|
||||
Reference in New Issue
Block a user