Class: Buby::SessionHandlingAction

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

Overview

Extensions can implement this interface and then call #registerSessionHandlingAction to register a custom session handling action. Each registered action will be available within the session handling rule UI for the user to select as a rule action. Users can choose to invoke an action directly in its own right, or following execution of a macro.

Instance Method Summary collapse

Instance Method Details

#getActionNameString

This method is used by Burp to obtain the name of the session handling action. This will be displayed as an option within the session handling rule editor when the user selects to execute an extension-provided action.

Returns:

  • (String)

    The name of the action.



16
17
18
19
# File 'lib/buby/session_handling_action.rb', line 16

def getActionName
  pp [:got_getActionName] if $DEBUG
  self.class.name
end

#performAction(currentRequest, macroItems) ⇒ void

This method is abstract.

This method returns an undefined value.

This method is invoked when the session handling action should be executed. This may happen as an action in its own right, or as a sub-action following execution of a macro.

Parameters:

  • currentRequest (IHttpRequestResponse)

    The base request that is currently being processed. The action can query this object to obtain details about the base request. It can issue additional requests of its own if necessary, and can use the setter methods on this object to update the base request.

  • macroItems (Array<IHttpRequestResponse>)

    If the action is invoked following execution of a macro, this parameter contains the result of executing the macro. Otherwise, it is nil. Actions can use the details of the macro items to perform custom analysis of the macro to derive values of non-standard session handling tokens, etc.



38
39
40
41
# File 'lib/buby/session_handling_action.rb', line 38

def performAction(currentRequest, macroItems)
  pp [:got_performAction, currentRequest, macroItems] if $DEBUG
  Buby::HttpRequestResponseHelper.implant(currentRequest)
end