Skip to content

Commit ee07b55

Browse files
author
dreizehnutters
committed
added QoL features
1 parent 39c13f2 commit ee07b55

7 files changed

Lines changed: 461 additions & 107 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ nmap -sV -O --script="default,vulners,http-headers,ssl-cert,banner" -oX nmap-sca
3939
NmapView turns raw Nmap XML into a report you can actually work with during an assessment.
4040

4141
- Host Overview for quick asset triage across host state, OS guesses, vendors, hostnames, and open TCP/UDP port counts
42-
- Service Overview for cross-host service review with versions, extra info, CPEs, and Vulners-linked exploit context
43-
- Service Inventory to spot repeated exposure patterns by grouping services by name, port, and host
42+
- Open Services for cross-host service review with versions, extra info, CPEs, and Vulners-linked exploit context
43+
- Service Summary to spot repeated exposure patterns by grouping services by name, port, and host
4444
- Web & TLS Services with clickable URLs, HTTP titles, redirects, and certificate subject, issuer, expiry, and signature details
4545
- Visualizations including service distribution, open ports per host, host-port matrix, and service-port heatmap
4646
- Host Details with per-host ports, scripts, service fingerprints, and OS detection output

xsl/helpers.xsl

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,26 @@
6060

6161
<xsl:template name="render-nvd-cpe-link">
6262
<xsl:param name="cpe"/>
63-
<a>
63+
<a class="cpe-copy" title="Click to copy CPE">
6464
<xsl:attribute name="href">
6565
<xsl:text>https://nvd.nist.gov/vuln/search/results?form_type=Advanced&amp;cves=on&amp;cpe_version=</xsl:text>
6666
<xsl:value-of select="$cpe"/>
6767
</xsl:attribute>
68+
<xsl:attribute name="data-cpe">
69+
<xsl:value-of select="$cpe"/>
70+
</xsl:attribute>
6871
<xsl:value-of select="$cpe"/>
6972
</a>
7073
</xsl:template>
7174

7275
<xsl:template name="render-cpe-text">
7376
<xsl:param name="cpe"/>
74-
<xsl:value-of select="$cpe"/>
77+
<span class="cpe-copy" title="Click to copy CPE">
78+
<xsl:attribute name="data-cpe">
79+
<xsl:value-of select="$cpe"/>
80+
</xsl:attribute>
81+
<xsl:value-of select="$cpe"/>
82+
</span>
7583
</xsl:template>
7684

7785
<xsl:template name="render-certificate-row">
@@ -95,6 +103,34 @@
95103
</xsl:if>
96104
</xsl:template>
97105

106+
<xsl:template name="extract-header-value">
107+
<xsl:param name="text"/>
108+
<xsl:param name="label"/>
109+
<xsl:variable name="needle" select="concat($label, ':')"/>
110+
<xsl:choose>
111+
<xsl:when test="contains($text, $needle)">
112+
<xsl:value-of select="normalize-space(substring-before(substring-after($text, $needle), '&#xA;'))"/>
113+
</xsl:when>
114+
<xsl:otherwise/>
115+
</xsl:choose>
116+
</xsl:template>
117+
118+
<xsl:template name="render-http-row">
119+
<xsl:param name="label"/>
120+
<xsl:param name="value"/>
121+
<xsl:if test="string($value) != ''">
122+
<div class="certificate-row">
123+
<span class="certificate-label">
124+
<xsl:value-of select="$label"/>
125+
<xsl:text>: </xsl:text>
126+
</span>
127+
<i class="certificate-value">
128+
<xsl:value-of select="$value"/>
129+
</i>
130+
</div>
131+
</xsl:if>
132+
</xsl:template>
133+
98134
<xsl:template name="render-service-url">
99135
<xsl:param name="scheme"/>
100136
<xsl:param name="host"/>

xsl/hosts.xsl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
<th scope="col">OS</th>
1616
<th scope="col">Address</th>
1717
<th scope="col">Hostname</th>
18+
<th scope="col">Pot. Issues</th>
1819
<th scope="col">Open TCP Ports</th>
1920
<th scope="col">Open UDP Ports</th>
2021
</tr>
2122
</thead>
2223
<tbody>
2324
<xsl:for-each select="/nmaprun/host">
25+
<xsl:variable name="vuln-count" select="count(.//script[@id='vulners']//table[elem[@key='id']])"/>
2426
<tr>
2527
<td>
2628
<span class="badge bg-warning">
@@ -48,6 +50,22 @@
4850
<td>
4951
<xsl:value-of select="hostnames/hostname/@name"/>
5052
</td>
53+
<td>
54+
<xsl:choose>
55+
<xsl:when test="$vuln-count &gt; 0">
56+
<span class="badge rounded-pill text-bg-warning host-vuln-badge">
57+
<xsl:attribute name="title">
58+
<xsl:value-of select="$vuln-count"/>
59+
<xsl:text> Vulners entries across open services</xsl:text>
60+
</xsl:attribute>
61+
<xsl:value-of select="$vuln-count"/>
62+
</span>
63+
</xsl:when>
64+
<xsl:otherwise>
65+
<span class="badge rounded-pill text-bg-secondary host-vuln-badge">0</span>
66+
</xsl:otherwise>
67+
</xsl:choose>
68+
</td>
5169
<td>
5270
<xsl:value-of select="count(ports/port[state/@state='open' and @protocol='tcp'])"/>
5371
</td>

xsl/inventory.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33
<xsl:template name="render-service-inventory">
44
<hr class="my-4"/>
5-
<h2 id="serviceinventory" class="fs-4 mt-5 mb-3 bg-light p-3 rounded d-flex justify-content-between align-items-center">Service Inventory<small class="text-muted ms-auto"><em>Note: Nmap's service detection might produce false positives.</em></small></h2>
5+
<h2 id="serviceinventory" class="fs-4 mt-5 mb-3 bg-light p-3 rounded d-flex justify-content-between align-items-center">Service Summary<small class="text-muted ms-auto"><em>Note: Nmap's service detection might produce false positives.</em></small></h2>
66
<xsl:choose>
77
<xsl:when test="count(//host/ports/port[state/@state='open' and service/@name]) &gt; 0">
88
<div class="table-responsive">
@@ -11,7 +11,7 @@
1111
<tr>
1212
<th scope="col">Service Name</th>
1313
<th scope="col">Ports</th>
14-
<th scope="col">#</th>
14+
<th scope="col">Count</th>
1515
<th scope="col">Hosts</th>
1616
</tr>
1717
</thead>

0 commit comments

Comments
 (0)