Sorry, list folks, my mail client dropped some carriage returns for some
reason.  Corrected:

#!/bin/bash

NBEFILE=$1

test -z "$1" && echo Please specify an input file && exit 1

RESULTDIR=/tmp/$$/nbe  ; mkdir -p $RESULTDIR
REPORTDIR=/tmp/$$/html ; mkdir -p $REPORTDIR

test -x /usr/local/bin/NessusClient &&
   NESSUSCLIENT=/usr/local/bin/NessusClient ||
   NESSUSCLIENT=/usr/local/bin/nessus

TARGETS=$(cut -d'|' -f3 ${NBEFILE} | sort -u)

for TARGET in $TARGETS ; do
   grep "|${TARGET}|" $NBEFILE > ${RESULTDIR}/${TARGET}.nbe
   $NESSUSCLIENT -i ${RESULTDIR}/${TARGET}.nbe -o
${REPORTDIR}/${TARGET}.html
done

rm -fr $RESULTDIR

echo Your individual HTML reports are in $REPORTDIR


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Scherff
Sent: Thursday, March 16, 2006 4:57 PM
To: Josh Zlatin-Amishav; Ron Backman
Cc: [email protected]
Subject: RE: Seperate .html reports

Here's a little more automation for you (bash or sh):

#!/bin/bash

NBEFILE=$1

test -z "$1" && echo Please specify an input file && exit 1

RESULTDIR=/tmp/$$/nbe  ; mkdir -p $RESULTDIR REPORTDIR=/tmp/$$/html ;
mkdir -p $REPORTDIR


test -x /usr/local/bin/NessusClient &&
   NESSUSCLIENT=/usr/local/bin/NessusClient ||
   NESSUSCLIENT=/usr/local/bin/nessus

TARGETS=$(cut -d'|' -f3 ${NBEFILE} | sort -u)

for TARGET in $TARGETS ; do
   grep "|${TARGET}|" $NBEFILE > ${RESULTDIR}/${TARGET}.nbe
   $NESSUSCLIENT -i ${RESULTDIR}/${TARGET}.nbe -o
${REPORTDIR}/${TARGET}.html done

rm -fr $RESULTDIR

echo Your individual HTML reports are in $REPORTDIR  


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Josh Zlatin-Amishav
Sent: Wednesday, March 15, 2006 7:49 AM
To: Ron Backman
Cc: [email protected]
Subject: Re: Seperate .html reports

On Wed, 15 Mar 2006, Ron Backman wrote:

> When scanning both Nessus 2.2.x and 3.0x with a Target host file of
> IP's, the Nessus client can export ONE .html doc.  That is great to
> get an overall view of host vulnerabilities.  But my network has about

> 500 hosts and I would like to export, as an option, these .html
> reports separately, namely one report per IP address.  The resultant
> .html report of 500 hosts is several mb's in size and I don't really
> want to e-mail it out to 50 or so sysadmins.  I would much rather send
out individual reports.  Any ideas?

Save the scan output to NBE format. Use your scripting language of
choice to create fifty or so reports based on IP. Here's how I would do
it in Bash (where 10.0.0.1 is an example of an IP I want a seperate
report for):

grep 10.0.0.1 YourOutputFile.nbe >> 10.0.0.1_Report.nbe nessus -i
10.0.0.1_Report.nbe -o 10.0.0.1_Report.html

--
  - Josh
_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus
_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus


_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus

Reply via email to