XML output not wellformed
Jochen Haemmerle
mail at jhaemmerle.org
Wed Jul 22 13:20:52 EDT 2009
Hi,
I discovered a bug in the xml output of ra (argus-clients-3.0.2.beta.9).
As you can see in the sample below, ra always misses the last quotes of
the xml attributes.
The quick fix attached worked for me. I have no idea if it has any
other implications.
Jochen
<ArgusRecord StartTime = "1233822320.886629 LastTime =
"1233822320.887078 Flags = " e Proto = "17 SrcMacAddr =
"xx:xx:xx:xx:xx:xx DstMacAddr = "xx:xx:xx:xx:xx:xx SrcAddr =
"10.0.0.1 SrcPort = "xxx DstAddr = "10.0.0.1 DstPort = "xx Bytes =
"200 SrcBytes = "78 DstBytes = "122 SrcPkts = "1 DstPkts = "1 State
= "CON />
diff common/argus_util.c.orig common/argus_util.c
3009c3009,3013
< sprintf(&buf[strlen(buf)], "%s ", tmpbuf);
---
> if (parser->ArgusPrintXml) {
> sprintf(&buf[strlen(buf)], "%s\"", tmpbuf);
> }else{
> sprintf(&buf[strlen(buf)], "%s ", tmpbuf);
> }
More information about the argus
mailing list