/nslookupot

nslookup over TLS

Primary LanguageRubyMIT LicenseMIT

nslookupot

Gem Version CI Maintainability

nslookupot is CLI that is nslookup over TLS (version 1.3 or 1.2).

Installation

The gem is available at rubygems.org. You can install with:

$ gem install nslookupot

Usage

$ nslookupot --help
Usage: nslookupot [options] name
    -s, --server VALUE               the name server IP address        (default 1.1.1.1)
    -p, --port VALUE                 the name server port number       (default 853)
    -h, --hostname VALUE             the name server hostname          (default cloudflare-dns.com)
    -n, --no-check-sni               no check SNI                      (default false)
    -t, --type VALUE                 the type of the information query (default A)
        --types                      print the list of query types

You can run it the following:

$ nslookupot example.com
Server:         1.1.1.1
Address:        1.1.1.1#853

Name:           example.com
Address:        93.184.216.34
Ttl:            83289

If you need to resolve other than A type, you can run it the following:

$ nslookupot --type=cname www.youtube.com
Server:         1.1.1.1
Address:        1.1.1.1#853

Name:           www.youtube.com
Name:           youtube-ui.l.google.com
Ttl:            86400

If you need to query to 8.8.8.8, you can run it the following:

$ nslookupot --server=8.8.8.8 --port=853 --hostname=dns.google www.google.com
Server:         8.8.8.8
Address:        8.8.8.8#853

Name:           www.google.com
Address:        142.250.196.132
Ttl:            175

If you need to query to 9.9.9.9, you can run it the following:

$ nslookupot --server=9.9.9.9 --port=853 --hostname=quad9.net www.quad9.net
Server:         9.9.9.9
Address:        9.9.9.9#853

Name:           www.quad9.net
Address:        216.21.3.77
Ttl:            100

Supported query types are:

$ nslookupot --types
** A, AAAA, CAA, CNAME, HINFO, HTTPS, LOC, MINFO, MX, NS, PTR, SOA, SRV, SVCB, TXT, WKS

License

The gem is available as open source under the terms of the MIT License.