1
0
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:
david
2008-09-24 19:15:22 +00:00
parent abd40e3f96
commit 0359cb8f14
2 changed files with 4 additions and 0 deletions

View File

@@ -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

View File

@@ -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;