Package burp
Interface IContextMenuInvocation
-
public interface IContextMenuInvocationThis interface is used when Burp calls into an extension-providedIContextMenuFactorywith 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
Fields Modifier and Type Field Description static byteCONTEXT_INTRUDER_ATTACK_RESULTSUsed to indicate that the context menu is being invoked in an Intruder attack results.static byteCONTEXT_INTRUDER_PAYLOAD_POSITIONSUsed to indicate that the context menu is being invoked in the Intruder payload positions editor.static byteCONTEXT_MESSAGE_EDITOR_REQUESTUsed to indicate that the context menu is being invoked in a request editor.static byteCONTEXT_MESSAGE_EDITOR_RESPONSEUsed to indicate that the context menu is being invoked in a response editor.static byteCONTEXT_MESSAGE_VIEWER_REQUESTUsed to indicate that the context menu is being invoked in a non-editable request viewer.static byteCONTEXT_MESSAGE_VIEWER_RESPONSEUsed to indicate that the context menu is being invoked in a non-editable response viewer.static byteCONTEXT_PROXY_HISTORYUsed to indicate that the context menu is being invoked in the Proxy history.static byteCONTEXT_SCANNER_RESULTSUsed to indicate that the context menu is being invoked in the Scanner results.static byteCONTEXT_SEARCH_RESULTSUsed to indicate that the context menu is being invoked in a search results window.static byteCONTEXT_TARGET_SITE_MAP_TABLEUsed to indicate that the context menu is being invoked in the Target site map table.static byteCONTEXT_TARGET_SITE_MAP_TREEUsed to indicate that the context menu is being invoked in the Target site map tree.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.event.InputEventgetInputEvent()This method can be used to retrieve the native Java input event that was the trigger for the context menu invocation.bytegetInvocationContext()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.intgetToolFlag()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
InputEventthat 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
IBurpExtenderCallbacksinterface.
-
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 theIHttpRequestResponsereturned 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 theIHttpRequestResponseat the time of invocation, or you should useIBurpExtenderCallbacks.saveBuffersToTempFiles()to create a persistent read-only copy of theIHttpRequestResponse.- Returns:
- An array of
IHttpRequestResponseobjects representing the items that were shown or selected by the user when the context menu was invoked. This method returnsnullif 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
IScanIssueobjects representing the issues that were selected by the user when the context menu was invoked. This method returnsnullif no Scanner issues are applicable to the invocation.
-
-