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.
To install ptr, you can use the following command:
go install github.com/topscoder/ptr@latest
This will install the ptr script as an executable in your Go bin directory.
Run the script with different options:
- To look up a single IP address:
ptr 8.8.8.8
- To process IP addresses from a file (one IP address per line):
ptr ips.txt
- To provide IP addresses via stdin (press Ctrl + D to signal the end of input):
cat ips.txt | ptr -
Enjoy the PTR lookup results!
This project is licensed under the MIT License.
Feel free to fork the repository, make improvements, and submit pull requests!
This script was inspired by the need for a simple tool to perform PTR lookups for multiple IP addresses quickly.