digininja icon

zonetransfer.me up check script

digininja | PRO | 01/18/18 11:08:02 AM UTC | 0 ⭐ | 581 👁️ | Never ⏰ | []
Bash |

820 B

|

None

|

0 👍

/

0 👎

This should work but returns:
 
from 1
dig: couldn't get address for 'nsztm1.digi.ninja': failure
dig: couldn't get address for 'nsztm1.digi.ninja': failure
Zonetransfer.me on nsztm1 appears to be down
from 2
deadbeef.zonetransfer.me. 7201  IN      AAAA    dead:beaf::
 
Running all the commands from the command line they work fine
 
-----
 
#!/usr/bin/env bash
 
echo "from 1"
dig axfr @nsztm1.digi.ninja zonetransfer.me|grep dead:beaf
res=`dig axfr @nsztm1.digi.ninja zonetransfer.me|grep dead:beaf`
 
if [[ "$res" == "" ]]
then
    echo "Zonetransfer.me on nsztm1 appears to be down"
fi
 
echo "from 2"
res=`dig axfr @nsztm2.digi.ninja zonetransfer.me|grep dead:beaf`
dig axfr @nsztm2.digi.ninja zonetransfer.me|grep dead:beaf
 
if [[ "$res" == "" ]]
then
    echo "Zonetransfer.me on nsztm2 appears to be down"
fi

Comments