@@ -6,6 +6,10 @@ Andreas Hontzia (@honze_net)
66-->
77<xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform" >
88 <xsl : output method =" html" encoding =" utf-8" indent =" yes" doctype-system =" about:legacy-compat" />
9+ <!-- Define URL parameters -->
10+ <xsl : param name =" url" />
11+ <xsl : param name =" hideofflinehosts" value =" 0" />
12+ <!-- Begin document -->
913 <xsl : template match =" /" >
1014 <html lang =" en" >
1115 <head >
@@ -82,7 +86,8 @@ Andreas Hontzia (@honze_net)
8286 </div >
8387 </div >
8488 </div >
85- <h2 id =" scannedhosts" class =" target" >Scanned Hosts</h2 >
89+ <h2 id =" scannedhosts" class =" target" >Scanned Hosts<xsl : if test =" $hideofflinehosts=1" ><small > (offline hosts are hidden)</small ></xsl : if >
90+ </h2 >
8691 <div class =" table-responsive" >
8792 <table id =" table-overview" class =" table table-striped dataTable" role =" grid" >
8893 <thead >
@@ -96,13 +101,15 @@ Andreas Hontzia (@honze_net)
96101 </thead >
97102 <tbody >
98103 <xsl : for-each select =" /nmaprun/host" >
99- <tr >
100- <td ><span class =" label label-danger" ><xsl : if test =" status/@state='up'" ><xsl : attribute name =" class" >label label-success</xsl : attribute ></xsl : if ><xsl : value-of select =" status/@state" /></span ></td >
101- <td ><xsl : value-of select =" address/@addr" /></td >
102- <td ><xsl : value-of select =" hostnames/hostname/@name" /></td >
103- <td ><xsl : value-of select =" count(ports/port[state/@state='open' and @protocol='tcp'])" /></td >
104- <td ><xsl : value-of select =" count(ports/port[state/@state='open' and @protocol='udp'])" /></td >
105- </tr >
104+ <xsl : if test =" ($hideofflinehosts!=1) or (status/@state='up')" >
105+ <tr >
106+ <td ><span class =" label label-danger" ><xsl : if test =" status/@state='up'" ><xsl : attribute name =" class" >label label-success</xsl : attribute ></xsl : if ><xsl : value-of select =" status/@state" /></span ></td >
107+ <td ><xsl : value-of select =" address/@addr" /></td >
108+ <td ><xsl : value-of select =" hostnames/hostname/@name" /></td >
109+ <td ><xsl : value-of select =" count(ports/port[state/@state='open' and @protocol='tcp'])" /></td >
110+ <td ><xsl : value-of select =" count(ports/port[state/@state='open' and @protocol='udp'])" /></td >
111+ </tr >
112+ </xsl : if >
106113 </xsl : for-each >
107114 </tbody >
108115 </table >
0 commit comments