Burp Suite User Forum

Create new post

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

Never mind. I installed v2023.1.1 and my extension gets loaded successfully in that version.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.