Glob flexible searches

Globbing is an advanced form of wildcard searches, more powerful than DNSDB’s Standard Search left-hand or right-hand wildcards, but not as advanced as Farsight Compatible Regular Expressions (FCRE). They can be simpler to write, especially for API users who are not familar with regular expressions.

In general, Farsight’s glob implementation follows standard Unix glob(7) semantics, but not what’s sometimes referred to as “extended globbing.”

Glob searches are evaluated against the DNS master file form of the hostnames (aka rrnames) and rdata values, which by design contains only printable ASCII characters. All non-printable characters, including octets outside the ASCII range, are converted to “\DDD” escape sequences, where “DDD” is a three digit decimal number per RFC 1035. This is only applicable to RData (RHS) queries.

Glob Syntax

A glob is a string of printable characters with the following characters given special meaning:

Any other characters in globbing pattern get matched exactly as written, except that characters are not case sensitive.

Character Class Syntax

A character class is a set of characters enclosed between an opening [ and a closing ]. A simple example is [m-z1-3] to match characters m through z and 1 to 3.

Within the character class, the following characters are handled specially:

The sequences [. and [= are not allowed between the opening [or [! and the closing ], to prevent confusion with unsupported POSIX collation sequences and collation classes.

If the sequence [: appears in a character class, it must be the beginning of one of the following POSIX character classes:

The above named character classes must appear inside an enclosing [ and ], e.g. [[:digit:][:punct:]] to match a digit or punctuation character. Without the enclosing braces, [:digit:] will match the characters :, d, i, g, or t.

Neither the above character classes nor a character range may begin or end a character range. For example, the character class expressions [0-[:alpha:]] and [a-n-z] are invalid.

All other characters between the opening [ or [! and the closing ] are added to the character class, including the backslash \ character.

There is no way to express a character class containing a single ! character.

Important notes


Additional Information

About Farsight Security

Farsight Security, Inc. is the world’s largest provider of historical and real-time DNS intelligence solutions. We enable security teams to qualify, enrich and correlate all sources of threat data and ultimately save time when it is most critical - during an attack or investigation. Our solutions provide enterprise, government and security industry personnel and platforms with unmatched global visibility, context and response. Farsight Security is headquartered in San Mateo, California, USA. Learn more about how we can empower your threat platform and security team with Farsight Security passive DNS solutions at or follow us on Twitter: @FarsightSecInc.