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

Importing and Using Arbitrary Java Classes

Richard | Last updated: Jun 03, 2024 07:42PM UTC

Is it possible to make use of arbitrary classes imported from external modules in Java, e.g. the UriBuilder class? My extension makes use a class in the same project folder that implements logic to generate a token that I want to add to every request, but unfortunately BurpSuite says cannot find class UriBuilder...

Hannah, PortSwigger Agent | Last updated: Jun 04, 2024 09:18AM UTC

Hi How are you building your extension? If you're using a build manager like gradle, you can include the library as part of your JAR file. You can find an example of an extension that uses this with gradle here: https://github.com/Hannah-PortSwigger/WebSocketTurboIntruder/blob/main/build.gradle

Richard | Last updated: Jun 05, 2024 08:46AM UTC

Hi Hannah, I'm using Maven at the moment, when I build the project in IntelliJ theres no import errors but when reloading the extension is Burp I'm getting a "Missing Class, URI Builder" error. I checked my pom.xml file and the dependency is registered in there.

Hannah, PortSwigger Agent | Last updated: Jun 05, 2024 09:50AM UTC