From 5a3858734149c8c4d5a01649a7b8e9aeeb7a7c39 Mon Sep 17 00:00:00 2001 From: Andreas Hontzia Date: Tue, 4 Sep 2018 10:30:30 +0200 Subject: [PATCH 1/3] Introduction of "hideofflinehosts" parameter You can hide offline hosts from the "Scanned Hosts" section by defining hideofflinehosts as 1 via your XSLT processor. Example: `xsltproc --param hideofflinehosts 1 -o output.html nmap-bootstrap.xsl input.xml` --- nmap-bootstrap.xsl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/nmap-bootstrap.xsl b/nmap-bootstrap.xsl index 37b8009..f63322b 100644 --- a/nmap-bootstrap.xsl +++ b/nmap-bootstrap.xsl @@ -6,6 +6,10 @@ Andreas Hontzia (@honze_net) --> + + + + @@ -82,7 +86,8 @@ Andreas Hontzia (@honze_net) -

Scanned Hosts

+

Scanned Hosts (offline hosts are hidden) +

@@ -96,13 +101,15 @@ Andreas Hontzia (@honze_net) - - - - - - - + + + + + + + + +
label label-success
label label-success
From 48c954ad9191c17096a24b9751d4e025dc2b5cfb Mon Sep 17 00:00:00 2001 From: Andreas Hontzia Date: Tue, 4 Sep 2018 10:43:37 +0200 Subject: [PATCH 2/3] Reverting change. Fix works with xsltproc, but not with Firefox. --- nmap-bootstrap.xsl | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/nmap-bootstrap.xsl b/nmap-bootstrap.xsl index f63322b..37b8009 100644 --- a/nmap-bootstrap.xsl +++ b/nmap-bootstrap.xsl @@ -6,10 +6,6 @@ Andreas Hontzia (@honze_net) --> - - - - @@ -86,8 +82,7 @@ Andreas Hontzia (@honze_net)
-

Scanned Hosts (offline hosts are hidden) -

+

Scanned Hosts

@@ -101,15 +96,13 @@ Andreas Hontzia (@honze_net) - - - - - - - - - + + + + + + +
label label-success
label label-success
From 818ca7fd115f3f3e6a32519887b79168d272b865 Mon Sep 17 00:00:00 2001 From: Andreas Hontzia Date: Tue, 4 Sep 2018 11:17:21 +0200 Subject: [PATCH 3/3] Hide offline hosts, if too many If there are too many hosts in a scan, the site can be slowed down. So offline hosts are omitted from the "Scanned Hosts" section, if their amount exceeds 1024. --- nmap-bootstrap.xsl | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/nmap-bootstrap.xsl b/nmap-bootstrap.xsl index 37b8009..cd84b83 100644 --- a/nmap-bootstrap.xsl +++ b/nmap-bootstrap.xsl @@ -82,7 +82,7 @@ Andreas Hontzia (@honze_net)
-

Scanned Hosts

+

Scanned Hosts (offline hosts are hidden)

@@ -95,15 +95,30 @@ Andreas Hontzia (@honze_net) - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
label label-success
label label-success
label label-success