Pause scanner from extension
Is there any API to pause the scanner from an extension? For example, let's say you are scanning an API with a rate limiter, and your extension can detect that you are getting close to the limit, can it pause the scanner to avoid being blocked?
Sorry, there is still no way to pause the scanner from an extension.
As noted in https://support.portswigger.net/customer/portal/questions/17061862-method-to-pause-unpause-scanner it may be possible for you to work around this using thread locking.
On a global scale, you can also set your Resource Pool configuration to add delays between requests or set the maximum concurrent requests for a new scan.
Can that be done programmatically? I could set the delay between requests to 10 years and that would be functionally the same as pausing the scanner...
I don’t believe it can. It’s normally set when you start a new scan (Dashboard > New scan > Resource pool > Delay between requests).
You could use IBurpextenderCallbacks.exitSuite() to close down Burp Suite, which would definitely stop the scanner.
You can see our full API documentation at https://portswigger.net/burp/extender/api/index.html