Skip to main content
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

  1. Open Netsparker GUI
  2. Configure scan settings (authentication, crawling, policies)
  3. Save as a named profile
  4. 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”:
  1. Open Netsparker GUI
  2. Check File > Manage Scanning Profiles
  3. Verify the profile name matches exactly (case-sensitive)
  4. Create the profile if it doesn’t exist

Scan Hangs Waiting for Slot

If the script waits indefinitely:
  1. Check Task Manager for orphaned Netsparker.exe processes
  2. Manually terminate stuck processes
  3. 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

Performance Tuning

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: