https://github.com/da-rod/rdns
CLI tool to perform reverse DNS queries.
https://github.com/da-rod/rdns
ip-range lookup rdns reverse-dns
Last synced: 5 months ago
JSON representation
CLI tool to perform reverse DNS queries.
- Host: GitHub
- URL: https://github.com/da-rod/rdns
- Owner: da-rod
- License: gpl-3.0
- Created: 2020-05-14T14:30:48.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2021-11-09T11:20:13.000Z (over 4 years ago)
- Last Synced: 2025-04-23T10:24:30.119Z (about 1 year ago)
- Topics: ip-range, lookup, rdns, reverse-dns
- Language: Go
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rdns
Simple and pretty fast CLI tool to query PTR records of IP addresses and/or ranges.
Handy when performing network investigations ;)
# Installation
```bash
$ go install github.com/da-rod/rdns@latest
```
# Usage
Takes an IP address or range as argument:
```bash
$ rdns 140.82.118.0/28
140.82.118.0 []
140.82.118.1 [lb-140-82-118-1-ams.github.com.]
140.82.118.2 [lb-140-82-118-2-ams.github.com.]
140.82.118.3 [lb-140-82-118-3-ams.github.com.]
140.82.118.4 [lb-140-82-118-4-ams.github.com.]
140.82.118.5 [lb-140-82-118-5-ams.github.com.]
140.82.118.6 [lb-140-82-118-6-ams.github.com.]
140.82.118.7 [lb-140-82-118-7-ams.github.com.]
140.82.118.8 [lb-140-82-118-8-ams.github.com.]
140.82.118.9 [lb-140-82-118-9-ams.github.com.]
140.82.118.10 [lb-140-82-118-10-ams.github.com.]
140.82.118.11 [lb-140-82-118-11-ams.github.com.]
140.82.118.12 [lb-140-82-118-12-ams.github.com.]
140.82.118.13 [lb-140-82-118-13-ams.github.com.]
140.82.118.14 [lb-140-82-118-14-ams.github.com.]
140.82.118.15 []
```
Reads data from stdin:
```bash
$ cat /tmp/ips.txt | rdns -
216.58.204.0 [lhr35s07-in-f0.1e100.net.]
216.58.204.1 [lhr35s07-in-f1.1e100.net.]
216.58.204.2 [lhr35s07-in-f2.1e100.net.]
216.58.204.3 [lhr48s21-in-f3.1e100.net.]
[...]
```
Notes:
* Filters input which is not (valid, duh) **strict** IP or IP range
* When working from stdin, it filters out empty and commented lines (redundant, I know...)
* Accepts "short" IP ranges like `x.y.z` and treats it as `x.y.z.0/24`
# (Known) Alternative
* http://www.spamshield.org/fast-rdns.pl