1
0
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:
david
2007-12-14 07:31:17 +00:00
parent e3ab542682
commit 48dec0f9d9

View File

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