I'll bite.
Your requirements were a little vague, but this should work fine. Note
that the target IPs you want to scan should go in /tmp/targets (assuming
you aren't purging stale /tmp files regularly -- in that case, put it
somewhere else and fix the TARGETS variable). Obviously you'll also need
to set all these variables accordingly.
All - if I'm doing something incorrectly please don't hesitate to point
it out.
-rw
--snip--
#!/bin/bash
PATH=/bin:/usr/bin:/opt/nessus/bin/nessus
LD_LIBRARY_PATH=/opt/nessus/lib:${LD_LIBRARY_PATH}
# configure as needed
RECIPIENTS="[EMAIL PROTECTED],[EMAIL PROTECTED]"
SERVER=localhost
PORT=1241
USERNAME=nessus
PASSWORD=nessus
TARGETS=/tmp/targets
REPORT=/tmp/nessus.html.$$
# run the scan - reading targets from $TARGETS and outputting to $REPORT
nessus -q $SERVER $PORT $USERNAME $PASSWORD $TARGETS $REPORT -T html
# punt off the report to recipients
mail -s 'Nessus scan results' $RECIPIENTS < $REPORT
# clean up
rm -f $REPORT
John J. Culkin wrote:
Hello
Can anyone help me create a script which does a Nessus Scan and then
emails the results.
I am hoping to run this script via cron on RHEL 4 and/or RHEL 5
-- John C.
_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus