Class: Buby::MessageEditorTab Abstract
- Extended by:
- Java::Burp::IMessageEditorTabFactory
- Includes:
- Java::Burp::IMessageEditorTab
- 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.
-
#message ⇒ Object
Returns the value of attribute message.
-
#ui_component ⇒ Object
Returns the value of attribute ui_component.
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
-
#enabled?(content, is_request = true) ⇒ Boolean
deprecated
Deprecated.
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
-
#getMessage ⇒ Array<byte>
deprecated
Deprecated.
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
-
#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 = true) ⇒ Boolean
deprecated
Deprecated.
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
-
#isModified ⇒ Boolean
This method is used to determine whether the currently displayed message has been modified by the user.
-
#setMessage(content, isRequest) ⇒ Object
deprecated
Deprecated.
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
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.
15 16 17 18 |
# File 'lib/buby/message_editor_tab.rb', line 15 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 |
#message ⇒ Object
Returns the value of attribute message.
12 13 14 |
# File 'lib/buby/message_editor_tab.rb', line 12 def @message end |
#ui_component ⇒ Object
Returns the value of attribute ui_component.
12 13 14 |
# File 'lib/buby/message_editor_tab.rb', line 12 def ui_component @ui_component 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.
21 22 23 |
# File 'lib/buby/message_editor_tab.rb', line 21 def self.createNewInstance controller, editable self.new controller, editable end |
Instance Method Details
#enabled?(content, is_request = true) ⇒ Boolean
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
64 65 66 |
# File 'lib/buby/message_editor_tab.rb', line 64 def enabled?(content, is_request = true) isEnabled(content, is_request) end |
#getMessage ⇒ Array<byte>
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
This method returns the currently displayed message.
87 |
# File 'lib/buby/message_editor_tab.rb', line 87 def getMessage; @message.to_java_bytes end |
#getSelectedData ⇒ Array<byte>
This method is used to retrieve the data that is currently selected by the user.
105 |
# File 'lib/buby/message_editor_tab.rb', line 105 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.
33 |
# File 'lib/buby/message_editor_tab.rb', line 33 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.
43 |
# File 'lib/buby/message_editor_tab.rb', line 43 def getUiComponent; @ui_component end |
#isEnabled(content, isRequest = true) ⇒ Boolean
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
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.
58 59 60 61 |
# File 'lib/buby/message_editor_tab.rb', line 58 def isEnabled(content, isRequest = true) 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.
97 |
# File 'lib/buby/message_editor_tab.rb', line 97 def isModified; false end |
#setMessage(content, isRequest) ⇒ Object
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
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.
80 |
# File 'lib/buby/message_editor_tab.rb', line 80 def setMessage(content, isRequest); raise NotImplementedError; end |