Burp Suite User Forum

Login to post

Fetch selected HTTP request/response without ContextMenu

skb | Last updated: Sep 20, 2023 03:12AM UTC

Hello, thank you for your efforts on Burp's cool MontoyaAPI. I am currently developing an extension, and I would like to retrieve selected HTTP requests or responses from the Proxy History table or any other HttpRequestResponseEditor. I am aware that we can pass the selected messages to the callback of the ContextMenu, but I would like to fetch them without using the ContextMenu. This functionality is similar to the "Send to Repeater" hotkey feature in Burp's default, which can retrieve and send the last selected requests in any editor or the HTTP Proxy table. For your information, I would like to implement these hotkey features in my extension, which is why I need the fetch feature. Thank you in advance for your assistance. :)

Michelle, PortSwigger Agent | Last updated: Sep 20, 2023 11:01AM UTC

Hi Can you tell us more about your extension and the functionality you are trying to create? What would the workflow look like? For example: Do you want to send a request from one of the default Burp tabs to your extension using a hotkey? Or do you want to send a request from your extension to one of the Burp tools? Are you using a custom message editor in your extension? If you can provide some more background on the extension you're trying to create, this will help us picture things better.

skb | Last updated: Oct 03, 2023 02:57AM UTC

Thanks for your reply. I want to send requests from Burp tools to my extension. For instance, I'm interested in retrieving the last selected message editor in ProxyHistory or the most recently selected messages in a ProxyHistory table. I'm aware that we can accomplish this by right-clicking to open the context menu. However, my goal is to obtain the last selected message(s) without having to open the context menu, similar to how Burp's default hotkey "Send to Repeater" operates. So, what I'm looking for is an API function like api.userInterface().getLastSelectedMessages(), which would require a tool scope parameter to specify where the messages originate from. It's worth noting that the specific functionality of my extension is not the primary concern here. It may use the message for analysis and data feeding or for message modification before sending it to Burp tools. Regardless of the extension's functionality, what I'm seeking is a general interface to retrieve the last selected messages within Burp tools. Please feel free to request any additional information you may need. Thank you in advance.

Michelle, PortSwigger Agent | Last updated: Oct 03, 2023 09:28AM UTC

I've been having a chat with the team about this. We do have a feature request in our system to add functionality for hotkeys to be assigned to extensions. Based on what you have described so far, I've added your interest in this feature. Would this give you enough of the functionality you are picturing? If you'd like to see more functionality, can you describe more details about the intentions behind what you want to create? Would you intend to work with single messages or also multiple messages that had been selected using shift+click? If we can understand more about the background and intentions for the idea of a function like api.userInterface().getLastSelectedMessages(), we can then review it in a wider context to determine all the options that could be used to achieve the aim.

You need to Log in to post a reply. Or register here, for free.