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

Is it possible to get the request that originated a response from a MessageEditorTab?

pwntester | Last updated: May 07, 2015 11:19AM UTC

Hi, Is it possible to get the request that originated a response from a MessageEditorTab? Im only adding the tab for the responses, I want to search a log file based on a request header and paste the log entry in the response message editor tab. I can see you can access the response (content) from there but not the request, is anyway to do this? My current approach is to add the request header to the response using a Servlet filter so that I can get the header from the response (since I cant access the request) but I would like to avoid having to deploy this filter on every application under test Thanks

PortSwigger Agent | Last updated: May 07, 2015 03:10PM UTC

Yes, you can do this. When Burp adds your custom tab to an HTTP message editor, it will call into your IMessageEditorTabFactory to obtain a new instance of your IMessageEditorTab. At this point, it also passes to your code an IMessageEditorController object, which is tied to the instance of your tab that you create. Your tab can query the IMessageEditorController to determine the associated request when showing a response message, and vice versa. See: http://portswigger.net/burp/extender/api/burp/IMessageEditorTabFactory.html http://portswigger.net/burp/extender/api/burp/IMessageEditorController.html

Burp User | Last updated: May 07, 2015 03:46PM UTC

Cool, thanks! The only problem is that the request instance I get with IMessageEditorController.getRequest() is not the one that was actually sent since Im using IHttpListener.processHttpMessage() to add a couple of custom headers and I get the original request, not the modified one. I can create a map containing a hash or the original request and the new headers within processHttpMessage and then use it in the tab with the request returned by getRequest() but seems hacky to me. Is there a way to get the actual request that gets sent? Cheers, A

PortSwigger Agent | Last updated: May 11, 2015 10:30AM UTC