Last active
February 24, 2017 05:28
-
-
Save ejholmes/21260f9a771869a4ca0736d1b94d84f3 to your computer and use it in GitHub Desktop.
Check if a website is served through CloudFlare.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
domain=$1 | |
if [[ -z "$(dig +short NS $domain | grep cloudflare)" ]]; then | |
printf "\033[0;32mOK\033[0m\n" | |
else | |
printf "\033[0;31mAFFECTED\033[0m\n" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment