mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
abd40e3f96
commit
0359cb8f14
2 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue