Created
February 2, 2023 09:27
-
-
Save pd12bbf7608ae1/c9097f3e3cf2e0da006e2ece06e74914 to your computer and use it in GitHub Desktop.
doh.sh
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
#!/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