Support Center

Burp Community

See what our users are saying about Burp Suite:

How do I?

New Post View All

Feature Requests

New Post View All

Burp Extensions

New Post View All

Bug Reports

New Post View All

Burp Suite Documentation

Take a look at our Documentation section for full details about every Burp Suite tool, function and configuration option.

Full Documentation Contents Burp Projects
Suite Functions Burp Tools
Options Using Burp Suite

Burp Extender

Burp Extender lets you extend the functionality of Burp Suite in numerous ways.

Extensions can be written in Java, Python or Ruby.

API documentation Writing your first Burp Suite extension
Sample extensions View community discussions about Extensibility
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

IBurpExtenderCallbacks.makeHttpRequest() throws RuntimeException

August Nov 08, 2017 12:02AM UTC

If the network connection fails, callbacks.makeHttpRequest throws a RuntimeException. Any way we could get that method to declare that it throws a proper subclass of (presumably) IOException so we could check for and handle it in code?

Paul Johnston Nov 08, 2017 10:55AM UTC Support Center agent

Hi August,

Thanks for your message. I agree, it would be better to throw some kind of IOException in this scenario.

I’ve created a story on our development backlog for this. I’m afraid this won’t get particularly high priority, and there are concerns about breaking compatibility. But we’ll get to it eventually.

Please let us know if you need any further assistance.

August Nov 08, 2017 10:05PM UTC
Seems like sometimes callbacks.makeHttpRequest() throws RuntimeException, other times IHttpRequestResponse.getResponse() just returns null. Here is the code:

URL url = new URL(requestUrl);
IHttpService service = new HttpService(url);
IHttpRequestResponse ihrr = callbacks.makeHttpRequest(service, requestBytes);
byte[] responseBytes = ihrr.getResponse();

I'd be interested to know which cases produce which results. In my testing I simulated a bad network connection by turning WiFi completely off. Is there a bug in the API?

Paul Johnston Nov 09, 2017 12:33PM UTC Support Center agent

Hi August,

I tried out some examples and it depends on the type of error. DNS failure produces an exception, while a closed port produces a null response.

While this isn’t an ideal interface, you should be able to use it fine if you check for both exceptions and null.

At some point we’ll be doing a refactor of the API and we’ll endeavor to make error handling clearer then.

Post Your public answer

Your name
Your email address