Last active
April 10, 2024 18:08
-
-
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`
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 | |
# 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