Advertisement
digininja

zonetransfer.me up check script

Jan 18th, 2018
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.82 KB | None | 0 0
  1. This should work but returns:
  2.  
  3. from 1
  4. dig: couldn't get address for 'nsztm1.digi.ninja': failure
  5. dig: couldn't get address for 'nsztm1.digi.ninja': failure
  6. Zonetransfer.me on nsztm1 appears to be down
  7. from 2
  8. deadbeef.zonetransfer.me. 7201  IN      AAAA    dead:beaf::
  9.  
  10. Running all the commands from the command line they work fine
  11.  
  12. -----
  13.  
  14. #!/usr/bin/env bash
  15.  
  16. echo "from 1"
  17. dig axfr @nsztm1.digi.ninja zonetransfer.me|grep dead:beaf
  18. res=`dig axfr @nsztm1.digi.ninja zonetransfer.me|grep dead:beaf`
  19.  
  20. if [[ "$res" == "" ]]
  21. then
  22.     echo "Zonetransfer.me on nsztm1 appears to be down"
  23. fi
  24.  
  25. echo "from 2"
  26. res=`dig axfr @nsztm2.digi.ninja zonetransfer.me|grep dead:beaf`
  27. dig axfr @nsztm2.digi.ninja zonetransfer.me|grep dead:beaf
  28.  
  29. if [[ "$res" == "" ]]
  30. then
  31.     echo "Zonetransfer.me on nsztm2 appears to be down"
  32. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement