Class: Buby::ContextMenuFactory

Inherits:
Object
  • Object
show all
Includes:
Java::Burp::IContextMenuFactory
Defined in:
lib/buby/context_menu_factory.rb

Overview

Extensions can implement this interface and then call IBurpExtenderCallbacks.registerContextMenuFactory() to register a factory for custom context menu items.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createMenuItems(invocation) ⇒ Array<JMenuItem>

This method will be called by Burp when the user invokes a context menu anywhere within Burp. The factory can then provide any custom context menu items that should be displayed in the context menu, based on the details of the menu invocation. Implementations should call super

Parameters:

  • invocation (IContextMenuInvocation)

    An object the extension can query to obtain details of the context menu invocation.

Returns:

  • (Array<JMenuItem>)

    A list of custom menu items (which may include sub-menus, checkbox menu items, etc.) that should be displayed. Extensions may return nil from this method, to indicate that no menu items are required.



22
23
24
25
26
# File 'lib/buby/context_menu_factory.rb', line 22

def self.createMenuItems invocation
  pp [:got_create_menu_items, invocation] if $DEBUG
  Buby::Implants::ContextMenuInvocation.implant invocation
  nil
end

Instance Method Details

#createMenuItems(invocation) ⇒ Array<JMenuItem>

This method will be called by Burp when the user invokes a context menu anywhere within Burp. The factory can then provide any custom context menu items that should be displayed in the context menu, based on the details of the menu invocation. Implementations should call super

Parameters:

  • invocation (IContextMenuInvocation)

    An object the extension can query to obtain details of the context menu invocation.

Returns:

  • (Array<JMenuItem>)

    A list of custom menu items (which may include sub-menus, checkbox menu items, etc.) that should be displayed. Extensions may return nil from this method, to indicate that no menu items are required.



29
30
31
32
33
# File 'lib/buby/context_menu_factory.rb', line 29

def createMenuItems invocation
  pp [:got_create_menu_items, invocation] if $DEBUG
  Buby::Implants::ContextMenuInvocation.implant invocation
  nil
end