Dig

From Teknologisk videncenter
Jump to: navigation, search
  • dig -x 87.56.15.182 | grep PTR | grep -v -E '^;' | tr ' \t' ' '|cut -d' ' -f5
 IPaddresses=$(cat /var/log/httpd-access.log | cut -d' ' -f1 | sort -u)
 for i in $IPaddresses; do dig -x $i | grep PTR | grep -v -E '^;' | tr ' \t' '  '|cut -d' ' -f5; done