Package burp

Interface IMessageEditor


  • public interface IMessageEditor
    This interface is used to provide extensions with an instance of Burp's HTTP message editor, for the extension to use in its own UI. Extensions should call IBurpExtenderCallbacks.createMessageEditor() to obtain an instance of this interface.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.awt.Component getComponent()
      This method returns the UI component of the editor, for extensions to add to their own UI.
      byte[] getMessage()
      This method is used to retrieve the currently displayed message, which may have been modified by the user.
      byte[] getSelectedData()
      This method returns the data that is currently selected by the user.
      int[] getSelectionBounds()
      This method can be used to retrieve the bounds of the user's selection into the displayed message, if applicable.
      boolean isMessageModified()
      This method is used to determine whether the current message has been modified by the user.
      void setMessage​(byte[] message, boolean isRequest)
      This method is used to display an HTTP message in the editor.
    • Method Detail

      • getComponent

        java.awt.Component getComponent()
        This method returns the UI component of the editor, for extensions to add to their own UI.
        Returns:
        The UI component of the editor.
      • setMessage

        void setMessage​(byte[] message,
                        boolean isRequest)
        This method is used to display an HTTP message in the editor.
        Parameters:
        message - The HTTP message to be displayed.
        isRequest - Flags whether the message is an HTTP request or response.
      • getMessage

        byte[] getMessage()
        This method is used to retrieve the currently displayed message, which may have been modified by the user.
        Returns:
        The currently displayed HTTP message.
      • isMessageModified

        boolean isMessageModified()
        This method is used to determine whether the current message has been modified by the user.
        Returns:
        An indication of whether the current message has been modified by the user since it was first displayed.
      • getSelectedData

        byte[] getSelectedData()
        This method returns the data that is currently selected by the user.
        Returns:
        The data that is currently selected by the user, or null if no selection is made.
      • getSelectionBounds

        int[] getSelectionBounds()
        This method can be used to retrieve the bounds of the user's selection into the displayed message, if applicable.
        Returns:
        An int[2] array containing the start and end offsets of the user's selection within the displayed message. If the user has not made any selection in the current message, both offsets indicate the position of the caret within the editor. For some editor views, the concept of selection within the message does not apply, in which case this method returns null.