The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

highlight many keyword in the response

luffy | Last updated: Feb 02, 2021 02:55AM UTC

I want to mark many keyword in the response, example code: // helper method to search a response for occurrences of a literal match string // and return a list of start/end offsets // https://github.com/PortSwigger/example-scanner-checks/blob/master/java/BurpExtender.java private List<int[]> getMatches(byte[] response, byte[] match) { List<int[]> matches = new ArrayList<>(); int start = 0; while (start < response.length) { start = _helpers.indexOf(response, match, true, start, response.length); if (start == -1) break; matches.add(new int[]{start, start + match.length}); start += match.length; } return matches; } CustomScanIssue issue = new CustomScanIssue(baseRequestResponse.getHttpService(), analyzedRequest.getUrl(), new IHttpRequestResponse[]{_callbacks.applyMarkers(baseRequestResponse, new ArrayList<>(), getMatches(response, "key".getBytes()))}, DETAIL, ISSUE_TYPE, ISSUE_NAME, SEVERITY, CONFIDENCE, "", "", ""); issues.add(issue); getMatches only support one keyword??

Uthman, PortSwigger Agent | Last updated: Feb 02, 2021 09:34AM UTC