### SettingsPanelBuilder.settingsPanel() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelBuilder.html Obtains an instance of the SettingsPanelBuilder to start building a settings panel. ```APIDOC ## Method: settingsPanel ### Description Used to obtain an instance of the SettingsPanelBuilder. ### Signature `static SettingsPanelBuilder settingsPanel()` ### Returns An instance of the SettingsPanelBuilder. ``` -------------------------------- ### Start Crawl Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/scanner/Scanner.html Initiates a crawl in the Burp Scanner tool with the specified crawl configuration. ```APIDOC ## startCrawl ### Description This method can be used to start a crawl in the Burp Scanner tool. ### Method `startCrawl` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **crawlConfiguration** (CrawlConfiguration) - Required - The configuration for the crawl. ### Response #### Success Response * **Crawl** - The `Crawl` started in the Burp Scanner tool. #### Response Example None provided. ``` -------------------------------- ### Start Audit Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/scanner/Scanner.html Initiates an audit in the Burp Scanner tool with the specified audit configuration. ```APIDOC ## startAudit ### Description This method can be used to start an audit in the Burp Scanner tool. ### Method `startAudit` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **auditConfiguration** (AuditConfiguration) - Required - The configuration for the audit. ### Response #### Success Response * **Audit** - The `Audit` started in the Burp Scanner tool. #### Response Example None provided. ``` -------------------------------- ### stringSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Builds a text field with a description and an initial value for UI settings panels. ```APIDOC ## Static method stringSetting(String, String, String) ### Description Used to build a text field with a description that has an initial value. ### Method Static method call ### Parameters * **param1** (String) - Description for the setting * **param2** (String) - Initial value for the text field * **param3** (String) - Label for the text field ``` -------------------------------- ### Get Marker Range Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/core/Marker.html Retrieves the Range object associated with this Marker. This allows you to access the specific start and end points of the data range the marker represents. ```APIDOC ## range() ### Description Returns the range of the marker. ### Method Instance Method ### Response #### Success Response (Range) - **Range** - The range object associated with the marker. ### Response Example ```json { "range": { "start": 0, "end": 10 } } ``` ``` -------------------------------- ### WebSocketEditorEvent Methods Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/contextmenu/WebSocketEditorEvent.html Provides methods to get and set the contents of the WebSocket message editor, retrieve the associated WebSocket message, check if the editor is read-only, get the current selection offsets, and get the caret position. ```APIDOC ## WebSocketEditorEvent ### Description Represents an event related to the WebSocket message editor, providing access to its content, selection, and state. ### Methods #### `getContents()` Returns the current contents of the message editor. - **Returns**: `ByteArray` - The contents of the message editor. #### `setContents(ByteArray contents)` Sets the content within the message editor programmatically. The contents will not be updated if the editor is read-only. - **Parameters**: - `contents` (ByteArray) - The content to set in the message editor. #### `webSocketMessage()` Retrieves the WebSocket message used to populate the editor. - **Returns**: `WebSocketMessage` - The WebSocket message. #### `isReadOnly()` Checks if the editor is read-only. - **Returns**: `boolean` - `true` if the editor is read-only, `false` otherwise. #### `selectionOffsets()` Returns the offsets of the user's current selection in the editor. Returns `Optional.empty()` if no selection is made. - **Returns**: `Optional` - An `Optional` range indicating the position of the user's current selection. #### `caretPosition()` Returns the index of the caret's position within the current message editor. - **Returns**: `int` - The index of the caret position. ``` -------------------------------- ### SettingsPanelBuilder.build() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelBuilder.html Builds and returns the configured settings panel. ```APIDOC ## Method: build ### Description Used to build the settings panel. ### Signature `SettingsPanelWithData build()` ### Returns The built settings panel. ``` -------------------------------- ### Example JSON Structure Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/utilities/json/JsonUtils.html This is an example JSON structure used to illustrate the location syntax for the JsonUtils interface. ```json { "account": [ { "user": { "name": "Peter Wiener", "addresses": [ "Address 1", "Address 2", "Address 3" ] } }, { "user": { "name": "Carlos Montoya", "addresses": [ "Address 4", "Address 5", "Address 6" ] } } ] } ``` -------------------------------- ### initialize Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Invoked when the extension is loaded. This method is part of the BurpExtension interface. ```APIDOC ## initialize(MontoyaApi) ### Description Invoked when the extension is loaded. ### Method This is a method signature, not an HTTP endpoint. ### Endpoint N/A ### Parameters - **MontoyaApi** (MontoyaApi) - The API object provided by Burp Suite. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Create Marker from Indices Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/core/Marker.html Creates a Marker object by specifying the start and end indices of the desired range. The start index is inclusive, and the end index is exclusive. ```APIDOC ## marker(int startIndexInclusive, int endIndexExclusive) ### Description Creates a marker object from two indices representing a range. The start index is inclusive, and the end index is exclusive. ### Method static Marker ### Parameters #### Request Body - **startIndexInclusive** (int) - Required - The start index of the range (inclusive). - **endIndexExclusive** (int) - Required - The end index of the range (exclusive). ### Response #### Success Response (Marker) - **Marker** - The newly created marker object. ### Response Example ```json { "marker": "marker_object_with_indices" } ``` ``` -------------------------------- ### BasicMenuItem Creation and Customization Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/menu/BasicMenuItem.html Demonstrates how to create and customize a BasicMenuItem, including setting its caption and defining the action to be performed when clicked. ```APIDOC ## BasicMenuItem ### Description Represents a basic menu item that can be added to the Burp Suite UI. It allows for setting a caption and defining an action to be executed when the item is selected. ### Methods #### `static BasicMenuItem basicMenuItem(String caption)` Creates a new instance of `BasicMenuItem` with the specified caption. * **Parameters**: * `caption` (String) - The text to display for the menu item. * **Returns**: * A new `BasicMenuItem` instance. #### `BasicMenuItem withCaption(String caption)` Creates a copy of the `BasicMenuItem` with an updated caption. * **Parameters**: * `caption` (String) - The new text for the menu item. * **Returns**: * An updated copy of the `BasicMenuItem`. #### `BasicMenuItem withAction(Runnable action)` Creates a copy of the `BasicMenuItem` with a new action to be performed when clicked. * **Parameters**: * `action` (Runnable) - The action to execute when the menu item is clicked. * **Returns**: * An updated copy of the `BasicMenuItem`. #### `void action()` This method is called when the `BasicMenuItem` is clicked. The specific action is defined when the menu item is created or updated using `withAction()`. ``` -------------------------------- ### Interaction.clientPort() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the client port of the interaction. ```APIDOC ## Interaction.clientPort() ### Description Client port of the interaction. ### Method This is a method call within the Interaction interface. ``` -------------------------------- ### CollaboratorServer.address() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the address of the Collaborator server. ```APIDOC ## Method: burp.api.montoya.collaborator.CollaboratorServer.address() ### Description Address of the Collaborator server. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **String** (string) - The address of the Collaborator server. ### Response Example None ``` -------------------------------- ### importProjectOptionsFromJson Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/burpsuite/BurpSuite.html Import a new project-level configuration from the JSON String provided. This is the same format that can be saved and loaded via the Burp user interface. Partial configurations are acceptable, and any settings not specified will be left unmodified. Any user-level configuration options contained in the input will be ignored. ```APIDOC ## importProjectOptionsFromJson ### Description Import a new project-level configuration from the JSON String provided. This is the same format that can be saved and loaded via the Burp user interface. Partial configurations are acceptable, and any settings not specified will be left unmodified. Any user-level configuration options contained in the input will be ignored. ### Method POST ### Endpoint /burpsuite/project_options/import ### Parameters #### Request Body - **json** (String) - Required - A JSON String containing the new configuration. ``` -------------------------------- ### method() - InterceptedRequest Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the HTTP method for the request. ```APIDOC ## method() - InterceptedRequest ### Description HTTP method for the request. ### Method (Not specified, likely a getter method) ### Endpoint (Not applicable, SDK method) ### Parameters (None explicitly listed) ### Request Example (Not applicable) ### Response (HTTP method string) ``` -------------------------------- ### initialize Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/BurpExtension.html Invoked when the extension is loaded. Any registered handlers will only be enabled once this method has completed. This method provides access to the Burp Suite API. ```APIDOC ## initialize ### Description Invoked when the extension is loaded. Any registered handlers will only be enabled once this method has completed. This method provides access to the Burp Suite API. ### Method void ### Parameters #### Parameters * `api` (MontoyaApi) - The API implementation to access the functionality of Burp Suite. ``` -------------------------------- ### method() - HttpRequest Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the HTTP method for the request. ```APIDOC ## method() - HttpRequest ### Description HTTP method for the request. ### Method (Not specified, likely a getter method) ### Endpoint (Not applicable, SDK method) ### Parameters (None explicitly listed) ### Request Example (Not applicable) ### Response (HTTP method string) ``` -------------------------------- ### listSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a setting for a list of string values. ```APIDOC ## listSetting (Overload 1) ### Description Creates a setting for a list of string values. ### Method Factory Method ### Signature listSetting(String name, String... values) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. - **values** (String...) - Required - An array of strings representing the possible values for the setting. ``` ```APIDOC ## listSetting (Overload 2) ### Description Creates a setting for a list of string values with a default value. ### Method Factory Method ### Signature listSetting(String name, List values, String defaultValue) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. - **values** (List) - Required - A list of strings representing the possible values for the setting. - **defaultValue** (String) - Required - The default value for the setting. ``` ```APIDOC ## listSetting (Overload 3) ### Description Creates a setting for a list of string values with a description, name, and default value. ### Method Factory Method ### Signature listSetting(String description, String name, List values, String defaultValue) ### Parameters #### Path Parameters - **description** (String) - Required - The description of the setting. - **name** (String) - Required - The name of the setting. - **values** (List) - Required - A list of strings representing the possible values for the setting. - **defaultValue** (String) - Required - The default value for the setting. ``` -------------------------------- ### method() - HttpRequestToBeSent Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the HTTP method for the request. ```APIDOC ## method() - HttpRequestToBeSent ### Description HTTP method for the request. ### Method (Not specified, likely a getter method) ### Endpoint (Not applicable, SDK method) ### Parameters (None explicitly listed) ### Request Example (Not applicable) ### Response (HTTP method string) ``` -------------------------------- ### stringSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Used to build a text field for settings, optionally with an initial value. ```APIDOC ## stringSetting(String) ## stringSetting(String, String) ## stringSetting(String, String, String) ### Description Used to build a text field for settings. Overloads allow for specifying an initial value and a default value. ### Method Static method in interface `burp.api.montoya.ui.settings.SettingsPanelSetting` and method in `burp.api.montoya.internal.MontoyaObjectFactory`. ### Endpoint N/A (Method within an interface/factory) ### Parameters * **String** - The key for the setting. * **String** (Optional) - The initial value for the text field. * **String** (Optional) - The default value for the text field. ### Response Represents a UI setting element for text input. ``` -------------------------------- ### SettingsPanelBuilder.withDescription(String description) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelBuilder.html Sets the description to be displayed within the Settings panel. ```APIDOC ## Method: withDescription ### Description Sets the description to be displayed within Settings panel. ### Signature `SettingsPanelBuilder withDescription(String description)` ### Parameters * **description** (String) - The description to be displayed. ### Returns An instance of the builder. ``` -------------------------------- ### Interaction.clientIp() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the client IP address of the interaction. ```APIDOC ## Interaction.clientIp() ### Description Client IP address of the interaction. ### Method This is a method call within the Interaction interface. ``` -------------------------------- ### importUserOptionsFromJson Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/burpsuite/BurpSuite.html Import a new user-level configuration from the JSON String provided. This is the same format that can be saved and loaded via the Burp user interface. Partial configurations are acceptable, and any settings not specified will be left unmodified. Any project-level configuration options contained in the input will be ignored. ```APIDOC ## importUserOptionsFromJson ### Description Import a new user-level configuration from the JSON String provided. This is the same format that can be saved and loaded via the Burp user interface. Partial configurations are acceptable, and any settings not specified will be left unmodified. Any project-level configuration options contained in the input will be ignored. ### Method POST ### Endpoint /burpsuite/user_options/import ### Parameters #### Request Body - **json** (String) - Required - A JSON String containing the new configuration. ``` -------------------------------- ### HttpRequestToBeSent.path() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the request path including query parameters. ```APIDOC ## path() ### Description Gets the request path including the query parameters. ### Method Method ### Endpoint N/A (Interface method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **path** (String) - The request path including query parameters. ``` -------------------------------- ### method() - ProxyHttpRequestResponse Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the HTTP method for the request. Deprecated. ```APIDOC ## method() - ProxyHttpRequestResponse ### Description Deprecated, for removal: This API element is subject to removal in a future version. use `ProxyHttpRequestResponse.finalRequest()` method instead. HTTP method for the request. ### Method (Not specified, likely a getter method) ### Endpoint (Not applicable, SDK method) ### Parameters (None explicitly listed) ### Request Example (Not applicable) ### Response (HTTP method string) ``` -------------------------------- ### executeOptions() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/utilities/shell/ExecuteOptions.html Creates a new ExecuteOptions instance with default settings. ```APIDOC ## executeOptions() ### Description Creates a new `ExecuteOptions` instance with default settings. ### Method static ExecuteOptions ### Returns An `ExecuteOptions` instance with default settings. ``` -------------------------------- ### listSetting(String, String, List, String) - Static method in interface burp.api.montoya.ui.settings.SettingsPanelSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Used to build a combo box with a description and a specific initial value selected. ```APIDOC ## listSetting(String name, String description, List options, String initialValue) ### Description Used to build a combo box with a description that has a specific initial value selected. ### Method N/A (Static Interface Method) ### Endpoint N/A ### Parameters * **name** (String) - Required - The name of the setting. * **description** (String) - Required - A description for the setting. * **options** (List) - Required - The available options for the combo box. * **initialValue** (String) - Required - The initially selected value. ### Request Example None ### Response None ``` -------------------------------- ### Get Attributes Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/proxy/http/InterceptedResponse.html Retrieves the values of specified response attributes. ```APIDOC ## attributes ### Description Retrieve the values of response attributes. ### Method N/A (Method of an object) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters * **types** (AttributeType...) - Response attributes to retrieve values for. ### Response #### Success Response * **List** - List of `Attribute` objects. ``` -------------------------------- ### promptOptions Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a default PromptOptions object. ```APIDOC ## promptOptions ### Description Creates a default PromptOptions object. ### Method Factory Method ### Signature promptOptions() ### Parameters None ``` -------------------------------- ### Get header value Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/http/message/HttpHeader.html Retrieves the value of the HTTP header. ```APIDOC ## value() ### Description Returns the value of the header. ### Method String ### Parameters None ### Request Example None ### Response #### Success Response - **String** - The value of the header. #### Response Example None ``` -------------------------------- ### menu(String) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Creates a new instance of a Menu. ```APIDOC ## menu(String) ### Description Create a new instance of `Menu`. ### Method N/A (Static method within an interface) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get header name Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/http/message/HttpHeader.html Retrieves the name of the HTTP header. ```APIDOC ## name() ### Description Returns the name of the header. ### Method String ### Parameters None ### Request Example None ### Response #### Success Response - **String** - The name of the header. #### Response Example None ``` -------------------------------- ### PromptOptions Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates prompt options. ```APIDOC ## PromptOptions ### Description Creates prompt options. ### Method `promptOptions()` ### Parameters None. ``` -------------------------------- ### SwingUtils.colorForHighLight() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the color for a highlight, taking a HighlightColor enum as input. ```APIDOC ## SwingUtils.colorForHighLight(HighlightColor) ### Description Gets the color for a highlight. ### Parameters #### Path Parameters - **HighlightColor** (enum) - Required - The highlight color to retrieve. ### Method This is a method call within the SwingUtils interface. ``` -------------------------------- ### hotkey Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a HotKey object. ```APIDOC ## hotkey ### Description Creates a HotKey object. ### Method Factory Method ### Signature hotkey(String name, String hotkey) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the hotkey. - **hotkey** (String) - Required - The key combination for the hotkey. ``` -------------------------------- ### Get Message as String Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/proxy/http/InterceptedResponse.html Retrieves the entire HTTP message as a String. ```APIDOC ## toString ### Description Message as a `String`. ### Method N/A (Method of an object) ### Parameters N/A ### Response #### Success Response * **String** - The message as a `String`. ``` -------------------------------- ### Menu.withMenuItems (varargs) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Creates a copy of the Menu with one or more MenuItems. ```APIDOC ## Menu.withMenuItems(MenuItem...) ### Description Creates a copy of `Menu` with one or more instances of `MenuItem`. ### Method N/A (Java Method Signature) ### Endpoint N/A (Java Method Signature) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response Returns a copy of the `Menu` with the specified `MenuItem` instances. #### Response Example None ``` -------------------------------- ### stringSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a setting for a string value. ```APIDOC ## stringSetting (Overload 1) ### Description Creates a setting for a string value. ### Method Factory Method ### Signature stringSetting(String name) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. ``` ```APIDOC ## stringSetting (Overload 2) ### Description Creates a setting for a string value with a default value. ### Method Factory Method ### Signature stringSetting(String name, String defaultValue) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. - **defaultValue** (String) - Required - The default value for the setting. ``` ```APIDOC ## stringSetting (Overload 3) ### Description Creates a setting for a string value with a description, name, and default value. ### Method Factory Method ### Signature stringSetting(String description, String name, String defaultValue) ### Parameters #### Path Parameters - **description** (String) - Required - The description of the setting. - **name** (String) - Required - The name of the setting. - **defaultValue** (String) - Required - The default value for the setting. ``` -------------------------------- ### history(ProxyHistoryFilter) - Proxy Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Get a filtered list of items in the Proxy history. ```APIDOC ## history(ProxyHistoryFilter) ### Description Extensions can implement this interface and then call `Proxy.history(ProxyHistoryFilter)` to get a filtered list of items in the Proxy history. ### Method (Method signature implies a call, specific HTTP method not applicable) ### Endpoint (Not applicable for SDK method) ### Parameters - **filter** (ProxyHistoryFilter) - Required - The filter to apply to the proxy history. ### Request Example (Not applicable for SDK method) ### Response (Returns a list of ProxyHistory items, specific type not detailed) ERROR HANDLING: (No error handling explicitly documented) ``` -------------------------------- ### BasicMenuItem.withCaption Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Creates a copy of BasicMenuItem with a new caption. ```APIDOC ## BasicMenuItem.withCaption ### Description Creates a copy of `BasicMenuItem` with a new caption. ### Method Not specified (assumed to be part of an object method call) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java BasicMenuItem newMenuItem = originalMenuItem.withCaption("New Caption"); ``` ### Response #### Success Response - **BasicMenuItem** (object) - A new BasicMenuItem object with the updated caption. ``` -------------------------------- ### Get Long Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for Long values. ```APIDOC ## longKeys() ### Description Retrieves all keys currently mapped for Long values. ### Method GET ### Endpoint /persistedObject/longKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to Long values. ``` -------------------------------- ### Get Integer Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for Integer values. ```APIDOC ## integerKeys() ### Description Retrieves all keys currently mapped for Integer values. ### Method GET ### Endpoint /persistedObject/integerKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to Integer values. ``` -------------------------------- ### execute(ExecuteOptions options, String... command) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/utilities/shell/ShellUtils.html Executes the specified command using the specified execution options. The command and its parameters are specified as separate strings. ```APIDOC ## execute(ExecuteOptions options, String... command) ### Description Executes the specified command using the specified execution options. ### Method `String` ### Parameters #### Path Parameters * **options** (ExecuteOptions) - Required - The options that control how the command is executed. * **command** (String...) - Required - The command and its parameters, specified as separate strings. ### Response #### Success Response * **(String)** - The output produced by this command. ``` -------------------------------- ### ByteArray Subarray and Length Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/core/ByteArray.html Methods for extracting subarrays and getting the length of the ByteArray. ```APIDOC ## Methods for Subarray Extraction and Length ### `length()` Returns the number of bytes stored in the `ByteArray`. ### `subArray(int startIndexInclusive, int endIndexExclusive)` Returns a new `ByteArray` containing all bytes between the start index (inclusive) and the end index (exclusive). ### `subArray(Range range)` Returns a new `ByteArray` containing all bytes within the specified `Range`. ``` -------------------------------- ### integerSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a setting for an integer value. ```APIDOC ## integerSetting (Overload 1) ### Description Creates a setting for an integer value. ### Method Factory Method ### Signature integerSetting(String name) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. ``` ```APIDOC ## integerSetting (Overload 2) ### Description Creates a setting for an integer value with a default value. ### Method Factory Method ### Signature integerSetting(String name, int defaultValue) ### Parameters #### Path Parameters - **name** (String) - Required - The name of the setting. - **defaultValue** (int) - Required - The default value for the setting. ``` ```APIDOC ## integerSetting (Overload 3) ### Description Creates a setting for an integer value with a description and name. ### Method Factory Method ### Signature integerSetting(String description, String name) ### Parameters #### Path Parameters - **description** (String) - Required - The description of the setting. - **name** (String) - Required - The name of the setting. ``` ```APIDOC ## integerSetting (Overload 4) ### Description Creates a setting for an integer value with a description, name, and default value. ### Method Factory Method ### Signature integerSetting(String description, String name, int defaultValue) ### Parameters #### Path Parameters - **description** (String) - Required - The description of the setting. - **name** (String) - Required - The name of the setting. - **defaultValue** (int) - Required - The default value for the setting. ``` -------------------------------- ### importProjectOptionsFromJson(String) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Imports project-level configuration from a JSON string. ```APIDOC ## importProjectOptionsFromJson(String) ### Description Imports project-level configuration from a JSON string. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters - **jsonString** (String) - Required - A JSON string containing the project options to import. ### Request Example None ### Response None explicitly defined, likely returns void or a status indicator. ``` -------------------------------- ### InterceptedResponse.bodyOffset() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the offset within the message where the message body begins for an intercepted response. ```APIDOC ## InterceptedResponse.bodyOffset() ### Description Gets the offset within the message where the message body begins for an intercepted response. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **int**: The offset within the message where the message body begins. ``` -------------------------------- ### Menu Creation and Configuration Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/menu/Menu.html Methods for creating new menus and updating their captions and menu items. ```APIDOC ## static Menu menu(String caption) ### Description Creates a new instance of `Menu` with a specified caption. ### Method static Menu ### Parameters #### Path Parameters - **caption** (String) - Required - The caption for the menu. ### Response #### Success Response (200) - **Menu** - A new instance of `Menu`. ## Menu withCaption(String caption) ### Description Creates a copy of `Menu` with a new caption. ### Method Menu ### Parameters #### Path Parameters - **caption** (String) - Required - The new caption. ### Response #### Success Response (200) - **Menu** - An updated copy of `Menu`. ## Menu withMenuItems(MenuItem... menuItems) ### Description Creates a copy of `Menu` with one or more instances of `MenuItem`. ### Method Menu ### Parameters #### Path Parameters - **menuItems** (MenuItem...) - Required - One or more instances of `MenuItem`. ### Response #### Success Response (200) - **Menu** - An updated copy of `Menu`. ## Menu withMenuItems(List menuItems) ### Description Creates a copy of `Menu` with a new list of `MenuItem`. ### Method Menu ### Parameters #### Path Parameters - **menuItems** (List) - Required - The new list of `MenuItem`. ### Response #### Success Response (200) - **Menu** - An updated copy of `Menu`. ``` -------------------------------- ### InterceptedRequest.bodyOffset() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the offset within the message where the message body begins for an intercepted request. ```APIDOC ## InterceptedRequest.bodyOffset() ### Description Gets the offset within the message where the message body begins for an intercepted request. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **int**: The offset within the message where the message body begins. ``` -------------------------------- ### HttpResponse.bodyOffset() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the offset within the message where the message body begins for an HTTP response. ```APIDOC ## HttpResponse.bodyOffset() ### Description Gets the offset within the message where the message body begins for an HTTP response. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **int**: The offset within the message where the message body begins. ``` -------------------------------- ### HotKey Class Methods Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/hotkey/HotKey.html This section details the methods available for the HotKey class, including how to create new hot key instances and retrieve their properties. ```APIDOC ## Class: HotKey Represents a hot key that can be defined and used within Burp Suite extensions. ### Methods #### `name()` **Description**: Returns the name of the hot key. **Returns**: - `String`: The name of the hot key. #### `hotkey()` **Description**: Returns the hot key definition string. Hotkeys are defined in the same format as within Burp's Settings. **Returns**: - `String`: The hot key string. #### `hotKey(String name, String hotkey)` **Description**: Creates a new instance of a HotKey. **Parameters**: - **`name`** (String) - Required - The name of the hot key. - **`hotkey`** (String) - Required - The hot key string. **Returns**: - `HotKey`: A new `HotKey` instance. ``` -------------------------------- ### SettingsPanelSetting - integerSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelSetting.html Methods for creating integer input fields within a Settings panel. These fields only accept integer values and can include a description and an initial default value. ```APIDOC ## SettingsPanelSetting.integerSetting ### Description Methods to create text field settings that only accept integer values. Options include setting a name, a description, and a default value. ### Method Signature `static SettingsPanelSetting integerSetting(String name)` `static SettingsPanelSetting integerSetting(String name, int defaultValue)` `static SettingsPanelSetting integerSetting(String description, String name)` `static SettingsPanelSetting integerSetting(String description, String name, int defaultValue)` ### Parameters * **name** (String) - Required - The name used to access the associated data. * **description** (String) - Optional - The description displayed for this setting. * **defaultValue** (int) - Optional - The initial value for the integer field. ``` -------------------------------- ### HttpRequest.bodyOffset() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the offset within the message where the message body begins for an HTTP request. ```APIDOC ## HttpRequest.bodyOffset() ### Description Gets the offset within the message where the message body begins for an HTTP request. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **int**: The offset within the message where the message body begins. ``` -------------------------------- ### HttpMessage.bodyOffset() Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Gets the offset within the message where the message body begins for an HTTP message. ```APIDOC ## HttpMessage.bodyOffset() ### Description Gets the offset within the message where the message body begins for an HTTP message. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **int**: The offset within the message where the message body begins. ``` -------------------------------- ### Menu Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a menu item. ```APIDOC ## Menu ### Description Creates a menu item. ### Method `menu(String caption)` ### Parameters * **caption** (String) - The caption for the menu item. ``` -------------------------------- ### Get Long List Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for Long Lists. ```APIDOC ## longListKeys() ### Description Retrieves all keys currently mapped for Long Lists. ### Method GET ### Endpoint /persistedObject/longListKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to Long Lists. ``` -------------------------------- ### SettingsPanelBuilder.withKeywords(String... keywords) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelBuilder.html Sets a collection of keywords used by the Settings search function to help users find the Settings panel. ```APIDOC ## Method: withKeywords (varargs) ### Description A set of keywords used by the Settings search function to help users find the Settings panel. ### Signature `SettingsPanelBuilder withKeywords(String... keywords)` ### Parameters * **keywords** (String...) - A variable number of keywords. ### Returns An instance of the builder. ``` -------------------------------- ### Get Integer List Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for Integer Lists. ```APIDOC ## integerListKeys() ### Description Retrieves all keys currently mapped for Integer Lists. ### Method GET ### Endpoint /persistedObject/integerListKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to Integer Lists. ``` -------------------------------- ### JsonNode Creation and Type Checking Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/utilities/json/JsonNode.html Demonstrates how to create a JsonNode from a JSON string and check its type. It also shows how to attempt conversion to specific types, highlighting potential exceptions. ```APIDOC ## Method: JsonNode.create(String json) ### Description Creates a new instance of `JsonNode` from the supplied JSON string. The type of `JsonNode` created depends on the structure of the input JSON. ### Method Static method ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Example Usage ```java JsonNode jsonNode = JsonNode.create("[]"); // The string parsed, and the underlying type will be JsonArrayNode. // Attempting to convert to the wrong type will throw an IllegalStateException // JsonObjectNode objectNode = jsonNode.asObject(); // Throws IllegalStateException JsonArrayNode arrayNode = jsonNode.asArray(); // Successful ``` ## Method: JsonNode.isArray() ### Description Checks if this `JsonNode` represents a JSON array. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a JSON array. ## Method: JsonNode.isObject() ### Description Checks if this `JsonNode` represents a JSON object. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a JSON object. ## Method: JsonNode.isString() ### Description Checks if this `JsonNode` represents a JSON string. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a JSON string. ## Method: JsonNode.isNumber() ### Description Checks if this `JsonNode` represents a JSON number. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a JSON number. ## Method: JsonNode.isBoolean() ### Description Checks if this `JsonNode` represents a JSON boolean. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a JSON boolean. ## Method: JsonNode.isNull() ### Description Checks if this `JsonNode` represents a null value. ### Method Instance method ### Returns `boolean` - True if this `JsonNode` represents a null value. ## Method: JsonNode.asArray() ### Description Attempts to return this `JsonNode` as a `JsonArrayNode`. This method is useful when you expect the node to be an array. ### Method Instance method ### Returns `JsonArrayNode` - The `JsonNode` represented as a `JsonArrayNode`. ### Throws `IllegalStateException` - If this `JsonNode` is not an array type. ## Method: JsonNode.asObject() ### Description Attempts to return this `JsonNode` as a `JsonObjectNode`. This method is useful when you expect the node to be an object. ### Method Instance method ### Returns `JsonObjectNode` - The `JsonNode` represented as a `JsonObjectNode`. ### Throws `IllegalStateException` - If this `JsonNode` is not an object type. ## Method: JsonNode.asString() ### Description Attempts to return this `JsonNode` as a `String`. This method is useful when you expect the node to be a string. ### Method Instance method ### Returns `String` - The `JsonNode` represented as a `String`. ### Throws `IllegalStateException` - If this `JsonNode` is not a string type. ## Method: JsonNode.asNumber() ### Description Attempts to return this `JsonNode` as a `Number`. This method is useful when you expect the node to be a number. ### Method Instance method ### Returns `Number` - The `JsonNode` represented as a `Number`. ### Throws `IllegalStateException` - If this `JsonNode` is not a number type. ## Method: JsonNode.asLong() ### Description Attempts to return this `JsonNode` as a `Long`. This method is useful when you expect the node to be a long integer. ### Method Instance method ### Returns `Long` - The `JsonNode` represented as a `Long`. ### Throws `IllegalStateException` - If this `JsonNode` is not a long type. ## Method: JsonNode.asBoolean() ### Description Attempts to return this `JsonNode` as a `Boolean`. This method is useful when you expect the node to be a boolean. ### Method Instance method ### Returns `Boolean` - The `JsonNode` represented as a `Boolean`. ### Throws `IllegalStateException` - If this `JsonNode` is not a boolean type. ``` -------------------------------- ### withSettings Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/index-all.html Used to add multiple `SettingsPanelSetting` instances to the Settings panel. ```APIDOC ## withSettings ### Description Used to add multiple `SettingsPanelSetting` instances to the Settings panel. ### Method `SettingsPanelBuilder.withSettings(SettingsPanelSetting...)` ### Parameters - **settings** (SettingsPanelSetting...) - The settings to add to the panel. ### Endpoint N/A (This is a method call, not an HTTP endpoint) ### Request Example ```java // Assuming settingsPanelBuilder is an instance of SettingsPanelBuilder // and setting1, setting2 are instances of SettingsPanelSetting settingsPanelBuilder.withSettings(setting1, setting2); ``` ### Response This method likely modifies the `SettingsPanelBuilder` in place or returns the builder for chaining. ``` -------------------------------- ### Get HTTP Response Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for HttpResponse values. ```APIDOC ## httpResponseKeys() ### Description Retrieves all keys currently mapped for HttpResponse values. ### Method GET ### Endpoint /persistedObject/httpResponseKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to HttpResponse values. ``` -------------------------------- ### Basic Menu Item Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a basic menu item with a caption. ```APIDOC ## basicMenuItem ### Description Creates a basic menu item with a caption. ### Method `basicMenuItem(String caption)` ### Parameters * **caption** (String) - Required - The caption text for the menu item. ``` -------------------------------- ### Get HTTP Request Keys Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/PersistedObject.html Retrieves all keys currently mapped for HttpRequest values. ```APIDOC ## httpRequestKeys() ### Description Retrieves all keys currently mapped for HttpRequest values. ### Method GET ### Endpoint /persistedObject/httpRequestKeys ### Response #### Success Response (200) - **Set** - A set of keys mapped to HttpRequest values. ``` -------------------------------- ### Get all audit issues Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/sitemap/SiteMap.html Retrieves all current audit issues for URLs in the site map. ```APIDOC ## GET /siteMap/issues ### Description Returns all the current audit issues for URLs in the site map. ### Method GET ### Endpoint /siteMap/issues ### Parameters None ### Response #### Success Response (200) - **AuditIssue** (List) - A list of audit issues. ``` -------------------------------- ### openSettingsWindow Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/UserInterface.html Opens Burp's Settings dialog. ```APIDOC ## openSettingsWindow ### Description Open Burp's Settings dialog. ### Method Signature `void openSettingsWindow()` ``` -------------------------------- ### Get Message as Byte Array Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/proxy/http/InterceptedResponse.html Retrieves the entire HTTP message as a byte array. ```APIDOC ## toByteArray ### Description Message as a byte array. ### Method N/A (Method of an object) ### Parameters N/A ### Response #### Success Response * **ByteArray** - The message as a byte array. ``` -------------------------------- ### Menu Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates a menu object with a caption. ```APIDOC ## menu ### Description Creates a menu object with a caption. ### Method `menu(String caption)` ### Parameters * **caption** (String) - Required - The caption text for the menu. ``` -------------------------------- ### Get Keyword Counts Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/proxy/http/InterceptedResponse.html Retrieves the number of times specified keywords appear in the response. ```APIDOC ## keywordCounts ### Description Retrieve the number of types given keywords appear in the response. ### Method N/A (Method of an object) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters * **keywords** (String...) - Keywords to count. ### Response #### Success Response * **List** - List of keyword counts in the order they were provided. ``` -------------------------------- ### SettingsPanelBuilder.withSettings(SettingsPanelSetting... entries) Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/ui/settings/SettingsPanelBuilder.html Adds multiple SettingsPanelSetting entries to the Settings panel. ```APIDOC ## Method: withSettings ### Description Used to add multiple `SettingsPanelSetting` to the Settings panel. ### Signature `SettingsPanelBuilder withSettings(SettingsPanelSetting... entries)` ### Parameters * **entries** (SettingsPanelSetting...) - The settings panel entries to add. ### Returns An instance of the builder. ``` -------------------------------- ### Get MIME Type Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/proxy/http/InterceptedResponse.html Obtains the MIME type of the response as determined by Burp Suite. ```APIDOC ## mimeType ### Description Obtains the MIME type of the response, as determined by Burp Suite. ### Method N/A (Method of an object) ### Parameters N/A ### Response #### Success Response * **MimeType** - The MIME type. ``` -------------------------------- ### Long Preferences Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/persistence/Preferences.html Methods for getting, setting, and deleting long values associated with keys. ```APIDOC ## getLong ### Description Retrieves the `Long` value associated with the specified key. ### Method getLong ### Parameters #### Path Parameters - **key** (string) - Required - The key whose associated value is to be returned. ### Response #### Success Response (200) - **value** (Long) - The value associated with the specified key, or `null` if no mapping exists. ## setLong ### Description Associates the specified `long` with the specified key. If the map previously contained a mapping for the key, the old value is replaced. ### Method setLong ### Parameters #### Path Parameters - **key** (string) - Required - The key with which the specified value is to be associated. - **value** (long) - Required - The value to be associated with the specified key. If `null`, any existing mapping for the key is removed. ## deleteLong ### Description Removes the mapping from the specified key to the `Long` value. ### Method deleteLong ### Parameters #### Path Parameters - **key** (string) - Required - The key whose mapping is to be deleted. ## longKeys ### Description Retrieves all keys currently mapped for `Long` values. ### Method longKeys ### Response #### Success Response (200) - **keys** (Set) - A set of keys mapped for `Long` values. ``` -------------------------------- ### SettingsPanelSetting Source: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html Creates various types of settings for the settings panel. ```APIDOC ## SettingsPanelSetting ### Description Creates settings for the settings panel. ### Methods * `integerSetting(String name)` * `integerSetting(String name, int defaultValue)` * `integerSetting(String description, String name)` * `integerSetting(String description, String name, int defaultValue)` * `listSetting(String name, String... values)` * `listSetting(String description, String name, List values, String defaultValue)` * `listSetting(String name, List values, String defaultValue)` ### Parameters * **name** (String) - The name of the setting. * **description** (String) - The description of the setting. * **defaultValue** (int or String) - The default value for the setting. * **values** (String... or List) - The possible values for the setting. ```