Created
April 4, 2020 00:42
-
-
Save nopolabs/425638df428a72a44f71ef74ea947a24 to your computer and use it in GitHub Desktop.
find domainconnect settings for a domain
This file contains 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
#!/usr/bin/env bash | |
DOMAIN=$1 | |
TXT=$(host -t TXT "_domainconnect.${DOMAIN}") | |
HOST=$(host -t TXT "_domainconnect.${DOMAIN}" | tail -1 | sed -En 's/.* descriptive text "([^"]+)"/\1/p') | |
URL="https://${HOST}/v2/${DOMAIN}/settings" | |
echo $TXT | |
echo $URL | |
curl -s $URL | json_pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment