Skip to content

Instantly share code, notes, and snippets.

@AlexAtkinson
Last active November 12, 2025 19:23
Show Gist options
  • Select an option

  • Save AlexAtkinson/ba5162a4f945321943f756d398fe6084 to your computer and use it in GitHub Desktop.

Select an option

Save AlexAtkinson/ba5162a4f945321943f756d398fe6084 to your computer and use it in GitHub Desktop.
Flyover subdomain detection.
#!/bin/env bash
# Checks if subdomain.$1 is registered.
# Iterates the 1000 most popular subdomains.
# NOTE: Can be changed to 10000, or even 100000.
#
# Usage:
# ./dnsSUBflyover.sh nike.com
#
# NOTE:
# For more subdomains:
# https://github.com/YashGoti/Subdomain
# https://github.com/aboul3la/Sublist3r
# ----------------------------------
if [ "$#" == "0" ]; then
echo "Exactly one argument required! EG: nike.com"
exit 1
fi
# https://github.com/bitquark/dnspop/blob/master/results/bitquark_20160227_subdomains_popular_1000
SUBS=($(
printf ' '
while read sub; do
printf "${sub,,} "
done <<< $(curl -sS "https://raw.githubusercontent.com/bitquark/dnspop/master/results/bitquark_20160227_subdomains_popular_1000")
)
)
ELEMENTS=${#SUBS[@]}
while (( "$#" )); do
for (( i=0;i<$ELEMENTS;i++)); do
dig ${SUBS[${i}]}.$1 +short | grep -v -e '^$' > /dev/null && echo "${SUBS[${i}]}.$1 : registered"
done
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment