Looking to transform (XSL, XSLT to Excel):
<NessusClientData_v2>
<Report name="FAKEDB" xmlns:cm="http://www.nessus.org/cm">
<ReportHost name="192.168.1.1">
<HostProperties>
<tag name="operating-system">Microsoft Windows Server 2008 R2 Enterprise Service Pack 1</tag>
<tag name="host-fqdn">FAKEDB</tag>
</HostProperties>
<ReportItem port="0" svc_name="general" protocol="tcp" severity="0" pluginID="19506" pluginName="Nessus Scan Information" pluginFamily="Settings">
</ReportItem>
<ReportItem port="1122" svc_name="availant-mgr?" protocol="tcp" severity="0" pluginID="11219" pluginName="Nessus SYN scanner" pluginFamily="Port scanners">
</ReportItem>
<ReportItem port="1122" svc_name="ssh" protocol="tcp" severity="2" pluginID="10882" pluginName="SSH Protocol Version 1 Session Key Retrieval" pluginFamily="General">
</ReportItem>
</Report>
<Report name="FAKEAPP" xmlns:cm="http://www.nessus.org/cm">
<ReportHost name="192.168.1.2">
<HostProperties>
<tag name="operating-system">Microsoft Windows Server 2008 R2 Enterprise Service Pack 1</tag>
<tag name="host-fqdn">FAKEDB</tag>
</HostProperties>
<ReportItem port="1122" svc_name="availant-mgr?" protocol="tcp" severity="0" pluginID="11219" pluginName="Nessus SYN scanner" pluginFamily="Port scanners">
</ReportItem>
<ReportItem port="1122" svc_name="ssh" protocol="tcp" severity="2" pluginID="10882" pluginName="SSH Protocol Version 1 Session Key Retrieval" pluginFamily="General">
</ReportItem>
<ReportItem port="47001" svc_name="www" protocol="tcp" severity="0" pluginID="11219" pluginName="Nessus SYN scanner" pluginFamily="Port scanners">
</ReportItem>
<ReportItem port="49152" svc_name="dce-rpc" protocol="tcp" severity="0" pluginID="11219" pluginName="Nessus SYN scanner" pluginFamily="Port scanners">
</ReportItem>
<ReportItem port="0" svc_name="general" protocol="udp" severity="0" pluginID="10287" pluginName="Traceroute Information" pluginFamily="General">
</ReportItem>
<ReportItem port="139" svc_name="smb" protocol="tcp" severity="0" pluginID="11011" pluginName="Microsoft Windows SMB Service Detection" pluginFamily="Windows">
</ReportItem>
</Report>
Into something like:
Port Service FQDN
==== ======== =====
1122 availant-mgr? FAKEDB, FAKEAPP
1122 SSH FAKEDB, FAKEAPP
47001 www FAKEAPP
I can do straight conversions, but nothing like this where I add multiple node pieces into a single cell. I got a decent sample using a "generate-id" call, but I can't get it into separate columns nor can I get it to do the needed logic:
- Only return when pluginID = 11219
- Create a new line when the port & svc_name are not the same.
Anything someone can point me to would be great.
Thanks. Sean.