-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathbanner.xslt
23 lines (22 loc) · 936 Bytes
/
banner.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:npo="http://xmlns.sven.to/npo">
<npo:comment>[service-name]
Extracts a list of all ports with a specific service (e.g. http, ms-wbt-server, smtp) in host:port format.
Note: This command is intended for the masscan XML output only.
</npo:comment>
<npo:category>extract</npo:category>
<xsl:output method="text" />
<xsl:strip-space elements="*" />
<xsl:template match="/nmaprun/host/ports/port">
<xsl:if test="service/@name=$param1">
<xsl:value-of select="../../address/@addr"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="@portid"/>
<xsl:text> </xsl:text>
<xsl:value-of select="service/@banner"/>
<xsl:text>
</xsl:text>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>