======================== CODE SNIPPETS ======================== TITLE: Get Command Line Arguments - Java DESCRIPTION: Retrieves the command line arguments that were passed to Burp Suite when it was started. This can be useful for extensions that need to know how Burp was launched. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_1 LANGUAGE: Java CODE: ``` List commandLineArguments() ``` ---------------------------------------- TITLE: Get Command Line Arguments Burp Suite Java DESCRIPTION: Retrieves the command-line arguments that were passed to Burp Suite when it was started. Returns a list of strings. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_13 LANGUAGE: Java CODE: ``` List commandLineArguments() ``` ---------------------------------------- TITLE: Example JSON Structure for Location Syntax DESCRIPTION: This JSON object is used as an example to demonstrate the location syntax for navigating and accessing elements within a JSON structure using the JsonUtils interface. The examples provided in the text show how to select specific values or array elements. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/json/JsonUtils.html#_snippet_0 LANGUAGE: JSON CODE: ``` { "account": [ { "user": { "name": "Peter Wiener", "addresses": [ "Address 1", "Address 2", "Address 3" ] } }, { "user": { "name": "Carlos Montoya", "addresses": [ "Address 4", "Address 5", "Address 6" ] } } ] } ``` ---------------------------------------- TITLE: Start a Crawl in Burp Scanner Tool DESCRIPTION: This method can be used to start a crawl in the Burp Scanner tool. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/Scanner.html#_snippet_3 LANGUAGE: APIDOC CODE: ``` Crawl startCrawl(CrawlConfiguration crawlConfiguration) crawlConfiguration: The configuration for the crawl. Returns: The Crawl started in the Burp Scanner tool. ``` ---------------------------------------- TITLE: Obtaining New RequestOptions Instance - Burp Montoya API Java DESCRIPTION: Provides a static factory method to get a new, default instance of the RequestOptions interface. This is the starting point for building custom request options. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/RequestOptions.html#_snippet_10 LANGUAGE: Java CODE: ``` static RequestOptions requestOptions() ``` ---------------------------------------- TITLE: Getting Start Index - Range - Java DESCRIPTION: Retrieves the inclusive start index of the range represented by this object. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/Range.html#_snippet_0 LANGUAGE: Java CODE: ``` int startIndexInclusive() ``` ---------------------------------------- TITLE: Get Response Selection in Java DESCRIPTION: Provides access to user-selected content and its start and end points from the HTTP response. Returns a `Selection` object representing the selected content. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/RequestResponseSelection.html#_snippet_1 LANGUAGE: Java CODE: ``` Selection responseSelection() ``` ---------------------------------------- TITLE: Get Request Selection in Java DESCRIPTION: Provides access to user-selected content and its start and end points from the HTTP request. Returns a `Selection` object representing the selected content. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/RequestResponseSelection.html#_snippet_0 LANGUAGE: Java CODE: ``` Selection requestSelection() ``` ---------------------------------------- TITLE: JavaDoc API Search Query Examples DESCRIPTION: Illustrates various search query patterns for the JavaDoc API documentation, including partial names, camelCase abbreviations, and multiple term searches. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/help-doc.html#_snippet_0 LANGUAGE: APIDOC CODE: ``` "j.l.obj" matches "java.lang.Object" ``` LANGUAGE: APIDOC CODE: ``` "InpStr" matches "java.io.InputStream" ``` LANGUAGE: APIDOC CODE: ``` "math exact long" matches "java.lang.Math.absExact(long)" ``` ---------------------------------------- TITLE: Start an Audit in Burp Scanner Tool DESCRIPTION: This method can be used to start an audit in the Burp Scanner tool. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/Scanner.html#_snippet_4 LANGUAGE: APIDOC CODE: ``` Audit startAudit(AuditConfiguration auditConfiguration) auditConfiguration: The configuration for the audit. Returns: The Audit started in the Burp Scanner tool. ``` ---------------------------------------- TITLE: Get Selection Offsets - WebSocketEditorEvent - Java DESCRIPTION: Retrieves the start and end offsets of the user's current selection in the editor. Returns an `Optional` which will be empty if no selection has been made. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/contextmenu/WebSocketEditorEvent.html#_snippet_4 LANGUAGE: Java CODE: ``` Optional selectionOffsets() ``` ---------------------------------------- TITLE: Initialize Documentation Scripts - JavaScript DESCRIPTION: Initializes variables and loads scripts necessary for rendering the documentation page. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/package-summary.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Initialize Documentation Scripts - JavaScript DESCRIPTION: This JavaScript snippet appears to be part of the client-side setup for the documentation page, setting a relative path and loading necessary scripts for navigation or functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/collaborator/InteractionType.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Get Inclusive Start Status Code (Java) DESCRIPTION: Returns the inclusive start status code of the range or class represented by this object. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/StatusCodeClass.html#_snippet_18 LANGUAGE: java CODE: ``` public int startStatusCodeInclusive() ``` ---------------------------------------- TITLE: Initialize Documentation Scripts - JavaScript DESCRIPTION: This JavaScript snippet is part of the documentation's infrastructure, setting the path to the root directory and loading necessary scripts for the page functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Get HttpRequestTemplate Insertion Point Offsets - Java DESCRIPTION: Returns a list of Range objects representing the defined insertion point offsets within the request template for an Intruder attack. Each Range specifies a start and end index. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/intruder/HttpRequestTemplate.html#_snippet_1 LANGUAGE: Java CODE: ``` List insertionPointOffsets() ``` ---------------------------------------- TITLE: Initialize Documentation Scripts - JavaScript DESCRIPTION: Initializes variables and loads scripts required for the documentation page navigation and functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logging/package-summary.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Getting Inclusive Start Status Code DESCRIPTION: Returns the inclusive start status code for the range defined by this status code class. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/StatusCodeClass.html#_snippet_8 LANGUAGE: Java CODE: ``` int startStatusCodeInclusive() ``` ---------------------------------------- TITLE: Output of toJsonString() Example - Text DESCRIPTION: The console output produced by calling `toJsonString()` on the `JsonArrayNode` created in the previous example. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/json/JsonNode.html#_snippet_3 LANGUAGE: Text CODE: ``` [ "foo", 2.5 ] ``` ---------------------------------------- TITLE: Initialize Documentation Path (JavaScript) DESCRIPTION: Initializes a variable `pathtoroot` used for constructing relative paths within the documentation site and calls a function `loadScripts` to load necessary scripts for the page. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/comparer/package-tree.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Initialize Documentation Navigation - JavaScript DESCRIPTION: This JavaScript snippet is used in the generated API documentation HTML files. It sets the relative path to the documentation root directory and loads necessary scripts for navigation and functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ai/chat/Prompt.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Initialize Documentation Scripts - JavaScript DESCRIPTION: A small JavaScript snippet likely used internally by the documentation page to set the root path and load necessary scripts. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/extension/Extension.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Initialize Documentation Path JavaScript DESCRIPTION: Initializes the root path for documentation links and loads necessary scripts for navigation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/json/JsonParseException.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Creating SiteMapFilter by Prefix Burp Montoya API Java DESCRIPTION: Creates a SiteMapFilter that matches entries in the Burp Site Map whose URL starts with the specified prefix. Takes the URL prefix string as input. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_125 LANGUAGE: Java CODE: ``` SiteMapFilter prefixFilter(String prefix) ``` ---------------------------------------- TITLE: Initialize Documentation Path (JavaScript) DESCRIPTION: This small JavaScript snippet is part of the generated API documentation. It sets the relative path to the documentation root directory and loads necessary scripts for navigation and page functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/organizer/package-tree.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Set Bytes starting at Index (ByteArray) - Java DESCRIPTION: Sets a sequence of bytes within the ByteArray starting at the specified index using the contents of another ByteArray object. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_23 LANGUAGE: Java CODE: ``` void setBytes(int index, ByteArray byteArray) ``` ---------------------------------------- TITLE: Get Editor Caret Position (Java) DESCRIPTION: Retrieves the current index of the caret (text cursor) within the editor's content. This indicates the insertion point or the start of a selection. Returns the zero-based index of the caret position. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/Editor.html#_snippet_2 LANGUAGE: Java CODE: ``` int caretPosition() ``` ---------------------------------------- TITLE: Loading Documentation Scripts (JavaScript) DESCRIPTION: Initializes a variable for the root path of the documentation and calls a function to load necessary scripts. This is typically part of the generated documentation's navigation or display logic. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/package-summary.html#_snippet_1 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Set Bytes starting at Index (byte array) - Java DESCRIPTION: Sets a sequence of bytes within the ByteArray starting at the specified index using a byte array or sequence. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_21 LANGUAGE: Java CODE: ``` void setBytes(int index, byte... data) ``` ---------------------------------------- TITLE: Load Documentation Scripts (JavaScript) DESCRIPTION: This JavaScript snippet is typically used in generated documentation to set the root path and load necessary scripts for navigation and page functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/organizer/package-summary.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Get Created WebSocket (Java) DESCRIPTION: Retrieves the created ExtensionWebSocket instance if the creation attempt was successful. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/extension/ExtensionWebSocketCreation.html#_snippet_1 LANGUAGE: Java CODE: ``` Optional webSocket() ``` ---------------------------------------- TITLE: Getting HTTP Message Body Offset in Java DESCRIPTION: Returns the offset within the HTTP message where the message body begins. This integer value indicates the starting position of the body content within the full message byte array. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/HttpMessage.html#_snippet_1 LANGUAGE: Java CODE: ``` int bodyOffset() ``` ---------------------------------------- TITLE: Import Project Options Burp Suite Java DESCRIPTION: Imports a new project-level configuration from a JSON string. This format is compatible with the Burp UI save/load functionality. Partial configurations are accepted, leaving unspecified settings unchanged. User-level options in the input are ignored. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_10 LANGUAGE: Java CODE: ``` void importProjectOptionsFromJson(String json) ``` ---------------------------------------- TITLE: HttpTransformation Enum Constant - TOGGLE_METHOD - Java DESCRIPTION: Represents a transformation that toggles the HTTP request method between GET and POST. Applying this transformation will convert a GET request to POST or a POST request to GET. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/requests/HttpTransformation.html#_snippet_0 LANGUAGE: Java CODE: ``` TOGGLE_METHOD ``` ---------------------------------------- TITLE: Creating Default PromptOptions (Java) DESCRIPTION: Provides a static factory method to create a default instance of the `PromptOptions` interface. This method can be used to obtain a basic configuration before applying specific options like temperature. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ai/chat/PromptOptions.html#_snippet_1 LANGUAGE: Java CODE: ``` static PromptOptions promptOptions() ``` ---------------------------------------- TITLE: Get CompressionUtils Instance (Java) DESCRIPTION: Returns an instance of the CompressionUtils interface, providing methods for data compression and decompression. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_2 LANGUAGE: Java CODE: ``` CompressionUtils compressionUtils() ``` ---------------------------------------- TITLE: Creating Marker from Indices Burp Montoya API Java DESCRIPTION: Creates a Marker object representing a specific range within a message using explicit start and end indices. Takes the inclusive start and exclusive end indices. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_127 LANGUAGE: Java CODE: ``` Marker marker(int startIndexInclusive, int endIndexExclusive) ``` ---------------------------------------- TITLE: Initialize Documentation Path - JavaScript DESCRIPTION: Initializes the relative path to the documentation root and loads necessary scripts for navigation or display within the generated API documentation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/MessageReceivedAction.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Getting Tool Source from WebSocketCreated (Java) DESCRIPTION: Identifies which Burp Suite tool (e.g., Proxy, Repeater) was responsible for creating the WebSocket. Useful for understanding the context of the connection. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/WebSocketCreated.html#_snippet_2 LANGUAGE: Java CODE: ``` toolSource() ``` ---------------------------------------- TITLE: Import Project Options from JSON - Java DESCRIPTION: Imports a new project-level configuration into Burp Suite from a provided JSON string. This allows extensions to programmatically change project settings. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_4 LANGUAGE: Java CODE: ``` void importProjectOptionsFromJson(String json) ``` ---------------------------------------- TITLE: Get Request Method (Java) DESCRIPTION: Retrieves the HTTP method (e.g., GET, POST) for the request. Throws MalformedRequestException if the request is malformed. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/http/InterceptedRequest.html#_snippet_10 LANGUAGE: Java CODE: ``` String method() ``` ---------------------------------------- TITLE: Import User Options Burp Suite Java DESCRIPTION: Imports a new user-level configuration from a JSON string. This format is compatible with the Burp UI save/load functionality. Partial configurations are accepted, leaving unspecified settings unchanged. Project-level options in the input are ignored. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_12 LANGUAGE: Java CODE: ``` void importUserOptionsFromJson(String json) ``` ---------------------------------------- TITLE: Get Upgrade Request - ProxyWebSocketMessage - Java DESCRIPTION: Returns the HTTP request that initiated the WebSocket connection. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/ProxyWebSocketMessage.html#_snippet_7 LANGUAGE: Java CODE: ``` HttpRequest upgradeRequest() ``` ---------------------------------------- TITLE: Get Request - ExtensionProvidedHttpRequestEditor - Java DESCRIPTION: Returns an instance of HttpRequest derived from the content of the HTTP request editor. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/extension/ExtensionProvidedHttpRequestEditor.html#_snippet_1 LANGUAGE: Java CODE: ``` HttpRequest getRequest() ``` ---------------------------------------- TITLE: Set Bytes starting at Index (int array) - Java DESCRIPTION: Sets a sequence of bytes within the ByteArray starting at the specified index using an integer array or sequence after narrowing primitive conversion to bytes. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_22 LANGUAGE: Java CODE: ``` void setBytes(int index, int... data) ``` ---------------------------------------- TITLE: Burp Montoya API: HttpService Creation Methods DESCRIPTION: Documentation for the static `httpService` methods within the Burp Suite Montoya API, used to create new `HttpService` instances with various parameters for host, port, and security. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/HttpService.html#_snippet_1 LANGUAGE: APIDOC CODE: ``` static HttpService httpService(String host, boolean secure) Description: Create a new instance of HttpService. Parameters: host (String): The hostname or IP address for the service. secure (boolean): True if a secure connection is to be used. Returns: A new HttpService instance. ``` LANGUAGE: APIDOC CODE: ``` static HttpService httpService(String host, int port, boolean secure) Description: Create a new instance of HttpService. Parameters: host (String): The hostname or IP address for the service. port (int): The port number for the service. secure (boolean): True if a secure connection is to be used. Returns: A new HttpService instance. ``` ---------------------------------------- TITLE: JavaScript Documentation Helper DESCRIPTION: A small JavaScript snippet likely used within the documentation page itself, possibly for setting a root path or loading other necessary scripts for rendering the documentation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/sitemap/package-summary.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Getting Header Value by Name in Java DESCRIPTION: Retrieves the value of the first header with the specified name from the HTTP message as a String. This is a convenient way to get a header's value without dealing with the HttpHeader object directly. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/HttpMessage.html#_snippet_10 LANGUAGE: Java CODE: ``` String headerValue(String name) ``` ---------------------------------------- TITLE: Get Menu Items (Java) DESCRIPTION: Retrieves the list of `MenuItem` instances that will be displayed within this menu. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/Menu.html#_snippet_2 LANGUAGE: Java CODE: ``` List menuItems() ``` ---------------------------------------- TITLE: Export Project Options as JSON - Java DESCRIPTION: Exports the current project-level configuration settings from Burp Suite in JSON format. Optional paths can be provided to export only specific sections of the configuration. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_2 LANGUAGE: Java CODE: ``` String exportProjectOptionsAsJson(String... paths) ``` ---------------------------------------- TITLE: Package Declaration for burp.api.montoya.ai (Java) DESCRIPTION: This snippet declares the `burp.api.montoya.ai` package, which is part of the Burp Suite Montoya API and serves as the entry point for AI-related functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ai/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.ai ``` ---------------------------------------- TITLE: Create Subarray by Index in ByteArray (Java) DESCRIPTION: Creates a new ByteArray containing a subset of bytes from the original ByteArray, specified by inclusive start and exclusive end indices. Parameters: startIndexInclusive - The inclusive start index of the range. endIndexExclusive - The exclusive end index of the range. Returns: ByteArray containing all bytes in the specified range. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_26 LANGUAGE: Java CODE: ``` ByteArray subArray(int startIndexInclusive, int endIndexExclusive) ``` ---------------------------------------- TITLE: Get HTTP Request (Java) DESCRIPTION: Returns the captured HTTP request message. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerCaptureHttpRequestResponse.html#_snippet_7 LANGUAGE: Java CODE: ``` HttpRequest request() ``` ---------------------------------------- TITLE: Get HttpParameter Value in Java DESCRIPTION: Returns the value of the HTTP parameter. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/params/HttpParameter.html#_snippet_6 LANGUAGE: Java CODE: ``` String value() ``` ---------------------------------------- TITLE: Initialize Documentation Page Scripts - JavaScript DESCRIPTION: Initializes variables and loads necessary scripts for the HTML documentation page navigation and functionality. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/RandomUtils.CharacterSet.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Creating Crawl Configuration Burp Montoya API Java DESCRIPTION: Creates a CrawlConfiguration object using a variable number of seed URLs (varargs) to define the starting points for a crawl. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_148 LANGUAGE: Java CODE: ``` CrawlConfiguration crawlConfiguration(String... seedUrls) ``` ---------------------------------------- TITLE: Java Package Declaration for burp.api.montoya.ui DESCRIPTION: This code snippet shows the standard Java package declaration for the `burp.api.montoya.ui` package, indicating its location within the Burp Suite Montoya API structure. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.ui ``` ---------------------------------------- TITLE: Get HttpParameter Name in Java DESCRIPTION: Returns the name of the HTTP parameter. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/params/HttpParameter.html#_snippet_2 LANGUAGE: Java CODE: ``` String name() ``` ---------------------------------------- TITLE: Get Menu Caption (Java) DESCRIPTION: Retrieves the caption string displayed for this menu. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/Menu.html#_snippet_0 LANGUAGE: Java CODE: ``` String caption() ``` ---------------------------------------- TITLE: Export Project Options Burp Suite Java DESCRIPTION: Exports the current project-level configuration of Burp Suite in JSON format. Optionally, specify paths to include only specific sections. Returns the configuration as a JSON string. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_9 LANGUAGE: Java CODE: ``` String exportProjectOptionsAsJson(String... paths) ``` ---------------------------------------- TITLE: Getting All Response Cookies Java DESCRIPTION: Obtains a list of all HTTP cookies set in the response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_9 LANGUAGE: Java CODE: ``` List cookies() ``` ---------------------------------------- TITLE: Initialize Search Scripts - JavaScript DESCRIPTION: Initializes variables and loads necessary scripts for the JavaDoc search functionality. Sets the root path for relative URLs and calls a function to dynamically load scripts into the document. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/search.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "./"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Create Prefix-Based Site Map Filter (Java) DESCRIPTION: Use this static method to obtain a SiteMapFilter instance that matches site map nodes whose URLs start with the specified case-sensitive prefix. Passing null matches all nodes. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/sitemap/SiteMapFilter.html#_snippet_1 LANGUAGE: Java CODE: ``` static SiteMapFilter prefixFilter(String prefix) ``` ---------------------------------------- TITLE: Declaring the burp.api.montoya.burpsuite Package (Java) DESCRIPTION: This snippet shows the standard Java declaration for the burp.api.montoya.burpsuite package. This package serves as the entry point for accessing core Burp Suite application functionalities via the Montoya API. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.burpsuite ``` ---------------------------------------- TITLE: Getting Response Body String Java DESCRIPTION: Retrieves the body of the HTTP response as a String. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_5 LANGUAGE: Java CODE: ``` String bodyToString() ``` ---------------------------------------- TITLE: Getting Response Body ByteArray Java DESCRIPTION: Retrieves the body of the HTTP response as a ByteArray. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_3 LANGUAGE: Java CODE: ``` ByteArray body() ``` ---------------------------------------- TITLE: Create New PersistedObject Instance (Burp Montoya API) DESCRIPTION: Creates a new instance of PersistedObject. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/persistence/PersistedObject.html#_snippet_38 LANGUAGE: APIDOC CODE: ``` static PersistedObject persistedObject() ``` ---------------------------------------- TITLE: Get Message Payload (Java) DESCRIPTION: Returns the text content (payload) of the WebSocket message. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/TextMessageAction.html#_snippet_1 LANGUAGE: Java CODE: ``` String payload() ``` ---------------------------------------- TITLE: Get WebSocket ID - ProxyWebSocketMessage - Java DESCRIPTION: Returns a unique identifier for the WebSocket connection. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/ProxyWebSocketMessage.html#_snippet_8 LANGUAGE: Java CODE: ``` int webSocketId() ``` ---------------------------------------- TITLE: Creating WebSocket with Service and Path Burp Montoya Java DESCRIPTION: Creates a new WebSocket connection using the specified HTTP service and path for the upgrade request. Returns an `ExtensionWebSocketCreation` result. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/WebSockets.html#_snippet_1 LANGUAGE: Java CODE: ``` ExtensionWebSocketCreation createWebSocket(HttpService service, String path) ``` ---------------------------------------- TITLE: Get Annotations - Java DESCRIPTION: Retrieves the Annotations object containing notes and highlights for the request/response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerHttpRequestResponse.html#_snippet_3 LANGUAGE: Java CODE: ``` Annotations annotations() ``` ---------------------------------------- TITLE: Create Menu Copy with Menu Items (List) (Java) DESCRIPTION: Creates a copy of the current `Menu` instance, replacing its menu items with the provided list of `MenuItem`. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/Menu.html#_snippet_5 LANGUAGE: Java CODE: ``` Menu withMenuItems(List menuItems) ``` ---------------------------------------- TITLE: Get HTTP Response - Java DESCRIPTION: Retrieves the HttpResponse message associated with this logger entry. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerHttpRequestResponse.html#_snippet_1 LANGUAGE: Java CODE: ``` HttpResponse response() ``` ---------------------------------------- TITLE: Import User Options from JSON - Java DESCRIPTION: Imports a new user-level configuration into Burp Suite from a provided JSON string. This allows extensions to programmatically change user settings. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_5 LANGUAGE: Java CODE: ``` void importUserOptionsFromJson(String json) ``` ---------------------------------------- TITLE: Getting Upgrade Request from WebSocketCreated (Java) DESCRIPTION: Retrieves the HTTP upgrade request that initiated the creation of this WebSocket. This allows inspection of the request that led to the WebSocket connection. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/WebSocketCreated.html#_snippet_1 LANGUAGE: Java CODE: ``` upgradeRequest() ``` ---------------------------------------- TITLE: Get HTTP Request - Java DESCRIPTION: Retrieves the HttpRequest message associated with this logger entry. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerHttpRequestResponse.html#_snippet_0 LANGUAGE: Java CODE: ``` HttpRequest request() ``` ---------------------------------------- TITLE: HttpService Interface API Documentation DESCRIPTION: Detailed API documentation for the `HttpService` interface, including its methods, parameters, return types, and descriptions. This interface represents an HTTP service to which requests can be sent. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/HttpService.html#_snippet_0 LANGUAGE: APIDOC CODE: ``` Interface HttpService: Description: Burp HTTP service providing details about an HTTP service, to which HTTP requests can be sent. Methods: host(): String Description: Returns the hostname or IP address for the service. port(): int Description: Returns the port number for the service. secure(): boolean Description: Returns true if a secure protocol is used for the connection, false otherwise. ipAddress(): String Description: Dynamically resolve the host to an IP address. Returns: The IP address of the host. toString(): String Description: Returns the String representation of the service. Overrides: Object.toString() static httpService(baseUrl: String): HttpService Description: Create a new instance of HttpService. Parameters: baseUrl: String - The URL for the service. Returns: A new HttpService instance. static httpService(host: String, secure: boolean): HttpService Description: Create a new instance of HttpService. Parameters: host: String secure: boolean static httpService(host: String, port: int, secure: boolean): HttpService Description: Create a new instance of HttpService. Parameters: host: String port: int secure: boolean ``` ---------------------------------------- TITLE: Get HTTP Response (Java) DESCRIPTION: Returns the captured HTTP response message. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerCaptureHttpRequestResponse.html#_snippet_8 LANGUAGE: Java CODE: ``` HttpResponse response() ``` ---------------------------------------- TITLE: Package Declaration (Java) DESCRIPTION: Declares the Java package 'burp.api.montoya.organizer', which groups related classes and interfaces for interacting with the Burp Suite Organizer tool via the Montoya API. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/organizer/package-summary.html#_snippet_1 LANGUAGE: Java CODE: ``` package burp.api.montoya.organizer ``` ---------------------------------------- TITLE: ProxyWebSocketCreation Interface DESCRIPTION: Provides information about a proxy web socket that is being created. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_161 LANGUAGE: APIDOC CODE: ``` interface ProxyWebSocketCreation ``` ---------------------------------------- TITLE: Getting Response Cookie By Name Java DESCRIPTION: Retrieves a specific HTTP cookie from the response by its name. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_8 LANGUAGE: Java CODE: ``` Cookie cookie(String name) ``` ---------------------------------------- TITLE: Java Package Declaration DESCRIPTION: Declares the Java package 'burp.api.montoya.sitemap', indicating the namespace for the classes and interfaces related to Burp's site map functionality within the Montoya API. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/sitemap/package-summary.html#_snippet_1 LANGUAGE: Java CODE: ``` package burp.api.montoya.sitemap ``` ---------------------------------------- TITLE: Getting Response Annotations Java DESCRIPTION: Retrieves the Annotations object associated with the received HTTP response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_1 LANGUAGE: Java CODE: ``` Annotations annotations() ``` ---------------------------------------- TITLE: Obtaining RequestOptions Instance Java DESCRIPTION: Use this static method to obtain a new instance of the RequestOptions interface. This is the starting point for configuring request options. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/RequestOptions.html#_snippet_0 LANGUAGE: Java CODE: ``` static RequestOptions requestOptions() ``` ---------------------------------------- TITLE: Get CryptoUtils Instance (Java) DESCRIPTION: Returns an instance of the CryptoUtils interface, providing cryptographic utility functions. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_3 LANGUAGE: Java CODE: ``` CryptoUtils cryptoUtils() ``` ---------------------------------------- TITLE: StringUtils Interface DESCRIPTION: No description SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_200 LANGUAGE: APIDOC CODE: ``` interface StringUtils ``` ---------------------------------------- TITLE: Getting the Range of a Marker in Java DESCRIPTION: Retrieves the Range object associated with this marker. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/Marker.html#_snippet_0 LANGUAGE: Java CODE: ``` Range range() ``` ---------------------------------------- TITLE: Getting the Tool Source (Java) DESCRIPTION: Retrieves the source Burp tool that is requesting the editor. This method returns a `ToolSource` object providing information about the tool. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/extension/EditorCreationContext.html#_snippet_0 LANGUAGE: Java CODE: ``` ToolSource toolSource() ``` ---------------------------------------- TITLE: Get WebSocket Creation Status (Java) DESCRIPTION: Retrieves the status of the WebSocket creation attempt, indicating success or failure. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/extension/ExtensionWebSocketCreation.html#_snippet_0 LANGUAGE: Java CODE: ``` ExtensionWebSocketCreationStatus status() ``` ---------------------------------------- TITLE: Get ByteArray Length - Java DESCRIPTION: Returns the number of bytes currently stored in the ByteArray. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_24 LANGUAGE: Java CODE: ``` int length() ``` ---------------------------------------- TITLE: HttpHeader Interface API Reference DESCRIPTION: Detailed API documentation for the `HttpHeader` interface, including its static factory methods and instance methods for accessing header components. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/HttpHeader.html#_snippet_0 LANGUAGE: APIDOC CODE: ``` Interface HttpHeader: Description: Burp HTTP header able to retrieve to hold details about an HTTP header. Methods: - name: name() Signature: String name() Description: Returns the name of the header. Returns: Type: String Description: The name of the header. - name: value() Signature: String value() Description: Returns the value of the header. Returns: Type: String Description: The value of the header. - name: toString() Signature: String toString() Description: Returns the String representation of the header. Overrides: Object.toString() Returns: Type: String Description: The String representation of the header. - name: httpHeader(String name, String value) Signature: static HttpHeader httpHeader(String name, String value) Description: Create a new instance of HttpHeader from name and value. Parameters: - name: name Type: String Description: The name of the header. - name: value Type: String Description: The value of the header. Returns: Type: HttpHeader Description: A new HttpHeader instance. - name: httpHeader(String header) Signature: static HttpHeader httpHeader(String header) Description: Create a new instance of HttpHeader from a String header representation. It will be parsed according to the HTTP/1.1 specification for headers. Parameters: - name: header Type: String Description: The String header representation. Returns: Type: HttpHeader Description: A new HttpHeader instance. ``` ---------------------------------------- TITLE: RequestResponseSelection Interface DESCRIPTION: Provides access to user-selected content and its start and end points within HTTP requests and responses. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_175 LANGUAGE: APIDOC CODE: ``` interface RequestResponseSelection ``` ---------------------------------------- TITLE: Access Task Execution Engine - Java DESCRIPTION: Provides access to the `TaskExecutionEngine`, which allows extensions to run tasks asynchronously within Burp Suite. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_7 LANGUAGE: Java CODE: ``` TaskExecutionEngine taskExecutionEngine() ``` ---------------------------------------- TITLE: Creating HTTP Response Editor in Burp Montoya API (Java) DESCRIPTION: Creates a new instance of Burp's HTTP response editor for use within an extension's UI. Parameters: `options` - Optional options to apply to the editor. Returns: An instance of the `HttpResponseEditor` interface. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/UserInterface.html#_snippet_20 LANGUAGE: Java CODE: ``` HttpResponseEditor createHttpResponseEditor(EditorOptions... options) ``` ---------------------------------------- TITLE: Getting Payload from BinaryMessage Java DESCRIPTION: Retrieves the binary payload of the WebSocket message. The payload is returned as a ByteArray. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/BinaryMessage.html#_snippet_0 LANGUAGE: Java CODE: ``` payload() ``` ---------------------------------------- TITLE: Getting All CompressionType Constants - Java DESCRIPTION: Returns an array containing all constants of the CompressionType enum in their declared order. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/CompressionType.html#_snippet_3 LANGUAGE: Java CODE: ``` public static CompressionType[] values() ``` ---------------------------------------- TITLE: Create New Menu (Java) DESCRIPTION: Creates a new instance of the `Menu` interface with the specified caption. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/Menu.html#_snippet_1 LANGUAGE: Java CODE: ``` static Menu menu(String caption) ``` ---------------------------------------- TITLE: Getting Contents WebSocketMessageEditor Java DESCRIPTION: Returns the current contents of the WebSocket message editor as a ByteArray. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/WebSocketMessageEditor.html#_snippet_0 LANGUAGE: Java CODE: ``` burp.api.montoya.core.ByteArray getContents() ``` ---------------------------------------- TITLE: Creating BasicMenuItem in Java DESCRIPTION: This static method creates a new instance of `BasicMenuItem`. It requires a string caption for the menu item. The method returns the newly created `BasicMenuItem` object. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/menu/BasicMenuItem.html#_snippet_0 LANGUAGE: Java CODE: ``` static BasicMenuItem basicMenuItem(String caption) ``` ---------------------------------------- TITLE: Get Caption - ExtensionProvidedHttpRequestEditor - Java DESCRIPTION: Returns the caption for the custom editor tab. No specific description provided in the source text. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/extension/ExtensionProvidedHttpRequestEditor.html#_snippet_0 LANGUAGE: Java CODE: ``` String caption() ``` ---------------------------------------- TITLE: Java Package Declaration DESCRIPTION: This snippet shows the standard Java package declaration for the burp.api.montoya.project package. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/project/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.project ``` ---------------------------------------- TITLE: Get Audit Issues in Java DESCRIPTION: Retrieves the list of audit issues found during the scan associated with this AuditResult. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/AuditResult.html#_snippet_0 LANGUAGE: Java CODE: ``` List auditIssues() ``` ---------------------------------------- TITLE: Get WebSocket Upgrade Response (Java) DESCRIPTION: Retrieves the HTTP response received during the WebSocket upgrade process, if available. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/extension/ExtensionWebSocketCreation.html#_snippet_2 LANGUAGE: Java CODE: ``` Optional upgradeResponse() ``` ---------------------------------------- TITLE: Follow User Rules Initial Request with Annotations - Burp Montoya API - Java DESCRIPTION: Represents a method call to instruct the Burp Proxy to process an initial intercepted HTTP request, including annotations, according to user-defined rules. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_51 LANGUAGE: Java CODE: ``` requestInitialInterceptResultFollowUserRules(burp.api.montoya.http.message.requests.HttpRequest request, burp.api.montoya.core.Annotations annotations) ``` ---------------------------------------- TITLE: Get Response Annotations (Java) DESCRIPTION: This method retrieves the annotations associated with the current response after any modifications have been applied by the extension. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/http/ProxyResponseReceivedAction.html#_snippet_1 LANGUAGE: Java CODE: ``` annotations() ``` ---------------------------------------- TITLE: Export User Options as JSON - Java DESCRIPTION: Exports the current user-level configuration settings from Burp Suite in JSON format. Optional paths can be provided to export only specific sections of the configuration. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_3 LANGUAGE: Java CODE: ``` String exportUserOptionsAsJson(String... paths) ``` ---------------------------------------- TITLE: Get Message Time - ProxyWebSocketMessage - Java DESCRIPTION: Returns the timestamp when the WebSocket message was intercepted by the Proxy. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/ProxyWebSocketMessage.html#_snippet_6 LANGUAGE: Java CODE: ``` ZonedDateTime time() ``` ---------------------------------------- TITLE: Package Declaration - burp.api.montoya.repeater - Java DESCRIPTION: Declares the Java package `burp.api.montoya.repeater`, which contains interfaces and classes for interacting with the Burp Suite Repeater tool via the Montoya API. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/repeater/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.repeater ``` ---------------------------------------- TITLE: Get MenuBar Instance - Burp Montoya API - Java DESCRIPTION: Returns the Burp Suite MenuBar interface, allowing extensions to interact with or add items to the main application menu bar. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/UserInterface.html#_snippet_9 LANGUAGE: Java CODE: ``` MenuBar menuBar() ``` ---------------------------------------- TITLE: Get Original Payload - ProxyWebSocketMessage - Java DESCRIPTION: Returns the original payload of the WebSocket message before any modifications. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/proxy/ProxyWebSocketMessage.html#_snippet_5 LANGUAGE: Java CODE: ``` ByteArray payload() ``` ---------------------------------------- TITLE: JavaScript Documentation Helper DESCRIPTION: A small JavaScript snippet used by the documentation page itself, likely for loading scripts or managing paths. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/package-summary.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Get HTTP Service - Java DESCRIPTION: Retrieves the HttpService object detailing the service the request was sent to. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerHttpRequestResponse.html#_snippet_2 LANGUAGE: Java CODE: ``` HttpService httpService() ``` ---------------------------------------- TITLE: SettingsPanel Interface DESCRIPTION: Represents a custom settings panel displayed in Burp's Settings dialog. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_192 LANGUAGE: APIDOC CODE: ``` interface SettingsPanel ``` ---------------------------------------- TITLE: Get Request Options - Burp Montoya API - Java DESCRIPTION: Represents a method call to retrieve the available options for configuring an HTTP request. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_55 LANGUAGE: Java CODE: ``` requestOptions() ``` ---------------------------------------- TITLE: Get Page Title (Java) DESCRIPTION: Retrieves the page title extracted from the HTTP response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerCaptureHttpRequestResponse.html#_snippet_6 LANGUAGE: Java CODE: ``` String pageTitle() ``` ---------------------------------------- TITLE: BinaryMessageAction Interface API Reference DESCRIPTION: API documentation for the `BinaryMessageAction` interface, detailing its purpose, methods, parameters, and return types for handling binary WebSocket messages in the Burp Suite Montoya API. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/BinaryMessageAction.html#_snippet_0 LANGUAGE: APIDOC CODE: ``` Interface: BinaryMessageAction Description: Binary WebSocket message. Signature: public interface BinaryMessageAction Methods: action() Description: Returns the action associated with this message. Returns: MessageAction payload() Description: Returns the payload of this message. Returns: ByteArray static continueWith(ByteArray payload) Description: Build a binary WebSocket message to be processed. Parameters: payload: ByteArray - The binary message payload. Returns: BinaryMessageAction - The BinaryMessageAction containing the message to be processed. static continueWith(BinaryMessage binaryMessage) Description: Build a binary WebSocket message to be processed. Parameters: binaryMessage: BinaryMessage - The binary message payload. Returns: BinaryMessageAction - The BinaryMessageAction containing the message to be processed. static drop() Description: Build a binary WebSocket message to be dropped. Returns: BinaryMessageAction - The BinaryMessageAction dropping the message. static binaryMessageAction(ByteArray payload, MessageAction action) Description: Build a binary websocket message action. Parameters: payload: ByteArray action: MessageAction Returns: BinaryMessageAction ``` ---------------------------------------- TITLE: Getting Request/Response HttpDetails Java DESCRIPTION: Retrieves the full HTTP request sent to the Collaborator server and the corresponding server response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/collaborator/HttpDetails.html#_snippet_1 LANGUAGE: Java CODE: ``` HttpRequestResponse requestResponse() ``` ---------------------------------------- TITLE: Get URLUtils Instance (Java) DESCRIPTION: Returns an instance of the URLUtils interface, providing methods for URL manipulation and encoding. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_9 LANGUAGE: Java CODE: ``` URLUtils urlUtils() ``` ---------------------------------------- TITLE: Method Reference: crawlConfiguration (String...) DESCRIPTION: Reference to the `crawlConfiguration` method in the Burp Montoya API, showing its return type (`CrawlConfiguration` - inferred) and parameters (`String... seedUrls`). This method likely creates a crawl configuration with specified seed URLs. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_21 LANGUAGE: Java CODE: ``` [crawlConfiguration](#crawlConfiguration\(java.lang.String...\))([String](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/String.html "class or interface in java.lang")... seedUrls) ``` ---------------------------------------- TITLE: Get Current Payload (Java) DESCRIPTION: Returns the value of the payload to be processed by Burp Intruder. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/intruder/PayloadData.html#_snippet_0 LANGUAGE: Java CODE: ``` ByteArray currentPayload() ``` ---------------------------------------- TITLE: Package Declaration DESCRIPTION: Declares the package for the Burp Suite Montoya API UI editor components. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/editor/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.ui.editor ``` ---------------------------------------- TITLE: Getting All Response Cookies (Java) DESCRIPTION: Obtains details of all HTTP cookies set in the response. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/responses/HttpResponse.html#_snippet_7 LANGUAGE: Java CODE: ``` List cookies() ``` ---------------------------------------- TITLE: Get Base64Utils Instance (Java) DESCRIPTION: Returns an instance of the Base64Utils interface, providing methods for Base64 encoding and decoding operations. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_0 LANGUAGE: Java CODE: ``` Base64Utils base64Utils() ``` ---------------------------------------- TITLE: Getting Response Body as String (Java) DESCRIPTION: Returns the body of the HTTP response as a String. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/responses/HttpResponse.html#_snippet_3 LANGUAGE: Java CODE: ``` String bodyToString() ``` ---------------------------------------- TITLE: Export User Options Burp Suite Java DESCRIPTION: Exports the current user-level configuration of Burp Suite in JSON format. Optionally, specify paths to include only specific sections. Returns the configuration as a JSON string. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/burpsuite/BurpSuite.html#_snippet_11 LANGUAGE: Java CODE: ``` String exportUserOptionsAsJson(String... paths) ``` ---------------------------------------- TITLE: Get Parameter Value - ParsedHttpParameter (Java) DESCRIPTION: Retrieves the value of the HTTP parameter as a String. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/params/ParsedHttpParameter.html#_snippet_2 LANGUAGE: Java CODE: ``` String value() ``` ---------------------------------------- TITLE: ScanConfiguration Interface DESCRIPTION: Configurations for the Burp Scanner tool. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_182 LANGUAGE: APIDOC CODE: ``` interface ScanConfiguration ``` ---------------------------------------- TITLE: Get Parameter Name - ParsedHttpParameter (Java) DESCRIPTION: Retrieves the name of the HTTP parameter as a String. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/params/ParsedHttpParameter.html#_snippet_1 LANGUAGE: Java CODE: ``` String name() ``` ---------------------------------------- TITLE: Burp Suite Montoya API: All Classes and Interfaces DESCRIPTION: This section provides a comprehensive list of all classes, interfaces, and enum classes available in the Burp Suite Montoya API, along with a brief description of their purpose. Each entry links to its detailed documentation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_0 LANGUAGE: APIDOC CODE: ``` Interfaces: ActionResult: Description: An instance of this interface should be returned by SessionHandlingAction.performAction(SessionHandlingActionData). Package: burp.api.montoya.http.sessions Ai: Description: Provides access to AI related functionality. Package: burp.api.montoya.ai Annotations: Description: Annotations stored with requests and responses in Burp Suite. Package: burp.api.montoya.core AttackConfiguration: Description: Intruder attack configuration. Package: burp.api.montoya.intruder Attribute: Description: Burp attribute able to retrieve to hold details about HTTP response attributes. Package: burp.api.montoya.http.message.responses.analysis Audit: Description: Audit in the Burp Scanner tool. Package: burp.api.montoya.scanner.audit AuditConfiguration: Description: This class represents the configuration required for an audit in the Burp Scanner Tool. Package: burp.api.montoya.scanner AuditInsertionPoint: Description: This interface is used to define an insertion point for use by active Scan checks. Package: burp.api.montoya.scanner.audit.insertionpoint AuditInsertionPointProvider: Description: Extensions can implement this interface and then call Scanner.registerInsertionPointProvider(AuditInsertionPointProvider) to register a provider for custom audit insertion points. Package: burp.api.montoya.scanner.audit.insertionpoint AuditIssue: Description: This interface is used to retrieve details of audit issues. Package: burp.api.montoya.scanner.audit.issues AuditIssueContextMenuEvent: Description: No description provided. Package: burp.api.montoya.ui.contextmenu AuditIssueDefinition: Description: This interface is used to retrieve background information about audit issues. Package: burp.api.montoya.scanner.audit.issues AuditIssueHandler: Description: Extensions can implement this interface and then call Scanner.registerAuditIssueHandler(AuditIssueHandler) to register an audit issue handler. Package: burp.api.montoya.scanner.audit AuditResult: Description: No description provided. Package: burp.api.montoya.scanner Bambda: Description: Provides access to functionality related to Bambdas. Package: burp.api.montoya.bambda BambdaImportResult: Description: The result of importing a Bambda. Package: burp.api.montoya.bambda Enum Classes: AttributeType: Description: Otions that Burp can use to query attributes of HTTP responses. Package: burp.api.montoya.http.message.responses.analysis AuditInsertionPointType: Description: This enum represents the audit insertion point type. Package: burp.api.montoya.scanner.audit.insertionpoint AuditIssueConfidence: Description: This enum represents the confidence level of an audit issue. Package: burp.api.montoya.scanner.audit.issues AuditIssueSeverity: Description: This enum represents the severity level of an audit issue. Package: burp.api.montoya.scanner.audit.issues BambdaImportResult.Status: Description: The status of an imported Bambda. Package: burp.api.montoya.bambda ``` ---------------------------------------- TITLE: Get StringUtils Instance (Java) DESCRIPTION: Returns an instance of the StringUtils interface, providing utility methods for string manipulation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_8 LANGUAGE: Java CODE: ``` StringUtils stringUtils() ``` ---------------------------------------- TITLE: Follow User Rules Initial Request - Burp Montoya API - Java DESCRIPTION: Represents a method call to instruct the Burp Proxy to process an initial intercepted HTTP request according to the user-defined interception rules. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_50 LANGUAGE: Java CODE: ``` requestInitialInterceptResultFollowUserRules(burp.api.montoya.http.message.requests.HttpRequest request) ``` ---------------------------------------- TITLE: Get Annotations from RequestToBeSentAction DESCRIPTION: Retrieves the annotations associated with the HTTP request in this RequestToBeSentAction instance. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/RequestToBeSentAction.html#_snippet_2 LANGUAGE: Java CODE: ``` Annotations annotations() ``` ---------------------------------------- TITLE: Get HtmlUtils Instance (Java) DESCRIPTION: Returns an instance of the HtmlUtils interface, providing methods for HTML parsing and manipulation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_4 LANGUAGE: Java CODE: ``` HtmlUtils htmlUtils() ``` ---------------------------------------- TITLE: Initialize Documentation Path and Load Scripts (JavaScript) DESCRIPTION: This JavaScript snippet is part of the generated API documentation page. It sets a variable for the relative path to the documentation root and calls a function to load necessary scripts for the page's functionality. It is not related to the Burp API itself. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/RequestAction.html#_snippet_0 LANGUAGE: JavaScript CODE: ``` var pathtoroot = "../../../../../"; loadScripts(document, 'script'); ``` ---------------------------------------- TITLE: Getting Response Attributes Java DESCRIPTION: Retrieves a list of response attributes based on the specified attribute types. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/handler/HttpResponseReceived.html#_snippet_2 LANGUAGE: Java CODE: ``` List attributes(AttributeType... types) ``` ---------------------------------------- TITLE: Get RandomUtils Instance (Java) DESCRIPTION: Returns an instance of the RandomUtils interface, providing methods for generating random data. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_7 LANGUAGE: Java CODE: ``` RandomUtils randomUtils() ``` ---------------------------------------- TITLE: Getting End Index - Range - Java DESCRIPTION: Retrieves the exclusive end index of the range represented by this object. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/Range.html#_snippet_1 LANGUAGE: Java CODE: ``` int endIndexExclusive() ``` ---------------------------------------- TITLE: Creating Raw Editor Instance in Burp Montoya API (Java) DESCRIPTION: Creates a new instance of Burp's built-in plain text editor (RawEditor) for use within the extension's own UI components. Optional EditorOptions can be provided to configure the editor's behavior. Returns a RawEditor instance. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/UserInterface.html#_snippet_16 LANGUAGE: Java CODE: ``` RawEditor createRawEditor(EditorOptions... options) ``` ---------------------------------------- TITLE: Get Tool Source (Java) DESCRIPTION: Identifies the Burp Suite tool that issued the request (e.g., Proxy, Scanner, Repeater). SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerCaptureHttpRequestResponse.html#_snippet_11 LANGUAGE: Java CODE: ``` ToolSource toolSource() ``` ---------------------------------------- TITLE: Getting Protocol HttpDetails Java DESCRIPTION: Retrieves the HTTP protocol used in the interaction detected by Burp Collaborator. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/collaborator/HttpDetails.html#_snippet_0 LANGUAGE: Java CODE: ``` HttpProtocol protocol() ``` ---------------------------------------- TITLE: Get Byte at Index - Java DESCRIPTION: Accesses the byte stored at the provided index within the ByteArray. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/ByteArray.html#_snippet_18 LANGUAGE: Java CODE: ``` byte getByte(int index) ``` ---------------------------------------- TITLE: JavaDoc API Documentation Page Structure DESCRIPTION: Describes the different types of pages found in JavaDoc API documentation and their typical content, including overview, package, class/interface, and hierarchy views. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/help-doc.html#_snippet_1 LANGUAGE: APIDOC CODE: ``` Overview Page: - Front page of API document - Lists all packages with summaries - May contain overall description of packages ``` LANGUAGE: APIDOC CODE: ``` Package Page: - Lists classes and interfaces within the package - Categories: - Interfaces - Classes - Enum Classes - Exception Classes - Annotation Interfaces ``` LANGUAGE: APIDOC CODE: ``` Class or Interface Page: - Sections: - Declaration and Description - Member Summary Tables - Detailed Member Descriptions - Common Elements (if applicable): - Class Inheritance Diagram - Direct Subclasses - All Known Subinterfaces - All Known Implementing Classes - Class or Interface Declaration - Class or Interface Description - Nested Class Summary - Enum Constant Summary - Field Summary - Property Summary - Constructor Summary - Method Summary - Required Element Summary - Optional Element Summary - Enum Constant Details - Field Details - Property Details - Constructor Details - Method Details - Element Details - Notes: - Annotation interfaces have required/optional elements, not methods. - Only enum classes have enum constants. - Record class components displayed as part of declaration. - Properties are a JavaFX feature. - Ordering: - Summary entries: alphabetical - Detailed descriptions: source code order (preserves programmer's logical groupings) ``` LANGUAGE: APIDOC CODE: ``` Other Files: - Pages with additional information related to declarations nearby (in packages/modules) ``` LANGUAGE: APIDOC CODE: ``` Tree (Class Hierarchy) Page: - For all packages or specific package - Lists classes (organized by inheritance from java.lang.Object) and interfaces - Navigation: - From Overview: displays hierarchy for all packages - From package/class/interface page: displays hierarchy for only that package ``` LANGUAGE: APIDOC CODE: ``` Deprecated API Page: - Lists all deprecated API - Not recommended for use (due to shortcomings) - Replacement API usually given - May be removed in future implementations ``` ---------------------------------------- TITLE: Get JsonUtils Instance (Java) DESCRIPTION: Returns an instance of the JsonUtils interface, providing methods for JSON parsing and manipulation. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/utilities/Utilities.html#_snippet_5 LANGUAGE: Java CODE: ``` JsonUtils jsonUtils() ``` ---------------------------------------- TITLE: Getting All Enum Constants (Java) DESCRIPTION: Returns an array containing all constants of this enum class in the order they are declared. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/core/BurpSuiteEdition.html#_snippet_3 LANGUAGE: Java CODE: ``` public static [BurpSuiteEdition][] values() ``` ---------------------------------------- TITLE: Creating Annotations with Notes and Highlight Color in Java DESCRIPTION: Creates an Annotations object initialized with both a string of notes and a highlight color, combining textual and visual annotations. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/internal/MontoyaObjectFactory.html#_snippet_113 LANGUAGE: Java CODE: ``` Annotations annotations(String notes, HighlightColor highlightColor) ``` ---------------------------------------- TITLE: Version Interface DESCRIPTION: This interface provides information about the current product version of Burp Suite. It can be used by extensions to check compatibility or display version details. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/allclasses-index.html#_snippet_218 LANGUAGE: APIDOC CODE: ``` Version: interface - Provides product version information. ``` ---------------------------------------- TITLE: Get Collaborator Server Address (Java) DESCRIPTION: Retrieves the hostname or IP address of the Collaborator server associated with the client. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/collaborator/CollaboratorServer.html#_snippet_0 LANGUAGE: Java CODE: ``` String address() ``` ---------------------------------------- TITLE: Get All Site Map Items (Java) DESCRIPTION: This method returns details of all items in the site map. Returns: A list of all HttpRequestResponse items in the site map. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/sitemap/SiteMap.html#_snippet_4 LANGUAGE: Java CODE: ``` java.util.List requestResponses() ``` ---------------------------------------- TITLE: Get Type of Audit Insertion Point DESCRIPTION: Retrieves the specific type of the current audit insertion point. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/audit/insertionpoint/AuditInsertionPoint.html#_snippet_3 LANGUAGE: APIDOC CODE: ``` default AuditInsertionPointType type() Returns: The AuditInsertionPointType for this insertion point. ``` ---------------------------------------- TITLE: Package Declaration - burp.api.montoya.comparer - Java DESCRIPTION: Declares the Java package burp.api.montoya.comparer, which contains interfaces and classes related to the Burp Suite Comparer tool. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/comparer/package-summary.html#_snippet_0 LANGUAGE: Java CODE: ``` package burp.api.montoya.comparer ``` ---------------------------------------- TITLE: Getting All AuditIssueSeverity Constants - Java DESCRIPTION: This method returns an array containing all the constants of this enum class, in the order they are declared. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/scanner/audit/issues/AuditIssueSeverity.html#_snippet_1 LANGUAGE: Java CODE: ``` public static AuditIssueSeverity[] values() ``` ---------------------------------------- TITLE: Listing Short Keys Java DESCRIPTION: Retrieves a set of all keys currently mapped to Short values in the map. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/persistence/Preferences.html#_snippet_22 LANGUAGE: Java CODE: ``` Set shortKeys() ``` ---------------------------------------- TITLE: Getting WebSocket from WebSocketCreated (Java) DESCRIPTION: Retrieves the WebSocket object that was created. This method provides access to the newly established WebSocket connection. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/websocket/WebSocketCreated.html#_snippet_0 LANGUAGE: Java CODE: ``` webSocket() ``` ---------------------------------------- TITLE: Getting Short Value Java DESCRIPTION: Retrieves the Short value associated with the specified key from the map. Returns null if the key is not found. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/persistence/Preferences.html#_snippet_19 LANGUAGE: Java CODE: ``` Short getShort(String key) ``` ---------------------------------------- TITLE: Creating HTTP Request Editor in Burp Montoya API (Java) DESCRIPTION: Creates a new instance of Burp's HTTP request editor for use within an extension's UI. Parameters: `options` - Optional options to apply to the editor. Returns: An instance of the `HttpRequestEditor` interface. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/ui/UserInterface.html#_snippet_19 LANGUAGE: Java CODE: ``` HttpRequestEditor createHttpRequestEditor(EditorOptions... options) ``` ---------------------------------------- TITLE: Get Capture Timestamp (Java) DESCRIPTION: Returns the date and time at which Burp Logger received the request. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/logger/LoggerCaptureHttpRequestResponse.html#_snippet_9 LANGUAGE: Java CODE: ``` ZonedDateTime time() ``` ---------------------------------------- TITLE: Getting Specific Response Cookie (Java) DESCRIPTION: Retrieves a specific HTTP cookie from the response by its name. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/http/message/responses/HttpResponse.html#_snippet_6 LANGUAGE: Java CODE: ``` Cookie cookie(String name) ``` ---------------------------------------- TITLE: Initialize Path and Load Scripts (JavaScript) DESCRIPTION: Initializes a variable 'pathtoroot' with a relative path and calls a function 'loadScripts' to load external scripts, likely for rendering the documentation page. SOURCE: https://github.com/portswigger/burp-extensions-montoya-api/blob/main/docs/javadoc/burp/api/montoya/intruder/PayloadProcessingAction.html#_snippet_0 LANGUAGE: javascript CODE: ``` var pathtoroot = "../../../../"; loadScripts(document, 'script'); ```