期待转换(XSL、XSLT 到 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>
变成这样的东西:
Port Service FQDN
==== ======== =====
1122 availant-mgr? FAKEDB, FAKEAPP
1122 SSH FAKEDB, FAKEAPP
47001 www FAKEAPP
我可以进行直接转换,但没有像这样将多个节点片段添加到单个单元格中的情况。我使用“generate-id”调用得到了一个不错的样本,但我无法将它放入单独的列中,也无法让它执行所需的逻辑:
- 仅在 pluginID = 11219 时返回
- 当端口和 svc_name 不相同时创建一个新行。
任何有人能指出我的东西都会很棒。
谢谢。肖恩。