1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-30 11:29:01 +00:00

Defer the calculation of the default XSL stylesheet until it's needed.

This is going to depend on argv[0], so it can't happen in the NmapOps
constructor, which runs even before main.
This commit is contained in:
david
2011-03-26 06:48:17 +00:00
parent 5a32f584d4
commit 02669cbfd8
2 changed files with 31 additions and 16 deletions

View File

@@ -235,7 +235,7 @@ class NmapOps {
/* Returns the full path or URL that should be printed in the XML
output xml-stylesheet element. Returns NULL if the whole element
should be skipped */
char *XSLStyleSheet() { return xsl_stylesheet; }
char *XSLStyleSheet();
/* Sets the spoofed MAC address */
void setSpoofMACAddress(u8 *mac_data);
@@ -362,6 +362,7 @@ class NmapOps {
struct timeval start_time;
bool pTrace; // Whether packet tracing has been enabled
bool vTrace; // Whether version tracing has been enabled
bool xsl_stylesheet_set;
char *xsl_stylesheet;
u8 spoof_mac[6];
bool spoof_mac_set;