Class RequestResponseDocBuilder

java.lang.Object
ai.attackframework.tools.burp.sinks.RequestResponseDocBuilder

public final class RequestResponseDocBuilder extends Object
Builds request and response sub-documents in the same shape as the traffic index, for use by both OpenSearchTrafficHandler and SitemapIndexReporter.
  • Method Details

    • buildRequestDoc

      public static Map<String,Object> buildRequestDoc(burp.api.montoya.http.message.requests.HttpRequest request)
      Builds a request sub-document matching the traffic index request shape.

      Body bytes are always stored as full base64 in body.b64 for exact replay. When the payload is classified as textual, body.text contains the full decoded text.

      Parameters:
      request - the HTTP request (never null)
      Returns:
      map with method, path, headers, parameters, and body content fields.
    • buildResponseDoc

      public static Map<String,Object> buildResponseDoc(burp.api.montoya.http.message.responses.HttpResponse response)
      Builds a response sub-document matching the traffic index response shape.

      Body bytes are always stored as full base64 in body.b64 for exact replay. When the payload is classified as textual, body.text contains the full decoded text. For HttpResponseReceived, response attributes such as visible_text are preserved as returned by Montoya.

      Parameters:
      response - the HTTP response (never null)
      Returns:
      map with status, headers, cookies, and body content fields.