Event Listeners

In this lesson, we will learn how to register event listeners for various use cases.

This lesson is an extension of the principles we explored in the previous lesson. We will talk in detail about Event listeners and how they work in flow with Burp callbacks. This lesson will also demonstrate how different event listeners can be configured in a single BurpExtender class.

The code will register Event Handlers from theIHttpListener, IProxyListener, IScannerListener, and IExtensionStateListener interfaces. These interfaces must be implemented to register events.

IHttpListener

This listener will be notified of requests and responses made by any Burp tool. Extensions can perform custom analysis or modification of these messages by registering an HTTP listener.

IProxyListener

This listener will be notified of requests and responses being processed by the Proxy tool. Extensions can perform custom analysis or modification of these messages. They can also control in-UI message interception by registering a proxy listener.

IScannerListener

This listener will receive notifications of new issues that are reported by the Scanner tool. Extensions can perform custom analysis or logScanner issues by registering a Scanner listener.

IExtensionStateListener

This listener will be notified of changes to the extension’s state.

Note: Any extensions that start background threads or open system resources (such as files or database connections) should register a listener and terminate threads or close resources when the extension is unloaded.

Example Implementation

Get hands-on with 1200+ tech skills courses.