ProfessionalCommunity Edition
Filtering the site map with Bambdas
-
Last updated: December 3, 2024
-
Read time: 2 Minutes
You can write Java-based Bambdas to create custom filters for your site map.
Two objects of the Montoya API are available to help you write your Bambdas:
-
SiteMapNode
-
Utilities
To create a Bambda to filter your site map:
-
In the Target > Site map tab, click the filter bar to open the Site map filter window.
The filter bar only appears when there is one or more items in your site map.
-
Click the Bambda mode tab.
-
Write your Bambda using Java.
-
Click Apply.
Burp compiles your Bambda and applies it to every item already logged in your site map, and to any future site map items generated in this project.
Warning
Using slow running or resource-intensive Bambdas can slow down Burp. Write your Bambda carefully to minimize performance implications.
Example Bambda
In the example below, we'll create a Bambda that filters the site map to show only items that meet the following criteria:
-
The item must have a
POST
method. -
The item must have an issue reported against it.
In this example, our Bambda is:
return node.requestResponse().request().method().equals("POST") && !node.issues().isEmpty();
Converting site map filter settings to Bambdas
If you have already used Settings mode to configure a site map filter, you can convert these settings to a Bambda.
Note
Converting your filter settings overwrites any existing Bambda in your site map.
To convert your filter settings to a Bambda:
-
In the Target > Site map tab, click the filter bar to open the Site map filter window.
-
Make changes to the filter settings (if necessary).
-
At the bottom of the Site map filter window, click Convert to Bambda.
Your filter is now converted into a Bambda, enabling you to customize it further using Java.
Note
Some filter settings can't be converted to Bambdas as they aren't currently supported. For example, these site map filter settings don't convert to Bambda mode:
-
Show only requested items
-
Hide not-found items
Related pages
For more information on how to load, save, or troubleshoot Bambdas, see our Bambdas documentation.