Burp Suite User Forum

Create new post

Python interface text control

Gll | Last updated: Jun 24, 2015 01:04AM UTC

Hi guys, I am reading the API documentation and i have not clean the funtion that i need to use for my question. Easy question, what API funtion i have to use for control the text portion selected from any part of 'burp output' ( repeater, request, response , etc )... Similar to API used from "Send to Decoder", that u can select any text and send to decoder. I want select a text and work with this. Thanks community !.

PortSwigger Agent | Last updated: Jun 24, 2015 08:03AM UTC

You can do this via custom context menu items. If you register an IContextMenuFactory, your code will be called when the context menu is invoked, with details of the location, associated message, and selection bounds (if any). You can decide whether to show any menu items, and handle the resulting clicks based on the invocation details that were passed to your factory: http://portswigger.net/burp/extender/api/burp/IContextMenuFactory.html Using this API, you can easily create menu items that perform custom actions on selected text.

Burp User | Last updated: Jun 24, 2015 04:21PM UTC

Thanks, i have read about it, but i dont understand how get the selected code, Can you do it a little PoC of convert text selected to variable ? Very thanks support.

PortSwigger Agent | Last updated: Jun 25, 2015 08:01AM UTC

If you register an IContextMenuFactory, your code will be passed an IContextMenuInvocation object each time the user invokes the context menu. The IContextMenuInvocation object has methods to get the current message(s) and the selection bounds (where applicable). So you can hold on to the details of the selected message and bounds while your menu item is displayed in the context menu, and then perform appropriate actions if the menu item is clicked. See: http://portswigger.net/burp/extender/api/burp/IContextMenuFactory.html http://portswigger.net/burp/extender/api/burp/IContextMenuInvocation.html

Burp User | Last updated: Jun 25, 2015 02:29PM UTC

For community: To control geo location burp you have to use getSelectionBounds(). Thanks for all Dafydd Stuttard.

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