Burp Suite User Forum

Login to post

scan completion percentage shows 0 always and number of requests sent not increasing

Bhaskar | Last updated: Jul 20, 2021 06:09AM UTC

I have implemented a extender which takes host and token as an input. It will navigate through the sitemap, get the requests, build new request with the token provided and then send the new request built to an active scan. Later, I am checking the scan status. But the logs shows that the number of request sent are not increasing and scan completion percentage shows 0. even the burp is freezing immediately after trigging an active scan, so I am writing logs into a file instead of UI. code: [...] debug.println(newRequestHeaders); // body of the request int bodyOffSet = request.getBodyOffset(); String body = new String(requestResponse.getRequest()).substring(bodyOffSet); // creating new request byte[] newRequest = helpers.buildHttpMessage(newRequestHeaders, body.getBytes()); // sending new request IScanQueueItem item = callbacks.doActiveScan(requestResponse.getHost(), requestResponse.getPort(),requestResponse.getProtocol().equals("https"), newRequest); scanQueueItems.add(item); [....] while (!scanQueueItems.isEmpty()) { Iterator<IScanQueueItem> itr = scanQueueItems.iterator(); while (itr.hasNext()) { IScanQueueItem scan = itr.next(); debug.println(Instant.now()+" number of request sent => " + scan.getNumRequests()); debug.println(Instant.now()+" scan complete percentage => " + scan.getPercentageComplete()); if (scan.getPercentageComplete() == 100) { itr.remove(); } else { debug.println(Instant.now()+" scan status => " + scan.getStatus()); debug.println(Instant.now()+" number of items left in the queue => " + scanQueueItems.size()); try { Thread.sleep(60000); } catch (InterruptedException e) { e.printStackTrace(); } } } } [...] logs shows that the percentage of scan is zero and the number of request sent freeze at 92. the count is not increasing.

Uthman, PortSwigger Agent | Last updated: Jul 20, 2021 11:06AM UTC

Hi Bhaskar, Does the issue occur if you launch an active scan on the same request via the UI? When the number of requests stops increasing, is there a deadlock in the UI? Do you have any extensions enabled? Can you please share some further information and diagnostics (Help > Diagnostics) with support@portswigger.net?

Bhaskar | Last updated: Jul 21, 2021 03:08PM UTC

Hi Uthman, The issue does not occur if I launch an active scan via the UI. I observed that the burp is freezing because of the while loop written to check the scan queue items status. I want to get the notification once the scan completed. Is there any other way instead of looping using while loop and checking if the scanQueueItem() is empty? Thanks, Bhaskar.

Uthman, PortSwigger Agent | Last updated: Jul 21, 2021 04:58PM UTC

Hi Bhaskar, Have you tried retrieving the status of the scan queue items in a separate thread?

You need to Log in to post a reply. Or register here, for free.