https://github.com/topscoder/ptr
ptr is a Go script that allows you to find hostnames by ip addresses. Reverse IP lookup by resolving the PTR record.
https://github.com/topscoder/ptr
bugbounty-tool dns ip-lookup reverse-dns reverse-dns-lookup reverse-ip-lookup
Last synced: 3 months ago
JSON representation
ptr is a Go script that allows you to find hostnames by ip addresses. Reverse IP lookup by resolving the PTR record.
- Host: GitHub
- URL: https://github.com/topscoder/ptr
- Owner: topscoder
- License: unlicense
- Created: 2023-08-13T18:40:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T15:02:39.000Z (12 months ago)
- Last Synced: 2025-04-08T19:52:43.472Z (6 months ago)
- Topics: bugbounty-tool, dns, ip-lookup, reverse-dns, reverse-dns-lookup, reverse-ip-lookup
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IP PTR Lookup Script
This is a simple Go script that performs PTR (reverse DNS) lookups for IP addresses. It can handle single IP addresses, IP addresses from a file, or IP addresses provided via stdin.
## Example
```
ptr 8.8.8.8
8.8.8.8,dns.googleptr 185.15.59.224
185.15.59.224,text-lb.esams.wikimedia.orgecho "8.8.8.8" | ptr -
8.8.8.8,dns.googleptr ips.txt
9.9.9.9,dns9.quad9.net
```## Installation
To install ptr, you can use the following command:
```shell
go install github.com/topscoder/ptr@latest
```This will install the ptr script as an executable in your Go bin directory.
## Usage
Run the script with different options:
* To look up a single IP address:
```shell
ptr 8.8.8.8
```* To process IP addresses from a file (one IP address per line):
```shell
ptr ips.txt
```* To provide IP addresses via stdin (press Ctrl + D to signal the end of input):
```shell
cat ips.txt | ptr -
```Enjoy the PTR lookup results!
## License
This project is licensed under the MIT License.
Feel free to fork the repository, make improvements, and submit pull requests!
## Acknowledgements
This script was inspired by the need for a simple tool to perform PTR lookups for multiple IP addresses quickly.