Skip to content

Instantly share code, notes, and snippets.

@pd12bbf7608ae1
Created February 2, 2023 09:27
Show Gist options
  • Save pd12bbf7608ae1/c9097f3e3cf2e0da006e2ece06e74914 to your computer and use it in GitHub Desktop.
Save pd12bbf7608ae1/c9097f3e3cf2e0da006e2ece06e74914 to your computer and use it in GitHub Desktop.
doh.sh
#!/bin/bash
## doh.sh name type
endPoint='example.org'
name=${1}; type=${2};
if [[ -z ${name} ]]; then
name=example.org
fi
if [[ -z ${type} ]]; then
type=a
fi
curl --retry 2 --retry-max-time 5 -H 'content-type: dnsquery' -X POST -d "${name},${type}" "https://${endPoint}/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment