<commit_before>= mhost
:toc: macro
:toc-title:

A modern take on the classic `host` DNS lookup utility including an easy to use, and very fast Rust lookup library.

== Features

* `mhost` is very fast and uses multiple DNS servers concurrently and aggregates all results for more reliable lookups.
* `mhost` supports classic DNS over UDP and TCP as well as modern DNS over TLS (DoT) and HTTP (DoH).
* `mhost` presents results in an easy, human readable format or as JSON for post-processing.
* `mhost` discovers host names and subdomains of any domain.
* `mhost` uses lints to validate the DNS configurations of any domain.
* `mhost` offers an easy to use Rust library so you can use the same lookup capabilities in your own project.

For details see sections <<Use-Cases,Use Cases>> and <<Documentation,Documentation>> of this Readme.

== Quick Start

. Install `mhost` – see below for <<Installation,installation instructions>>.
. Run `mhost -p l --all -w github.com` and you've just asked 16 name servers for all available DNS records of _github.com_ in 216 ms. And in addition you get the WHOIS information for GitHub's subnet.
image:doc/images/multi-lookup-all-records-github.png[Multi lookup for all available records of github.com.]
. Run `mhost -q -p --output json l --all -w github.com  | jq &#39;.lookups[] | .result.Response.records[]? | select(.type == &quot;A&quot;) | .data.A&#39;` and get all IPv4 addresses.
. Set shell alias `alias host=mhost l` to replace your system's `host` command.


== Table of Contents
toc::[]

== Use Cases

=== Just lookup an IP address

[source,bash]
----
mhost l github.com<commit_msg>Add Badges and Shields to Readme<commit_after>= mhost
:toc: macro
:toc-title:

A modern take on the classic `host` DNS lookup utility including an easy to use, and very fast Rust lookup library.

https://github.com/lukaspustina/mhost/actions/[image:https://github.com/lukaspustina/mhost/workflows/CI%20build/badge.svg[CI build]] https://crates.io/crates/mhost[image:http://meritbadge.herokuapp.com/mhost[mhost on crates.io]] https://docs.rs/mhost[image:https://docs.rs/mhost/badge.svg[Documentation on docs.rs]] image:https://img.shields.io/badge/license-MIT-blue.svg[License: MIT] image:https://img.shields.io/badge/license-Apache_2.0-blue.svg[License: Apache 2.0]


== Features

* `mhost` is very fast and uses multiple DNS servers concurrently and aggregates all results for more reliable lookups.
* `mhost` supports classic DNS over UDP and TCP as well as modern DNS over TLS (DoT) and HTTP (DoH).
* `mhost` presents results in an easy, human readable format or as JSON for post-processing.
* `mhost` discovers host names and subdomains of any domain.
* `mhost` uses lints to validate the DNS configurations of any domain.
* `mhost` offers an easy to use Rust library so you can use the same lookup capabilities in your own project.

For details see sections <<Use-Cases,Use Cases>> and <<Documentation,Documentation>> of this Readme.

== Quick Start

. Install `mhost` – see below for <<Installation,installation instructions>>.
. Run `mhost -p l --all -w github.com` and you've just asked 16 name servers for all available DNS records of _github.com_ in 216 ms. And in addition you get the WHOIS information for GitHub's subnet.
image:doc/images/multi-lookup-all-records-github.png[Multi lookup for all available records of github.com.]
. Run `mhost -q -p --output json l --all -w github.com  | jq &#39;.lookups[] | .result.Response.records[]? | select(.type == &quot;A&quot;) | .data.A&#39;` and get all IPv4 addresses.
. Set shell alias `alias host=mhost l` to replace your system's `host` command.


== Table of Contents
toc::[]

== Use Cases

=== Just lookup an IP address

[source,bash]
----
mhost l github.com
{'fraction_non_alphanumeric': 0.11090375899760065, 'fraction_numerical': 0.00693148493735004, 'mean_word_length': 4.262272089761571, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3158661', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1116, 'n_words': 477}