Last active
March 28, 2020 07:30
-
-
Save MarkZhangTW/50000ea93a4b4281a02e1d27f5348ef5 to your computer and use it in GitHub Desktop.
bash reverse DNS name with dig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..254}; do | |
lookup=$(dig -x 192.168.0.$i +short); | |
[[ -z "$lookup" ]] || echo "192.168.0.$(printf %3s $i)" - $lookup; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment