Skip to content

Instantly share code, notes, and snippets.

@muety
Created February 8, 2026 09:09
Show Gist options
  • Select an option

  • Save muety/e36f045cd014c7847876f3181219e06f to your computer and use it in GitHub Desktop.

Select an option

Save muety/e36f045cd014c7847876f3181219e06f to your computer and use it in GitHub Desktop.
Read a list of domains (e.g. from subfinder) and check whether they resolve to successful HTTP responses
#!/bin/bash
# Example:
# subfinder -d wakapi.dev | subchecker.sh
while read -r domain; do
if curl -s -o /dev/null -w "%{http_code}" "https://$domain" | grep -q "^2"; then
echo "https://$domain: OK"
else
echo "$domain: FAILED"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment