Skip to content

Instantly share code, notes, and snippets.

@OlivierLaflamme
Last active April 10, 2024 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OlivierLaflamme/6cd604339a4dcb92bc8744d763918925 to your computer and use it in GitHub Desktop.
Save OlivierLaflamme/6cd604339a4dcb92bc8744d763918925 to your computer and use it in GitHub Desktop.
validate domain before subfinder on scope just `cat output.txt| cut -d':' -f1 | sort | uniq`
#!/bin/bash
# Define the function to check web application for a domain
check_domain() {
domain=$1
echo "$domain"
response=$(curl -sL -w "%{http_code}\\n" "$domain" -o /dev/null)
if [ "$response" != "000" ]; then
echo "$domain: $response"
echo "$domain: $response" >> output.txt
fi
}
# Export the function to make it available to parallel
export -f check_domain
# Run in parallel
parallel -a domains.txt check_domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment