Guest User

Untitled

a guest
May 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/bin/sh
  2. REC=ucheck.domain
  3.  
  4. NS="a b c d"
  5. HO=.ns.domain
  6.  
  7. time=$(date +%s)
  8.  
  9. for n in $NS; do
  10. n="$n$HO"
  11. res=$(dig @$n +short TXT $REC | sed 's/"//g')
  12.  
  13. if [ -z "$res" -o "${res%[a-z]}" != "${res}" ]; then
  14. echo "Bad $n"
  15. elif [ "$res" -lt "$[$time - 600]" ] 2>/dev/null; then
  16. echo "Bad $n"
  17. fi
  18. done
Add Comment
Please, Sign In to add comment