Posted on Friday, 23rd September 2011 by Michael

Simple powershell script to automate Acuentix command line scans:

Requirements:
1. Windows vista or higher (preferably 7)
2. Powershell 2,0
3. user access control disabled
4. Acuentix installed (v7 or higher)
5. List of sites to scan

Adding functionality:

To add functions to the wvs_console call edit the variable $scan

Code:

################################################
## Automate Acunetix Console Scans
## Edit $scan to add more function (profile, report type, etc)
## Created by Michael LaSalvia
## http://www.digitaloffensive.com for http://SecurityonLocation.com
###############################################

Set-Location "C:\Program Files (x86)\Acunetix\Web Vulnerability Scanner 7"
# Add my directory to the current PATH
$x = (Get-Location).ProviderPath
$env:path = "$env:path;$x"
write-host "Current directory added to ENV:PATH"
##################################################
##Edit below but be careful
##################################################

$sites= Get-Content c:\mytest\sites.txt
foreach ($i in $sites) {
$scan = "/scan $i /generatereport"
Start-Process 'wvs_console.exe' -WindowStyle hidden -Wait -ArgumentList $scan -PassThru

}
exit

How to run:

Place code in a file called whatever you want .ps1 and make sure to sign so you can execute it with powershell. Also make sure to edit the variable sites and variable scan to meet your requirements.

Any questions or concerns feel free to contact me.

Posted in Code | Comments (0)

Leave a Reply

*