https://github.com/thekuwayama/nslookupot
nslookup over TLS
https://github.com/thekuwayama/nslookupot
cli dns-over-tls ruby
Last synced: 5 months ago
JSON representation
nslookup over TLS
- Host: GitHub
- URL: https://github.com/thekuwayama/nslookupot
- Owner: thekuwayama
- License: mit
- Created: 2019-07-01T06:05:16.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T14:06:12.000Z (over 1 year ago)
- Last Synced: 2025-04-23T23:06:44.383Z (5 months ago)
- Topics: cli, dns-over-tls, ruby
- Language: Ruby
- Homepage:
- Size: 42 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# nslookupot
[](https://badge.fury.io/rb/nslookupot)
[](https://github.com/thekuwayama/nslookupot/actions?workflow=CI)
[](https://codeclimate.com/github/thekuwayama/nslookupot/maintainability)nslookupot is CLI that is `nslookup` over TLS (version 1.3 or 1.2).
- https://datatracker.ietf.org/doc/html/rfc7858
## Installation
The gem is available at [rubygems.org](https://rubygems.org/gems/nslookupot). You can install with:
```sh-session
$ gem install nslookupot
```## Usage
```sh-session
$ 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:
```sh-session
$ nslookupot example.com
Server: 1.1.1.1
Address: 1.1.1.1#853Name: example.com
Address: 93.184.216.34
Ttl: 83289```
If you need to resolve other than A type, you can run it the following:
```sh-session
$ nslookupot --type=cname www.youtube.com
Server: 1.1.1.1
Address: 1.1.1.1#853Name: 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:
```sh-session
$ nslookupot --server=8.8.8.8 --port=853 --hostname=dns.google www.google.com
Server: 8.8.8.8
Address: 8.8.8.8#853Name: 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:
```sh-session
$ nslookupot --server=9.9.9.9 --port=853 --hostname=quad9.net www.quad9.net
Server: 9.9.9.9
Address: 9.9.9.9#853Name: www.quad9.net
Address: 216.21.3.77
Ttl: 100```
Supported query types are:
```sh-session
$ 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](http://opensource.org/licenses/MIT).