Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Cut the flags to the variable flags
- flags=$(dig google.se | grep -o -P '(?<=flags: ).*(?=;)')
- if echo $flags | grep -q ra; then
- echo "It responds to recursive queries"
- else
- echo "It doesn't respond to recursive queries"
- fi
- if echo $flags | grep -q aa; then
- echo "It responds authoritatively"
- else
- echo "It doesn't responds authoritatively"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement