Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add PTR record

  • Loading branch information...
commit cec433b23361620d7a15c52033cf4efec5a32f33 1 parent d3ec192
Geoffroy Couprie authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 dns/dns
5 dns/dns
View
@@ -20,6 +20,11 @@ else
regex="^$1.*AAAA[[:space:]]*(.*)"
if [[ "$line" =~ $regex ]] ; then echo ",{\"name\": \"AAAA\", \"value\":\"${BASH_REMATCH[1]}\"}"; fi
done
+ arr=( $(dig $1 PTR 2>/dev/null) );
+ for line in "${arr[@]}"; do
+ regex="^$1.*PTR[[:space:]]*(.*)"
+ if [[ "$line" =~ $regex ]] ; then echo ",{\"name\": \"PTR\", \"value\":\"${BASH_REMATCH[1]}\"}"; fi
+ done
arr=( $(dig $1 MX 2>/dev/null) );
for line in "${arr[@]}"; do
regex="^$1.*MX[[:space:]]*(.*)"
Please sign in to comment.
Something went wrong with that request. Please try again.