Skip to content

Instantly share code, notes, and snippets.

@nopolabs
Created April 4, 2020 00:42
Show Gist options
  • Save nopolabs/425638df428a72a44f71ef74ea947a24 to your computer and use it in GitHub Desktop.
Save nopolabs/425638df428a72a44f71ef74ea947a24 to your computer and use it in GitHub Desktop.
find domainconnect settings for a domain
#!/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