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

java.lang.Exception: Extension class is not a recognized type

Thomas | Last updated: Jan 27, 2023 10:21PM UTC

I'm trying to create a simple extension to intercept WebSocket messages. Here is my extension code: ==================================================== package org.example; import burp.api.montoya.BurpExtension; import burp.api.montoya.MontoyaApi; import burp.api.montoya.logging.Logging; public class BurpExtender implements BurpExtension { @Override public void initialize(MontoyaApi montoyaApi) { montoyaApi.extension().setName("Hello World"); final Logging logging = montoyaApi.logging(); montoyaApi.websockets().registerWebSocketCreatedHandler(new ExtensionWebSockerCreatedHandler()); } } ==================================================== The class ExtensionWebSockerCreatedHandler is a custom class that implements WebSocketCreatedHandler. When I build and try to install this extension, I get the error "java.lang.Exception: Extension class is not a recognized type" and the extension is not loaded by Burp. If I remove the line 'montoyaApi.websockets().registerWebSocketCreatedHandler(new ExtensionWebSockerCreatedHandler());' from the extension, the extension is loaded successfully by Burp. I would appreciate it if someone can tell me why my extension fails to load when I register a WebSocketCreatedHandler. Is this not supported? I'm using Burp Community 2022.12.7. Thanks.

Thomas | Last updated: Jan 28, 2023 12:14PM UTC