HTTPQL Query Language

HTTPQL is a powerful query language for filtering and searching HTTP requests and responses in SpiderSuite.

Overview

HTTPQL allows you to write expressive queries to find exactly the pages you're looking for. It was originally designed by the team at Caido and has been adapted for SpiderSuite.

SpiderSuite uses a slightly modified version of HTTPQL to match the application's features and data structure. See Caido's HTTPQL documentation at https://docs.caido.io/app/reference/httpql.html.

Syntax

The constructing primitives of an HTTPQL query statement, in order of position, are the:

  1. Namespace
  2. Field
  3. Operator
  4. Value

Namespaces

Info: Namespaces are project-specific.

NamespaceDescription
reqAll proxied HTTP requests.
respAll proxied HTTP responses.

Fields

req

FieldDescriptionValue Type
created_atThe date and time the request was sent.Date/Time: RFC3339 (2024-06-24T17:03:48+00:00) / ISO 8601 (2024-06-24T17:03:48+0000) / RFC2822 (Mon, 24 Jun 2024 17:03:48 +0000) / RFC7231 (Mon, 24 Jun 2024 17:03:48 GMT) / ISO9075 (2024-06-24T17:03:48Z)
extThe extension of the requested file.String/Byte
hostThe value of the request's Host header.String/Byte
methodThe HTTP method used for the request.String/Byte
pathThe URL path (includes files).String/Byte
portThe port of the target server.Integer
queryThe URL query string (excludes the leading ?).String/Byte
headerThe request's headers (returns true if even one header matches)String/Byte
cookieThe request' cookies (returns true if even one cookie matches).String/Byte
bodyThe request body data.String/Byte
rawThe full raw data of the request (includes request line, headers, and body data).String/Byte
lenThe request size in bytes (includes request line, headers, and body data).Integer
body_lenThe request body's size in bytesInteger

resp

FieldDescriptionValue Type
codeThe status code of the response.Integer
rawThe full raw data of the response (includes response line, headers, and body data).String/Byte
roundtripThe total request/response cycle time (in milliseconds).Integer
headerThe response's headers (returns true if even one header matches)String/Byte
cookieThe response' cookies (returns true if even one cookie matches).String/Byte
lenThe response size in bytes (includes response line, headers, and body data).Integer
body_lenThe response body's size in bytesInteger

Operators

OperatorDescriptionValue TypeAdditional Details
eqEqual to the supplied value.String/Byte, IntegerCase sensitive. Requires a leading . character for the ext field.
gtGreater than the supplied value.Date/Time, Integer
gteGreater than or equal to the supplied value.Integer
ltLess than the supplied value.Date/Time, Integer
lteLess than or equal to the supplied value.Integer
neNot equal to the supplied value.String/Byte, IntegerCase sensitive. Requires a leading . character for the ext field.
contContains the supplied value.String/ByteCase insensitive.
ncontDoes not contain the supplied value.String/ByteCase insensitive.
regexMatches to the regular expression.String/ByteRust-flavored syntax.
nregexDoes not match to the regular expression.String/ByteRust-flavored syntax.

Combining Statements

Query statements can be combined together using logical operators and logical grouping.

Logical Operators

OperatorDescription
ANDBoth the left and right clauses must be true.
OREither the left or right clause must be true.

Operators are case insensitive. Both AND and OR have the same default priority, but AND takes precedence over OR in evaluation order (see Logical Grouping below).

Logical Grouping

SpiderSuite supports operator precedence: AND has a higher priority than OR.

ExpressionEquivalent To
<Clause1> AND <Clause2> OR <Clause3>((<Clause1> AND <Clause2>) OR <Clause3>)
<Clause1> OR <Clause2> AND <Clause3>(<Clause1> OR (<Clause2> AND <Clause3>))
<Clause1> AND <Clause2> AND <Clause3>((<Clause1> AND <Clause2>) AND <Clause3>)

While parentheses are optional, it is recommended to use them to make your logical grouping explicit and clear.


Comments

SpiderSuite doesn't support comments in HTTPQL queries.