mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 17:09:02 +00:00
Escape OS fingerprints when writing them to an XML log. OS fingerprint don't
currently contain any characters that need escaping, but this makes them future-proof. This was noticed by João Medeiros.
This commit is contained in:
11
output.cc
11
output.cc
@@ -1624,11 +1624,12 @@ void printosscanoutput(Target *currenths) {
|
||||
} else { assert(0); }
|
||||
|
||||
if (o.debugging || o.verbose) {
|
||||
log_write(LOG_XML,"<osfingerprint fingerprint=\"\n%s\" />\n",
|
||||
mergeFPs(FPR->FPs, FPR->numFPs, false,
|
||||
currenths->v4hostip(), distance, currenths->MACAddress(),
|
||||
FPR->osscan_opentcpport, FPR->osscan_closedtcpport, FPR->osscan_closedudpport,
|
||||
false));
|
||||
char *xml_osfp = xml_convert(mergeFPs(FPR->FPs, FPR->numFPs, false,
|
||||
currenths->v4hostip(), distance, currenths->MACAddress(),
|
||||
FPR->osscan_opentcpport, FPR->osscan_closedtcpport, FPR->osscan_closedudpport,
|
||||
false));
|
||||
log_write(LOG_XML,"<osfingerprint fingerprint=\"\n%s\" />\n", xml_osfp);
|
||||
free(xml_osfp);
|
||||
}
|
||||
|
||||
log_write(LOG_XML, "</os>\n");
|
||||
|
||||
Reference in New Issue
Block a user