public interface IBurpExtenderCallbacks
registerExtenderCallbacks()
method and passes an instance of the
IBurpExtenderCallbacks
interface. The extension may then invoke
the methods of this interface as required in order to extend Burp's
functionality.Modifier and Type | Field and Description |
---|---|
static int |
TOOL_COMPARER
Flag used to identify the Burp Comparer tool.
|
static int |
TOOL_DECODER
Flag used to identify the Burp Decoder tool.
|
static int |
TOOL_EXTENDER
Flag used to identify the Burp Extender tool.
|
static int |
TOOL_INTRUDER
Flag used to identify the Burp Intruder tool.
|
static int |
TOOL_PROXY
Flag used to identify the Burp Proxy tool.
|
static int |
TOOL_REPEATER
Flag used to identify the Burp Repeater tool.
|
static int |
TOOL_SCANNER
Flag used to identify the Burp Scanner tool.
|
static int |
TOOL_SEQUENCER
Flag used to identify the Burp Sequencer tool.
|
static int |
TOOL_SPIDER
Flag used to identify the Burp Spider tool.
|
static int |
TOOL_SUITE
Flag used to identify Burp Suite as a whole.
|
static int |
TOOL_TARGET
Flag used to identify the Burp Target tool.
|
Modifier and Type | Method and Description |
---|---|
void |
addScanIssue(IScanIssue issue)
This method is used to register a new Scanner issue.
|
void |
addSuiteTab(ITab tab)
This method is used to add a custom tab to the main Burp Suite window.
|
void |
addToSiteMap(IHttpRequestResponse item)
This method can be used to add an item to Burp's site map with the
specified request/response details.
|
IHttpRequestResponseWithMarkers |
applyMarkers(IHttpRequestResponse httpRequestResponse,
java.util.List<int[]> requestMarkers,
java.util.List<int[]> responseMarkers)
This method is used to apply markers to an HTTP request or response, at
offsets into the message that are relevant for some particular purpose.
|
IBurpCollaboratorClientContext |
createBurpCollaboratorClientContext()
This method is used to create a new Burp Collaborator client context,
which can be used to generate Burp Collaborator payloads and poll the
Collaborator server for any network interactions that result from using
those payloads.
|
IMessageEditor |
createMessageEditor(IMessageEditorController controller,
boolean editable)
This method is used to create a new instance of Burp's HTTP message
editor, for the extension to use in its own UI.
|
ITextEditor |
createTextEditor()
This method is used to create a new instance of Burp's plain text editor,
for the extension to use in its own UI.
|
void |
customizeUiComponent(java.awt.Component component)
This method is used to customize UI components in line with Burp's UI
style, including font size, colors, table line spacing, etc.
|
IScanQueueItem |
doActiveScan(java.lang.String host,
int port,
boolean useHttps,
byte[] request)
This method can be used to send an HTTP request to the Burp Scanner tool
to perform an active vulnerability scan.
|
IScanQueueItem |
doActiveScan(java.lang.String host,
int port,
boolean useHttps,
byte[] request,
java.util.List<int[]> insertionPointOffsets)
This method can be used to send an HTTP request to the Burp Scanner tool
to perform an active vulnerability scan, based on a custom list of
insertion points that are to be scanned.
|
void |
doPassiveScan(java.lang.String host,
int port,
boolean useHttps,
byte[] request,
byte[] response)
This method can be used to send an HTTP request to the Burp Scanner tool
to perform a passive vulnerability scan.
|
void |
excludeFromScope(java.net.URL url)
This method can be used to exclude the specified URL from the Suite-wide
scope.
|
void |
exitSuite(boolean promptUser)
This method can be used to shut down Burp programmatically, with an
optional prompt to the user.
|
void |
generateScanReport(java.lang.String format,
IScanIssue[] issues,
java.io.File file)
This method is used to generate a report for the specified Scanner
issues.
|
java.lang.String[] |
getBurpVersion()
This method retrieves information about the version of Burp in which the
extension is running.
|
java.lang.String[] |
getCommandLineArguments()
This method returns the command line arguments that were passed to Burp
on startup.
|
java.util.List<IContextMenuFactory> |
getContextMenuFactories()
This method is used to retrieve the context menu factories that are
registered by the extension.
|
java.util.List<ICookie> |
getCookieJarContents()
This method is used to retrieve the contents of Burp's session handling
cookie jar.
|
java.lang.String |
getExtensionFilename()
This method retrieves the absolute path name of the file from which the
current extension was loaded.
|
java.util.List<IExtensionStateListener> |
getExtensionStateListeners()
This method is used to retrieve the extension state listeners that are
registered by the extension.
|
java.lang.String[] |
getHeaders(byte[] message)
Deprecated.
Use
IExtensionHelpers.analyzeRequest() or
IExtensionHelpers.analyzeResponse() instead. |
IExtensionHelpers |
getHelpers()
This method is used to obtain an
IExtensionHelpers object,
which can be used by the extension to perform numerous useful tasks. |
java.util.List<IHttpListener> |
getHttpListeners()
This method is used to retrieve the HTTP listeners that are registered by
the extension.
|
java.util.List<IIntruderPayloadGeneratorFactory> |
getIntruderPayloadGeneratorFactories()
This method is used to retrieve the Intruder payload generator factories
that are registered by the extension.
|
java.util.List<IIntruderPayloadProcessor> |
getIntruderPayloadProcessors()
This method is used to retrieve the Intruder payload processors that are
registered by the extension.
|
java.util.List<IMessageEditorTabFactory> |
getMessageEditorTabFactories()
This method is used to retrieve the message editor tab factories that are
registered by the extension.
|
java.lang.String[][] |
getParameters(byte[] request)
Deprecated.
Use
IExtensionHelpers.analyzeRequest() instead. |
IHttpRequestResponse[] |
getProxyHistory()
This method returns details of all items in the Proxy history.
|
java.util.List<IProxyListener> |
getProxyListeners()
This method is used to retrieve the Proxy listeners that are registered
by the extension.
|
IScanIssue[] |
getScanIssues(java.lang.String urlPrefix)
This method returns all of the current scan issues for URLs matching the
specified literal prefix.
|
java.util.List<IScannerCheck> |
getScannerChecks()
This method is used to retrieve the Scanner checks that are registered by
the extension.
|
java.util.List<IScannerInsertionPointProvider> |
getScannerInsertionPointProviders()
This method is used to retrieve the Scanner insertion point providers
that are registered by the extension.
|
java.util.List<IScannerListener> |
getScannerListeners()
This method is used to retrieve the Scanner listeners that are registered
by the extension.
|
java.util.List<IScopeChangeListener> |
getScopeChangeListeners()
This method is used to retrieve the scope change listeners that are
registered by the extension.
|
java.util.List<ISessionHandlingAction> |
getSessionHandlingActions()
This method is used to retrieve the session handling actions that are
registered by the extension.
|
IHttpRequestResponse[] |
getSiteMap(java.lang.String urlPrefix)
This method returns details of items in the site map.
|
java.io.OutputStream |
getStderr()
This method is used to obtain the current extension's standard error
stream.
|
java.io.OutputStream |
getStdout()
This method is used to obtain the current extension's standard output
stream.
|
java.lang.String |
getToolName(int toolFlag)
This method is used to obtain the descriptive name for the Burp tool
identified by the tool flag provided.
|
void |
includeInScope(java.net.URL url)
This method can be used to include the specified URL in the Suite-wide
scope.
|
boolean |
isExtensionBapp()
This method determines whether the current extension was loaded as a BApp
(a Burp App from the BApp Store).
|
boolean |
isInScope(java.net.URL url)
This method can be used to query whether a specified URL is within the
current Suite-wide scope.
|
void |
issueAlert(java.lang.String message)
This method can be used to display a specified message in the Burp Suite
alerts tab.
|
void |
loadConfig(java.util.Map<java.lang.String,java.lang.String> config)
Deprecated.
Use
loadConfigFromJson() instead. |
void |
loadConfigFromJson(java.lang.String config)
This method causes Burp to load a new project-level configuration from
the JSON String provided.
|
java.lang.String |
loadExtensionSetting(java.lang.String name)
This method is used to load configuration settings for the extension that
were saved using the method
saveExtensionSetting() . |
byte[] |
makeHttp2Request(IHttpService httpService,
java.util.List<IHttpHeader> headers,
byte[] body)
This method can be used to issue HTTP/2 requests and retrieve their
responses.
|
byte[] |
makeHttp2Request(IHttpService httpService,
java.util.List<IHttpHeader> headers,
byte[] body,
boolean forceHttp2)
This method can be used to issue HTTP/2 requests and retrieve their
responses.
|
byte[] |
makeHttp2Request(IHttpService httpService,
java.util.List<IHttpHeader> headers,
byte[] body,
boolean forceHttp2,
java.lang.String connectionIdentifier)
This method can be used to issue HTTP/2 requests and retrieve their
responses.
|
IHttpRequestResponse |
makeHttpRequest(IHttpService httpService,
byte[] request)
This method can be used to issue HTTP requests and retrieve their
responses.
|
IHttpRequestResponse |
makeHttpRequest(IHttpService httpService,
byte[] request,
boolean forceHttp1)
This method can be used to issue HTTP requests and retrieve their
responses.
|
byte[] |
makeHttpRequest(java.lang.String host,
int port,
boolean useHttps,
byte[] request)
This method can be used to issue HTTP requests and retrieve their
responses.
|
byte[] |
makeHttpRequest(java.lang.String host,
int port,
boolean useHttps,
byte[] request,
boolean forceHttp1)
This method can be used to issue HTTP requests and retrieve their
responses.
|
void |
printError(java.lang.String error)
This method prints a line of output to the current extension's standard
error stream.
|
void |
printOutput(java.lang.String output)
This method prints a line of output to the current extension's standard
output stream.
|
void |
registerContextMenuFactory(IContextMenuFactory factory)
This method is used to register a factory for custom context menu items.
|
void |
registerExtensionStateListener(IExtensionStateListener listener)
This method is used to register a listener which will be notified of
changes to the extension's state.
|
void |
registerHttpListener(IHttpListener listener)
This method is used to register a listener which will be notified of
requests and responses made by any Burp tool.
|
void |
registerIntruderPayloadGeneratorFactory(IIntruderPayloadGeneratorFactory factory)
This method is used to register a factory for Intruder payloads.
|
void |
registerIntruderPayloadProcessor(IIntruderPayloadProcessor processor)
This method is used to register a custom Intruder payload processor.
|
void |
registerMenuItem(java.lang.String menuItemCaption,
IMenuItemHandler menuItemHandler)
Deprecated.
Use
registerContextMenuFactory() instead. |
void |
registerMessageEditorTabFactory(IMessageEditorTabFactory factory)
This method is used to register a factory for custom message editor tabs.
|
void |
registerProxyListener(IProxyListener listener)
This method is used to register a listener which will be notified of
requests and responses being processed by the Proxy tool.
|
void |
registerScannerCheck(IScannerCheck check)
This method is used to register a custom Scanner check.
|
void |
registerScannerInsertionPointProvider(IScannerInsertionPointProvider provider)
This method is used to register a provider of Scanner insertion points.
|
void |
registerScannerListener(IScannerListener listener)
This method is used to register a listener which will be notified of new
issues that are reported by the Scanner tool.
|
void |
registerScopeChangeListener(IScopeChangeListener listener)
This method is used to register a listener which will be notified of
changes to Burp's suite-wide target scope.
|
void |
registerSessionHandlingAction(ISessionHandlingAction action)
This method is used to register a custom session handling action.
|
void |
removeContextMenuFactory(IContextMenuFactory factory)
This method is used to remove a context menu factory that has been
registered by the extension.
|
void |
removeExtensionStateListener(IExtensionStateListener listener)
This method is used to remove an extension state listener that has been
registered by the extension.
|
void |
removeHttpListener(IHttpListener listener)
This method is used to remove an HTTP listener that has been registered
by the extension.
|
void |
removeIntruderPayloadGeneratorFactory(IIntruderPayloadGeneratorFactory factory)
This method is used to remove an Intruder payload generator factory that
has been registered by the extension.
|
void |
removeIntruderPayloadProcessor(IIntruderPayloadProcessor processor)
This method is used to remove an Intruder payload processor that has been
registered by the extension.
|
void |
removeMessageEditorTabFactory(IMessageEditorTabFactory factory)
This method is used to remove a message editor tab factory that has been
registered by the extension.
|
void |
removeProxyListener(IProxyListener listener)
This method is used to remove a Proxy listener that has been registered
by the extension.
|
void |
removeScannerCheck(IScannerCheck check)
This method is used to remove a Scanner check that has been registered by
the extension.
|
void |
removeScannerInsertionPointProvider(IScannerInsertionPointProvider provider)
This method is used to remove a Scanner insertion point provider that has
been registered by the extension.
|
void |
removeScannerListener(IScannerListener listener)
This method is used to remove a Scanner listener that has been registered
by the extension.
|
void |
removeScopeChangeListener(IScopeChangeListener listener)
This method is used to remove a scope change listener that has been
registered by the extension.
|
void |
removeSessionHandlingAction(ISessionHandlingAction action)
This method is used to remove a session handling action that has been
registered by the extension.
|
void |
removeSuiteTab(ITab tab)
This method is used to remove a previously-added tab from the main Burp
Suite window.
|
void |
restoreState(java.io.File file)
Deprecated.
State files have been replaced with Burp project files.
|
IHttpRequestResponsePersisted |
saveBuffersToTempFiles(IHttpRequestResponse httpRequestResponse)
This method is used to save the request and response of an
IHttpRequestResponse object to temporary files, so that they
are no longer held in memory. |
java.util.Map<java.lang.String,java.lang.String> |
saveConfig()
Deprecated.
Use
saveConfigAsJson() instead. |
java.lang.String |
saveConfigAsJson(java.lang.String... configPaths)
This method causes Burp to save its current project-level configuration
in JSON format.
|
void |
saveExtensionSetting(java.lang.String name,
java.lang.String value)
This method is used to save configuration settings for the extension in a
persistent way that survives reloads of the extension and of Burp Suite.
|
void |
saveState(java.io.File file)
Deprecated.
State files have been replaced with Burp project files.
|
ITempFile |
saveToTempFile(byte[] buffer)
This method is used to create a temporary file on disk containing the
provided data.
|
void |
sendToComparer(byte[] data)
This method can be used to send data to the Comparer tool.
|
void |
sendToIntruder(java.lang.String host,
int port,
boolean useHttps,
byte[] request)
This method can be used to send an HTTP request to the Burp Intruder
tool.
|
void |
sendToIntruder(java.lang.String host,
int port,
boolean useHttps,
byte[] request,
java.util.List<int[]> payloadPositionOffsets)
This method can be used to send an HTTP request to the Burp Intruder
tool.
|
void |
sendToRepeater(java.lang.String host,
int port,
boolean useHttps,
byte[] request,
java.lang.String tabCaption)
This method can be used to send an HTTP request to the Burp Repeater
tool.
|
void |
sendToSpider(java.net.URL url)
This method can be used to send a seed URL to the Burp Spider tool.
|
void |
setExtensionName(java.lang.String name)
This method is used to set the display name for the current extension,
which will be displayed within the user interface for the Extender tool.
|
void |
setProxyInterceptionEnabled(boolean enabled)
This method sets the master interception mode for Burp Proxy.
|
void |
unloadExtension()
This method is used to unload the extension from Burp Suite.
|
void |
updateCookieJar(ICookie cookie)
This method is used to update the contents of Burp's session handling
cookie jar.
|
static final int TOOL_SUITE
static final int TOOL_TARGET
static final int TOOL_PROXY
static final int TOOL_SPIDER
static final int TOOL_SCANNER
static final int TOOL_INTRUDER
static final int TOOL_REPEATER
static final int TOOL_SEQUENCER
static final int TOOL_DECODER
static final int TOOL_COMPARER
static final int TOOL_EXTENDER
void setExtensionName(java.lang.String name)
name
- The extension name.IExtensionHelpers getHelpers()
IExtensionHelpers
object,
which can be used by the extension to perform numerous useful tasks.java.io.OutputStream getStdout()
java.io.OutputStream getStderr()
void printOutput(java.lang.String output)
output
- The message to print.void printError(java.lang.String error)
error
- The message to print.void registerExtensionStateListener(IExtensionStateListener listener)
listener
- An object created by the extension that implements the
IExtensionStateListener
interface.java.util.List<IExtensionStateListener> getExtensionStateListeners()
void removeExtensionStateListener(IExtensionStateListener listener)
listener
- The extension state listener to be removed.void registerHttpListener(IHttpListener listener)
listener
- An object created by the extension that implements the
IHttpListener
interface.java.util.List<IHttpListener> getHttpListeners()
void removeHttpListener(IHttpListener listener)
listener
- The HTTP listener to be removed.void registerProxyListener(IProxyListener listener)
listener
- An object created by the extension that implements the
IProxyListener
interface.java.util.List<IProxyListener> getProxyListeners()
void removeProxyListener(IProxyListener listener)
listener
- The Proxy listener to be removed.void registerScannerListener(IScannerListener listener)
listener
- An object created by the extension that implements the
IScannerListener
interface.java.util.List<IScannerListener> getScannerListeners()
void removeScannerListener(IScannerListener listener)
listener
- The Scanner listener to be removed.void registerScopeChangeListener(IScopeChangeListener listener)
listener
- An object created by the extension that implements the
IScopeChangeListener
interface.java.util.List<IScopeChangeListener> getScopeChangeListeners()
void removeScopeChangeListener(IScopeChangeListener listener)
listener
- The scope change listener to be removed.void registerContextMenuFactory(IContextMenuFactory factory)
factory
- An object created by the extension that implements the
IContextMenuFactory
interface.java.util.List<IContextMenuFactory> getContextMenuFactories()
void removeContextMenuFactory(IContextMenuFactory factory)
factory
- The context menu factory to be removed.void registerMessageEditorTabFactory(IMessageEditorTabFactory factory)
IMessageEditorTab
object, which can provide custom rendering
or editing of HTTP messages.factory
- An object created by the extension that implements the
IMessageEditorTabFactory
interface.java.util.List<IMessageEditorTabFactory> getMessageEditorTabFactories()
void removeMessageEditorTabFactory(IMessageEditorTabFactory factory)
factory
- The message editor tab factory to be removed.void registerScannerInsertionPointProvider(IScannerInsertionPointProvider provider)
provider
- An object created by the extension that implements the
IScannerInsertionPointProvider
interface.java.util.List<IScannerInsertionPointProvider> getScannerInsertionPointProviders()
void removeScannerInsertionPointProvider(IScannerInsertionPointProvider provider)
provider
- The Scanner insertion point provider to be removed.void registerScannerCheck(IScannerCheck check)
check
- An object created by the extension that implements the
IScannerCheck
interface.java.util.List<IScannerCheck> getScannerChecks()
void removeScannerCheck(IScannerCheck check)
check
- The Scanner check to be removed.void registerIntruderPayloadGeneratorFactory(IIntruderPayloadGeneratorFactory factory)
IIntruderPayloadGenerator
object, which will be used to
generate payloads for the attack.factory
- An object created by the extension that implements the
IIntruderPayloadGeneratorFactory
interface.java.util.List<IIntruderPayloadGeneratorFactory> getIntruderPayloadGeneratorFactories()
void removeIntruderPayloadGeneratorFactory(IIntruderPayloadGeneratorFactory factory)
factory
- The Intruder payload generator factory to be removed.void registerIntruderPayloadProcessor(IIntruderPayloadProcessor processor)
processor
- An object created by the extension that implements the
IIntruderPayloadProcessor
interface.java.util.List<IIntruderPayloadProcessor> getIntruderPayloadProcessors()
void removeIntruderPayloadProcessor(IIntruderPayloadProcessor processor)
processor
- The Intruder payload processor to be removed.void registerSessionHandlingAction(ISessionHandlingAction action)
action
- An object created by the extension that implements the
ISessionHandlingAction
interface.java.util.List<ISessionHandlingAction> getSessionHandlingActions()
void removeSessionHandlingAction(ISessionHandlingAction action)
action
- The extension session handling action to be removed.void unloadExtension()
void addSuiteTab(ITab tab)
tab
- An object created by the extension that implements the
ITab
interface.void removeSuiteTab(ITab tab)
tab
- An object created by the extension that implements the
ITab
interface.void customizeUiComponent(java.awt.Component component)
component
- The UI component to be customized.IMessageEditor createMessageEditor(IMessageEditorController controller, boolean editable)
controller
- An object created by the extension that implements the
IMessageEditorController
interface. This parameter is
optional and may be null
. If it is provided, then the
message editor will query the controller when required to obtain details
about the currently displayed message, including the
IHttpService
for the message, and the associated request or
response message. If a controller is not provided, then the message
editor will not support context menu actions, such as sending requests to
other Burp tools.editable
- Indicates whether the editor created should be editable,
or used only for message viewing.IMessageEditor
interface, and which the extension can use in its own UI.java.lang.String[] getCommandLineArguments()
void saveExtensionSetting(java.lang.String name, java.lang.String value)
loadExtensionSetting()
.name
- The name of the setting.value
- The value of the setting. If this value is null
then any existing setting with the specified name will be removed.java.lang.String loadExtensionSetting(java.lang.String name)
saveExtensionSetting()
.name
- The name of the setting.null
if no value is
set.ITextEditor createTextEditor()
ITextEditor
interface,
and which the extension can use in its own UI.void sendToRepeater(java.lang.String host, int port, boolean useHttps, byte[] request, java.lang.String tabCaption)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.tabCaption
- An optional caption which will appear on the Repeater
tab containing the request. If this value is null
then a
default tab index will be displayed.void sendToIntruder(java.lang.String host, int port, boolean useHttps, byte[] request)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.void sendToIntruder(java.lang.String host, int port, boolean useHttps, byte[] request, java.util.List<int[]> payloadPositionOffsets)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.payloadPositionOffsets
- A list of index pairs representing the
payload positions to be used. Each item in the list must be an int[2]
array containing the start and end offsets for the payload position.void sendToComparer(byte[] data)
data
- The data to be sent to Comparer.void sendToSpider(java.net.URL url)
url
- The new seed URL to begin spidering from.IScanQueueItem doActiveScan(java.lang.String host, int port, boolean useHttps, byte[] request)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.IScanQueueItem doActiveScan(java.lang.String host, int port, boolean useHttps, byte[] request, java.util.List<int[]> insertionPointOffsets)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.insertionPointOffsets
- A list of index pairs representing the
positions of the insertion points that should be scanned. Each item in
the list must be an int[2] array containing the start and end offsets for
the insertion point.void doPassiveScan(java.lang.String host, int port, boolean useHttps, byte[] request, byte[] response)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.response
- The full HTTP response.IHttpRequestResponse makeHttpRequest(IHttpService httpService, byte[] request)
httpService
- The HTTP service to which the request should be sent.request
- The full HTTP request.IHttpRequestResponse
interface, and which the extension can query to obtain the details of the
response.IHttpRequestResponse makeHttpRequest(IHttpService httpService, byte[] request, boolean forceHttp1)
httpService
- The HTTP service to which the request should be sent.request
- The full HTTP request.forceHttp1
- If true then HTTP/1 will be used.IHttpRequestResponse
interface, and which the extension can query to obtain the details of the
response.byte[] makeHttpRequest(java.lang.String host, int port, boolean useHttps, byte[] request)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.byte[] makeHttpRequest(java.lang.String host, int port, boolean useHttps, byte[] request, boolean forceHttp1)
host
- The hostname of the remote HTTP server.port
- The port of the remote HTTP server.useHttps
- Flags whether the protocol is HTTPS or HTTP.request
- The full HTTP request.forceHttp1
- If true then HTTP/1 will be used.byte[] makeHttp2Request(IHttpService httpService, java.util.List<IHttpHeader> headers, byte[] body)
httpService
- The HTTP service to which the request should be sent.headers
- The headers of the request.body
- The body of the request.byte[] makeHttp2Request(IHttpService httpService, java.util.List<IHttpHeader> headers, byte[] body, boolean forceHttp2)
httpService
- The HTTP service to which the request should be sent.headers
- The headers of the request.body
- The body of the request.forceHttp2
- Whether or not to force HTTP/2 for this request.byte[] makeHttp2Request(IHttpService httpService, java.util.List<IHttpHeader> headers, byte[] body, boolean forceHttp2, java.lang.String connectionIdentifier)
httpService
- The HTTP service to which the request should be sent.headers
- The headers of the request.body
- The body of the request.forceHttp2
- Whether or not to force HTTP/2 for this request.connectionIdentifier
- The identifier for the connection you want to use.boolean isInScope(java.net.URL url)
url
- The URL to query.true
if the URL is within the current
Suite-wide scope.void includeInScope(java.net.URL url)
url
- The URL to include in the Suite-wide scope.void excludeFromScope(java.net.URL url)
url
- The URL to exclude from the Suite-wide scope.void issueAlert(java.lang.String message)
message
- The alert message to display.IHttpRequestResponse[] getProxyHistory()
IHttpRequestResponse[] getSiteMap(java.lang.String urlPrefix)
urlPrefix
- This parameter can be used to specify a URL prefix, in
order to extract a specific subset of the site map. The method performs a
simple case-sensitive text match, returning all site map items whose URL
begins with the specified prefix. If this parameter is null, the entire
site map is returned.IScanIssue[] getScanIssues(java.lang.String urlPrefix)
urlPrefix
- This parameter can be used to specify a URL prefix, in
order to extract a specific subset of scan issues. The method performs a
simple case-sensitive text match, returning all scan issues whose URL
begins with the specified prefix. If this parameter is null, all issues
are returned.void generateScanReport(java.lang.String format, IScanIssue[] issues, java.io.File file)
format
- The format to be used in the report. Accepted values are
HTML and XML.issues
- The Scanner issues to be reported.file
- The file to which the report will be saved.java.util.List<ICookie> getCookieJarContents()
ISessionHandlingAction
can query and update the cookie jar
in order to handle unusual session handling mechanisms.ICookie
objects representing the contents
of Burp's session handling cookie jar.void updateCookieJar(ICookie cookie)
ISessionHandlingAction
can query and update the cookie jar
in order to handle unusual session handling mechanisms.cookie
- An ICookie
object containing details of the
cookie to be updated. If the cookie jar already contains a cookie that
matches the specified domain and name, then that cookie will be updated
with the new value and expiration, unless the new value is
null
, in which case the cookie will be removed. If the
cookie jar does not already contain a cookie that matches the specified
domain and name, then the cookie will be added.void addToSiteMap(IHttpRequestResponse item)
item
- Details of the item to be added to the site map@Deprecated void restoreState(java.io.File file)
file
- The file containing Burp's saved state.@Deprecated void saveState(java.io.File file)
file
- The file to save Burp's state in.@Deprecated java.util.Map<java.lang.String,java.lang.String> saveConfig()
saveConfigAsJson()
instead.@Deprecated void loadConfig(java.util.Map<java.lang.String,java.lang.String> config)
loadConfigFromJson()
instead.config
- A map of name/value Strings to use as Burp's new
configuration.java.lang.String saveConfigAsJson(java.lang.String... configPaths)
configPaths
- A list of Strings representing the path to each
configuration section that should be included.void loadConfigFromJson(java.lang.String config)
config
- A JSON String containing the new configuration.void setProxyInterceptionEnabled(boolean enabled)
enabled
- Indicates whether interception of Proxy messages should be
enabled.java.lang.String[] getBurpVersion()
java.lang.String getExtensionFilename()
boolean isExtensionBapp()
void exitSuite(boolean promptUser)
promptUser
- Indicates whether to prompt the user to confirm the
shutdown.ITempFile saveToTempFile(byte[] buffer)
buffer
- The data to be saved to a temporary file.ITempFile
interface.IHttpRequestResponsePersisted saveBuffersToTempFiles(IHttpRequestResponse httpRequestResponse)
IHttpRequestResponse
object to temporary files, so that they
are no longer held in memory. Extensions can used this method to convert
IHttpRequestResponse
objects into a form suitable for
long-term storage.httpRequestResponse
- The IHttpRequestResponse
object
whose request and response messages are to be saved to temporary files.IHttpRequestResponsePersisted
interface.IHttpRequestResponseWithMarkers applyMarkers(IHttpRequestResponse httpRequestResponse, java.util.List<int[]> requestMarkers, java.util.List<int[]> responseMarkers)
httpRequestResponse
- The IHttpRequestResponse
object
to which the markers should be applied.requestMarkers
- A list of index pairs representing the offsets of
markers to be applied to the request message. Each item in the list must
be an int[2] array containing the start and end offsets for the marker.
The markers in the list should be in sequence and not overlapping. This
parameter is optional and may be null
if no request markers
are required.responseMarkers
- A list of index pairs representing the offsets of
markers to be applied to the response message. Each item in the list must
be an int[2] array containing the start and end offsets for the marker.
The markers in the list should be in sequence and not overlapping. This
parameter is optional and may be null
if no response markers
are required.IHttpRequestResponseWithMarkers
interface.java.lang.String getToolName(int toolFlag)
toolFlag
- A flag identifying a Burp tool ( TOOL_PROXY
,
TOOL_SCANNER
, etc.). Tool flags are defined within this
interface.void addScanIssue(IScanIssue issue)
IScannerCheck
and report issues via those checks, so
as to integrate with Burp's user-driven workflow, and ensure proper
consolidation of duplicate reported issues. This method is only designed
for tasks outside of the normal testing workflow, such as importing
results from other scanning tools.issue
- An object created by the extension that implements the
IScanIssue
interface.IBurpCollaboratorClientContext createBurpCollaboratorClientContext()
IBurpCollaboratorClientContext
that can be used to generate Collaborator payloads and retrieve
interactions.@Deprecated java.lang.String[][] getParameters(byte[] request)
IExtensionHelpers.analyzeRequest()
instead.request
- The request to be parsed.String[] { name, value, type }
containing details of the parameters contained within the request.@Deprecated java.lang.String[] getHeaders(byte[] message)
IExtensionHelpers.analyzeRequest()
or
IExtensionHelpers.analyzeResponse()
instead.message
- The request to be parsed.@Deprecated void registerMenuItem(java.lang.String menuItemCaption, IMenuItemHandler menuItemHandler)
registerContextMenuFactory()
instead.menuItemCaption
- The caption to be displayed on the menu item.menuItemHandler
- The handler to be invoked when the user clicks on
the menu item.