bore |
[--encode | --decode |
--show-resolvers] [--load]
[--dump] [--host
host] [--port
port] [--timeout
timeout] [-x |
--reverse] [--class
class] [--color
when] [name
[type]] |
Sends a DNS query and prints the response in zone format.
If no host is given,
bore uses your system’s resolvers, which are
gathered from GetAdaptersAddresses on Windows, dns_configuration_copy on
macOS, or
resolv.conf(5)
on other Unix-like platforms, falling back on localhost.
Note that your platform’s native name resolution probably
supports other sources besides DNS, such as a
hosts(5) file or
mDNS (Bonjour). bore only uses native resolution for
host itself, and otherwise only sends DNS queries, so
the results may differ from how your system would resolve a name as a
hostname.
By default, bore will follow four
steps:
- build a query based on the given arguments
- send the query to the given host
- receive a response from the given host
- decode and pretty-print the message
- name [default: .]
- Question name. Names are parsed in zone format, with dots separating
labels unless escaped, \000 through \255 to escape an octet, and \x with
any non-digit character ‘
x’ to
escape that character. Required when --reverse is
given.
- type [default: A]
- Question type. The default is ‘
PTR’
if --reverse is given, or
‘A’ if a name
is given, or ‘NS’ otherwise. For
unknown types, use ‘TYPE’ followed
by the type number, e.g.
‘type65535’.
--encode
- Writes the raw query to stdout, instead of sending it (step 1 only).
--load
- Reads the raw query from stdin, instead of building one (skip step
1).
--dump
- Writes the raw response to stdout, instead of pretty-printing it (skip
step 4).
--decode
- Reads a raw message from stdin, then decodes and pretty-prints it (step 4
only).
--show-resolvers
- Prints details about your system’s resolvers, and a list of hosts
we would actually send queries to (after taking
--host and --port into
account), without doing anything else.
--host
host
- Sends the query to host, instead of your
system’s resolvers. If host is a domain name,
we use your platform’s native name resolution to turn it into a
list of IP addresses.
--port
port [default: 53]
- Sends the query to the given port. The default is
port 53, or on macOS, the custom port (if any) that each of your
system’s resolvers and nameservers is configured to use.
--timeout
timeout [seconds; default:
5]
- Give up on waiting for the query after timeout
seconds, and if there are more hosts available, try the next one. This
timeout spans the whole query attempt, so the query needs to be sent
and a response received within that time.
-x |
--reverse
- Makes a reverse DNS query, converting name
(required) from an IP address to a domain name in
‘
in-addr.arpa.’ (IPv4) or
‘ip6.arpa.’ (IPv6).
--class
class [default: IN]
- Question class. For unknown classes, use
‘
CLASS’ followed by the class
number, e.g. ‘class65535’.
--color
⟨auto | never |
always⟩ [default:
auto]
- Controls when to use colours or other text styles. In
auto mode, we decide whether or not to use them as
follows:
- no, if standard output is not a tty (Unix) or console (Windows)
- no, if the environment has TERM=dumb (all platforms)
- no, if the environment has no TERM (Unix)
- yes, otherwise