Package burp
Interface IMessageEditorTab
-
public interface IMessageEditorTabExtensions that register anIMessageEditorTabFactorymust return instances of this interface, which Burp will use to create custom tabs within its HTTP message editors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getMessage()This method returns the currently displayed message.byte[]getSelectedData()This method is used to retrieve the data that is currently selected by the user.java.lang.StringgetTabCaption()This method returns the caption that should appear on the custom tab when it is displayed.java.awt.ComponentgetUiComponent()This method returns the component that should be used as the contents of the custom tab when it is displayed.booleanisEnabled(byte[] content, boolean isRequest)The hosting editor will invoke this method before it displays a new HTTP message, so that the custom tab can indicate whether it should be enabled for that message.booleanisModified()This method is used to determine whether the currently displayed message has been modified by the user.voidsetMessage(byte[] content, boolean isRequest)The hosting editor will invoke this method to display a new message or to clear the existing message.
-
-
-
Method Detail
-
getTabCaption
java.lang.String getTabCaption()
This method returns the caption that should appear on the custom tab when it is displayed. Note: Burp invokes this method once when the tab is first generated, and the same caption will be used every time the tab is displayed.- Returns:
- The caption that should appear on the custom tab when it is displayed.
-
getUiComponent
java.awt.Component getUiComponent()
This method returns the component that should be used as the contents of the custom tab when it is displayed. Note: Burp invokes this method once when the tab is first generated, and the same component will be used every time the tab is displayed.- Returns:
- The component that should be used as the contents of the custom tab when it is displayed.
-
isEnabled
boolean isEnabled(byte[] content, boolean isRequest)The hosting editor will invoke this method before it displays a new HTTP message, so that the custom tab can indicate whether it should be enabled for that message.- Parameters:
content- The message that is about to be displayed, or a zero-length array if the existing message is to be cleared.isRequest- Indicates whether the message is a request or a response.- Returns:
- The method should return
trueif the custom tab is able to handle the specified message, and so will be displayed within the editor. Otherwise, the tab will be hidden while this message is displayed.
-
setMessage
void setMessage(byte[] content, boolean isRequest)The hosting editor will invoke this method to display a new message or to clear the existing message. This method will only be called with a new message if the tab has already returnedtrueto a call toisEnabled()with the same message details.- Parameters:
content- The message that is to be displayed, ornullif the tab should clear its contents and disable any editable controls.isRequest- Indicates whether the message is a request or a response.
-
getMessage
byte[] getMessage()
This method returns the currently displayed message.- Returns:
- The currently displayed message.
-
isModified
boolean isModified()
This method is used to determine whether the currently displayed message has been modified by the user. The hosting editor will always callgetMessage()before calling this method, so any pending edits should be completed withingetMessage().- Returns:
- The method should return
trueif the user has modified the current message since it was first displayed.
-
getSelectedData
byte[] getSelectedData()
This method is used to retrieve the data that is currently selected by the user.- Returns:
- The data that is currently selected by the user. This may be
nullif no selection is currently made.
-
-