Class: Buby::MessageEditorTab Abstract
- Includes:
- Java::Burp::IMessageEditorTab, Java::Burp::IMessageEditorTabFactory
- Defined in:
- lib/buby/message_editor_tab.rb
Overview
voodoo method wrapping
Extensions that register an IMessageEditorTabFactory
must return instances of this interface, which Burp will use to create custom tabs within its HTTP message editors.
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#editable ⇒ Object
Returns the value of attribute editable.
Class Method Summary collapse
-
.createNewInstance(controller, editable) ⇒ IMessageEditorTab
abstract
Burp will call this method once for each HTTP message editor, and the factory should provide a new instance of an
IMessageEditorTab
object.
Instance Method Summary collapse
-
#getMessage ⇒ Array<byte>
This method returns the currently displayed message.
-
#getSelectedData ⇒ Array<byte>
This method is used to retrieve the data that is currently selected by the user.
-
#getTabCaption ⇒ String
This method returns the caption that should appear on the custom tab when it is displayed.
-
#getUiComponent ⇒ Object
This method returns the component that should be used as the contents of the custom tab when it is displayed.
-
#initialize(controller, editable) ⇒ IMessageEditorTab
constructor
abstract
Burp will call this method once for each HTTP message editor, and the factory should provide a new instance of an
IMessageEditorTab
object. -
#isEnabled(content, isRequest) ⇒ Boolean
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.
-
#isModified ⇒ Boolean
This method is used to determine whether the currently displayed message has been modified by the user.
-
#setMessage(content, isRequest) ⇒ Object
The hosting editor will invoke this method to display a new message or to clear the existing message.
Constructor Details
#initialize(controller, editable) ⇒ IMessageEditorTab
subclass and call super
Burp will call this method once for each HTTP message editor, and the factory should provide a new instance of an IMessageEditorTab
object.
14 15 16 17 |
# File 'lib/buby/message_editor_tab.rb', line 14 def initialize controller, editable @controller = controller @editable = editable end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
12 13 14 |
# File 'lib/buby/message_editor_tab.rb', line 12 def controller @controller end |
#editable ⇒ Object
Returns the value of attribute editable.
12 13 14 |
# File 'lib/buby/message_editor_tab.rb', line 12 def editable @editable end |
Class Method Details
.createNewInstance(controller, editable) ⇒ IMessageEditorTab
subclass and call super
Burp will call this method once for each HTTP message editor, and the factory should provide a new instance of an IMessageEditorTab
object.
20 21 22 |
# File 'lib/buby/message_editor_tab.rb', line 20 def self.createNewInstance controller, editable self.new controller, editable end |
Instance Method Details
#getMessage ⇒ Array<byte>
This method returns the currently displayed message.
78 |
# File 'lib/buby/message_editor_tab.rb', line 78 def getMessage; raise NotImplementedError; end |
#getSelectedData ⇒ Array<byte>
This method is used to retrieve the data that is currently selected by the user.
96 |
# File 'lib/buby/message_editor_tab.rb', line 96 def getSelectedData; raise NotImplementedError; end |
#getTabCaption ⇒ String
Burp invokes this method once when the tab is first generated, and the same caption will be used every time the tab is displayed.
This method returns the caption that should appear on the custom tab when it is displayed.
32 |
# File 'lib/buby/message_editor_tab.rb', line 32 def getTabCaption; self.class.name; end |
#getUiComponent ⇒ Object
Burp invokes this method once when the tab is first generated, and the same component will be used every time the tab is displayed.
This method returns the component that should be used as the contents of the custom tab when it is displayed.
42 |
# File 'lib/buby/message_editor_tab.rb', line 42 def getUiComponent; raise NotImplementedError; end |
#isEnabled(content, isRequest) ⇒ Boolean
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.
56 57 58 59 |
# File 'lib/buby/message_editor_tab.rb', line 56 def isEnabled(content, isRequest) content = String.from_java_bytes content raise NotImplementedError end |
#isModified ⇒ Boolean
This method is used to determine whether the currently displayed message has been modified by the user. The hosting editor will always call #getMessage before calling this method, so any pending edits should be completed within #getMessage.
88 |
# File 'lib/buby/message_editor_tab.rb', line 88 def isModified; raise NotImplementedError; end |
#setMessage(content, isRequest) ⇒ Object
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 returned true
to a call to #isEnabled with the same message details.
72 |
# File 'lib/buby/message_editor_tab.rb', line 72 def setMessage(content, isRequest); raise NotImplementedError; end |