ProfessionalCommunity Edition

Configuring the Logger view filter with Bambdas

  • Last updated: February 13, 2025

  • Read time: 3 Minutes

You can apply Java-based Bambdas to create custom view filters for Logger. You can do this in two ways:

Related pages

Keyboard shortcuts

To speed up your workflow when creating or loading Bambdas, you can use the following keyboard shortcuts:

  • Save - Ctrl + S or Cmd + S

  • Save as - Ctrl + Shift + S or Cmd + Shift + S

  • Create new Bambda - Ctrl + N or Cmd + N

  • Load recent Bambda - Ctrl + O or Cmd + O

Loading Bambdas from your library

You can load and apply Bambdas that are stored in your library to filter the view in Logger.

To load a Bambda from your library:

  1. In the Logger tab, click the filter bar to open the Logger view filter window. The filter bar only appears when there are one or more items recorded in Logger.

  2. In the Logger view filter window, click Bambda mode.

  3. Click Load.

  4. Select a recent Bambda from the list.

  5. [Optional] If required, edit the Bambda:

    1. Make your changes.

    2. Click Apply to compile and test the Bambda. Fix any errors shown in the Compilation errors panel. For more information, see Troubleshooting Bambdas.

    3. Save your changes:

      • To overwrite the existing Bambda, click Save > Save.

      • To save a new version, click Save > Save as.

  6. Click Apply & close.

Burp compiles your Bambda and applies it to every item already captured in Logger, and to any future items captured in this project.

Creating custom Bambdas

You can write your own Bambdas directly in the Bambda mode tab.

Note

Before you begin writing, we recommend exploring our Bambdas GitHub repository. There may be an existing Bambda that meets your needs or provides inspiration for creating your own.

Converting filter settings to Bambdas

You can convert filter settings to a Bambda as a starting point for further customization:

  1. In the Logger tab, click the filter bar to open the Logger view filter window. The filter bar only appears when there are one or more items recorded in Logger.

  2. Make changes to the filter settings as necessary.

  3. At the bottom of the Logger view filter window, click Convert to Bambda.

Your filter is converted into a Bambda, enabling you to customize it further using Java.

Creating your Bambda

Two objects of the Montoya API are available to help you write your Bambda:

  • LoggerHttpRequestResponse

  • Utilities

To create a Bambda to filter the view in Logger:

  1. In the Logger tab, click the filter bar to open the Logger view filter window. The filter bar only appears when there are one or more items recorded in Logger.

  2. In the Logger view filter window, click Bambda mode.

  3. Write your Bambda using Java.

  4. Click Apply to compile and test the Bambda. Fix any errors shown in the Compilation errors panel. For more information, see Troubleshooting Bambdas.

  5. [Optional] Click Save > Save. The Bambda is saved to your Bambda library for future use across Burp.

  6. Click Apply & close.

Burp compiles your Bambda and applies it to every item already captured in Logger, and to any future items captured in this project.

Warning

Using slow running or resource-intensive Bambdas can slow down Burp. Write your Bambda carefully to minimize performance impact.

Example Bambda

In the example below, we'll create a Bambda that filters the Logger view to display only requests that meet the following criteria:

  • The request must have a response.
  • The time between Burp sending the request and the start of the response must be greater than 1000 ms.

In this example, our Bambda is:

if (!requestResponse.hasResponse()) { return false; } var timingData = requestResponse.timingData(); return timingData.timeBetweenRequestSentAndStartOfResponse().toMillis() > 1000;

Related pages

  • To get feedback, showcase your work, and connect with other Bambda developers, share your Bambda on our PortSwigger Discord #bambdas channel.
  • To share your Bambdas with the community, add them to our ever-growing Bambdas GitHub repository. For more information, see Submitting Bambdas to our GitHub repository.

Was this article helpful?