Travis Build Status crates.io MIT licensed

alookup

Lookup IPv4 and IPv6 addresses for a hostname. Only prints addresses on stdout (one per line), errors to stderr, and hard errors can be detected through inspecting the exit code.

It uses the [resolv] crate (specifically the [query] method), which uses libresolv.so which is typically configured via /etc/resolv.conf to do DNS resolution.

Install

Install from crates.io with cargo install alookup.

Using it

Examples

alookup mail.google.com

Usage

alookup [FLAGS] <NAME>

FLAGS:

    -4               Query only IPv4 records (A)
    -6               Query only IPv6 records (AAAA)
    -s, --sort       Sort (and deduplicate) addresses
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:

    <NAME>    Name to lookup

Exit codes

Other exit codes should be treated as failures too; a non-zero exit code always should show an error on stderr, and every time an error is printed to stderr there should be a non-zero exit code.