leonteale

rnds.sh

Dec 22nd, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash
  2. for ip in $(cat $1);
  3.  
  4.     do nslookup $ip > /tmp/rdns.txt
  5.         if grep --quiet "name" /tmp/rdns.txt
  6.             then
  7.                 cat /tmp/rdns.txt | grep "name" | awk {'print $4'}
  8.             else
  9.                 echo "No rDNS set"
  10.         fi
  11.     done
Advertisement
Add Comment
Please, Sign In to add comment