Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

domain

Subcommands

SubcommandDescriptionSyntax
domainExtracts the domain component from a hostname based on the public suffix listdomain(<expr>)
tldExtracts the top level domain (TLD) component from a hostname based on the public suffix listtld(<expr>)
resolveipResolves a domain name to an IP addressresolveip(<expr>)
resolveptrPerforms a reverse DNS lookup for an IP addressresolveptr(<expr>)
resolveResolves a domain name to DNS records of a specified typeresolve(<expr>, <expr>)

Examples

domain

For a field hostname containing www.example.com, this example sets domain to example.com:

| eval domain=domain(hostname)

tld

For a field hostname containing www.example.com, this example sets tld to com:

| eval tld=tld(hostname)

resolveip

For a field hostname containing example.com, this example sets ip to the resolved IP address (e.g., 93.184.216.34):

| eval ip=resolveip(hostname)

resolveptr

For an IP field ip containing 93.184.216.34, this example sets hostname to the PTR record (e.g., example.com):

| eval hostname=resolveptr(ip)

resolve

For a field hostname containing example.com, this example resolves A records and stores them in records:

| eval records=resolve(hostname, "A")