Automated Netsparker scanning script with concurrent scan management and profile-based configuration.
Overview
The netsparker_scan.bat script launches Netsparker in automated mode using pre-configured scanning profiles. It manages concurrent scans to prevent resource exhaustion.
Parameters
Usage
Script Behavior
Staggered Start
The script delays execution based on the NRO parameter:
Examples:
- NRO=1 → 20 second delay
- NRO=2 → 40 second delay
- NRO=5 → 100 second delay
This prevents multiple scans from starting simultaneously.
Concurrent Scan Limiting
The script limits concurrent Netsparker instances to maximum 2:
If 2 or more instances are running:
- Script waits 60 seconds
- Rechecks process count
- Repeats until a slot is available
Netsparker Command
Once a slot is available, the script launches:
Parameters:
/auto - Automated scan mode (no GUI interaction)
/profile "PROJECT_NAME" - Use the specified scanning profile
/url URL - Target URL to scan
/report "PATH.html" - Output HTML report location
Scanning Profiles
Profile Requirement
The Proyecto parameter must match an existing Netsparker scanning profile name exactly. If the profile does not exist, the scan will fail.
Creating Profiles in Netsparker
- Open Netsparker GUI
- Configure scan settings (authentication, crawling, policies)
- Save as a named profile
- Use that exact name as the
Proyecto parameter
Profile Components
Profiles can include:
- Authentication credentials
- Crawling scope and depth
- Scan policies and checks
- Form filling rules
- Custom headers and cookies
- Performance settings
Output Files
Generated report format:
Example:
Example Usage Scenarios
Single Scan
Multiple URLs with Staggered Start
Scan 3 URLs with 20-second intervals:
Different Profiles for Different Apps
Prerequisites
- Netsparker Standard or Enterprise with valid license
- Scanning profile must be pre-configured with the exact name used in
Proyecto
- Sufficient disk space in
Documentacion directory for HTML reports
- Windows system with administrative privileges (for process listing)
Temporary Files
The script creates a temporary file to track scan counts:
This file is automatically deleted upon completion.
Limitations
- Maximum 2 concurrent scans (hardcoded limit)
- Only HTML report format is generated
- Profile must exist before running the script
- No error handling for missing profiles
Troubleshooting
Profile Not Found Error
If Netsparker reports “Profile not found”:
- Open Netsparker GUI
- Check File > Manage Scanning Profiles
- Verify the profile name matches exactly (case-sensitive)
- Create the profile if it doesn’t exist
Scan Hangs Waiting for Slot
If the script waits indefinitely:
- Check Task Manager for orphaned Netsparker.exe processes
- Manually terminate stuck processes
- Script will automatically proceed
Missing Reports
If reports are not generated:
- Verify
Documentacion path exists and is writable
- Check Netsparker scan completed successfully
- Review Netsparker logs for errors
Adjusting Concurrent Limit
To allow more concurrent scans, modify the limit at netsparker_scan.bat:28:
Adjusting Stagger Delay
To change the delay multiplier, modify netsparker_scan.bat:17: