burp
Interface IContextMenuInvocation


public interface IContextMenuInvocation

This interface is used when Burp calls into an extension-provided IContextMenuFactory with details of a context menu invocation. The custom context menu factory can query this interface to obtain details of the invocation event, in order to determine what menu items should be displayed.


Field Summary
static byte CONTEXT_INTRUDER_ATTACK_RESULTS
          Used to indicate that the context menu is being invoked in an Intruder attack results.
static byte CONTEXT_INTRUDER_PAYLOAD_POSITIONS
          Used to indicate that the context menu is being invoked in the Intruder payload positions editor.
static byte CONTEXT_MESSAGE_EDITOR_REQUEST
          Used to indicate that the context menu is being invoked in a request editor.
static byte CONTEXT_MESSAGE_EDITOR_RESPONSE
          Used to indicate that the context menu is being invoked in a response editor.
static byte CONTEXT_MESSAGE_VIEWER_REQUEST
          Used to indicate that the context menu is being invoked in a non-editable request viewer.
static byte CONTEXT_MESSAGE_VIEWER_RESPONSE
          Used to indicate that the context menu is being invoked in a non-editable response viewer.
static byte CONTEXT_PROXY_HISTORY
          Used to indicate that the context menu is being invoked in the Proxy history.
static byte CONTEXT_SCANNER_RESULTS
          Used to indicate that the context menu is being invoked in the Scanner results.
static byte CONTEXT_SEARCH_RESULTS
          Used to indicate that the context menu is being invoked in a search results window.
static byte CONTEXT_TARGET_SITE_MAP_TABLE
          Used to indicate that the context menu is being invoked in the Target site map table.
static byte CONTEXT_TARGET_SITE_MAP_TREE
          Used to indicate that the context menu is being invoked in the Target site map tree.
 
Method Summary
 java.awt.event.InputEvent getInputEvent()
          This method can be used to retrieve the native Java input event that was the trigger for the context menu invocation.
 byte getInvocationContext()
          This method can be used to retrieve the context within which the menu was invoked.
 IScanIssue[] getSelectedIssues()
          This method can be used to retrieve details of the Scanner issues that were selected by the user when the context menu was invoked.
 IHttpRequestResponse[] getSelectedMessages()
          This method can be used to retrieve details of the HTTP requests / responses that were shown or selected by the user when the context menu was invoked.
 int[] getSelectionBounds()
          This method can be used to retrieve the bounds of the user's selection into the current message, if applicable.
 int getToolFlag()
          This method can be used to retrieve the Burp tool within which the context menu was invoked.
 

Field Detail

CONTEXT_MESSAGE_EDITOR_REQUEST

static final byte CONTEXT_MESSAGE_EDITOR_REQUEST
Used to indicate that the context menu is being invoked in a request editor.

See Also:
Constant Field Values

CONTEXT_MESSAGE_EDITOR_RESPONSE

static final byte CONTEXT_MESSAGE_EDITOR_RESPONSE
Used to indicate that the context menu is being invoked in a response editor.

See Also:
Constant Field Values

CONTEXT_MESSAGE_VIEWER_REQUEST

static final byte CONTEXT_MESSAGE_VIEWER_REQUEST
Used to indicate that the context menu is being invoked in a non-editable request viewer.

See Also:
Constant Field Values

CONTEXT_MESSAGE_VIEWER_RESPONSE

static final byte CONTEXT_MESSAGE_VIEWER_RESPONSE
Used to indicate that the context menu is being invoked in a non-editable response viewer.

See Also:
Constant Field Values

CONTEXT_TARGET_SITE_MAP_TREE

static final byte CONTEXT_TARGET_SITE_MAP_TREE
Used to indicate that the context menu is being invoked in the Target site map tree.

See Also:
Constant Field Values

CONTEXT_TARGET_SITE_MAP_TABLE

static final byte CONTEXT_TARGET_SITE_MAP_TABLE
Used to indicate that the context menu is being invoked in the Target site map table.

See Also:
Constant Field Values

CONTEXT_PROXY_HISTORY

static final byte CONTEXT_PROXY_HISTORY
Used to indicate that the context menu is being invoked in the Proxy history.

See Also:
Constant Field Values

CONTEXT_SCANNER_RESULTS

static final byte CONTEXT_SCANNER_RESULTS
Used to indicate that the context menu is being invoked in the Scanner results.

See Also:
Constant Field Values

CONTEXT_INTRUDER_PAYLOAD_POSITIONS

static final byte CONTEXT_INTRUDER_PAYLOAD_POSITIONS
Used to indicate that the context menu is being invoked in the Intruder payload positions editor.

See Also:
Constant Field Values

CONTEXT_INTRUDER_ATTACK_RESULTS

static final byte CONTEXT_INTRUDER_ATTACK_RESULTS
Used to indicate that the context menu is being invoked in an Intruder attack results.

See Also:
Constant Field Values

CONTEXT_SEARCH_RESULTS

static final byte CONTEXT_SEARCH_RESULTS
Used to indicate that the context menu is being invoked in a search results window.

See Also:
Constant Field Values
Method Detail

getInputEvent

java.awt.event.InputEvent getInputEvent()
This method can be used to retrieve the native Java input event that was the trigger for the context menu invocation.

Returns:
The InputEvent that was the trigger for the context menu invocation.

getToolFlag

int getToolFlag()
This method can be used to retrieve the Burp tool within which the context menu was invoked.

Returns:
A flag indicating the Burp tool within which the context menu was invoked. Burp tool flags are defined in the IBurpExtenderCallbacks interface.

getInvocationContext

byte getInvocationContext()
This method can be used to retrieve the context within which the menu was invoked.

Returns:
An index indicating the context within which the menu was invoked. The indices used are defined within this interface.

getSelectionBounds

int[] getSelectionBounds()
This method can be used to retrieve the bounds of the user's selection into the current message, if applicable.

Returns:
An int[2] array containing the start and end offsets of the user's selection in the current message. If the user has not made any selection in the current message, both offsets indicate the position of the caret within the editor. If the menu is not being invoked from a message editor, the method returns null.

getSelectedMessages

IHttpRequestResponse[] getSelectedMessages()
This method can be used to retrieve details of the HTTP requests / responses that were shown or selected by the user when the context menu was invoked. Note: For performance reasons, the objects returned from this method are tied to the originating context of the messages within the Burp UI. For example, if a context menu is invoked on the Proxy intercept panel, then the IHttpRequestResponse returned by this method will reflect the current contents of the interception panel, and this will change when the current message has been forwarded or dropped. If your extension needs to store details of the message for which the context menu has been invoked, then you should query those details from the IHttpRequestResponse at the time of invocation, or you should use IBurpExtenderCallbacks.saveBuffersToTempFiles() to create a persistent read-only copy of the IHttpRequestResponse.

Returns:
An array of IHttpRequestResponse objects representing the items that were shown or selected by the user when the context menu was invoked. This method returns null if no messages are applicable to the invocation.

getSelectedIssues

IScanIssue[] getSelectedIssues()
This method can be used to retrieve details of the Scanner issues that were selected by the user when the context menu was invoked.

Returns:
An array of IScanIssue objects representing the issues that were selected by the user when the context menu was invoked. This method returns null if no Scanner issues are applicable to the invocation.