From 48dec0f9d99a3c3663f5ff775dbabd2d46123335 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 14 Dec 2007 07:31:17 +0000 Subject: [PATCH] =?UTF-8?q?Escape=20OS=20fingerprints=20when=20writing=20t?= =?UTF-8?q?hem=20to=20an=20XML=20log.=20OS=20fingerprint=20don't=20current?= =?UTF-8?q?ly=20contain=20any=20characters=20that=20need=20escaping,=20but?= =?UTF-8?q?=20this=20makes=20them=20future-proof.=20This=20was=20noticed?= =?UTF-8?q?=20by=20Jo=C3=A3o=20Medeiros.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- output.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/output.cc b/output.cc index 75f1efdf0..b59b0dae7 100644 --- a/output.cc +++ b/output.cc @@ -1624,11 +1624,12 @@ void printosscanoutput(Target *currenths) { } else { assert(0); } if (o.debugging || o.verbose) { - log_write(LOG_XML,"\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,"\n", xml_osfp); + free(xml_osfp); } log_write(LOG_XML, "\n");