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

Writing Bambda Help

Shay | Last updated: May 05, 2024 12:49PM UTC

Hello, I'm attempting to write a bambda. The filter will search for requests that are to /intern/api and then if the headername contains x-name add a note + highlight the request. The issue im facing is that the filter works fine on all requests that have been performed prior to enabling the filter but no new requests get added to the history tab once the filter is in place: Set < String > ignoredQueries = Set.of("useQuery", "InternQuery", "useRefetchInternQuery", "refetchInternQuery"); if (!requestResponse.hasResponse()) { return false; } //filter only intern api if (!requestResponse.request().url().contains("/intern/api/")) { return false; } // remove uninteresting queries if (requestResponse.request().hasHeader("X-Name")) { String headerValue = requestResponse.request().headerValue("X-Name"); for (String qry: ignoredQueries) { // Check if the header value exactly matches any of the ignored queries if (headerValue.equals(qry)) { return false; } } //Highlight Mutations Yellow if (headerValue.contains("Mutation")) { requestResponse.annotations().setHighlightColor(HighlightColor.YELLOW); } // If you would like to highlight a query based on another key word uncomment and set key word and colour else if (headerValue.contains("Case")) { requestResponse.annotations().setHighlightColor(HighlightColor.PINK); } // Highlight everything else NONE else if (headerValue.contains("Query")) { requestResponse.annotations().setHighlightColor(HighlightColor.NONE); } // add GraqhQL Friendly Name to Note Column requestResponse.annotations().setNotes( "GraphQL Name: " + headerValue ); } return true; Any help would be appreciated ????

Michelle, PortSwigger Agent | Last updated: May 07, 2024 01:45PM UTC