This handy little script will run a nessus scan against a IP range. I use this in a crontab to run automated scans and dump the results into a directory with a file name that has a time stamp in it.
Make sure that you have a config for your scan already done (this is used for the Nessus_scan_config below). Put your ranges for IP's in the text_file_of_scan_ranges.txt (ie 192.168.1.1-192.168.1.254).
#!/bin/sh
today=$(date +%Y%m%d)
/opt/nessus/bin/nessus -c /opt/nscans/configs/Nessus_scan_config -xq nessus.server 1241 username password /opt/nscans/targets/text_file_of_scan_ranges.txt /opt/nscans/reports/IP_range-$today.html
mkdir /directory_you_want_scans_in/$today
mv /opt/nscans/reports/IP_range-$today.html /directory_you_want_scans_in/$today
No comments:
Post a Comment