Created
September 4, 2021 07:50
-
-
Save voker2311/62aff7a6a052a4f588c5750249358159 to your computer and use it in GitHub Desktop.
One liner to scrape subdomains from SSL certificates
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
curl -s -X POST https://search.censys.io/api/v1/search/certificates -u $API_KEY:$SECRET -d "{\"query\":\"$TARGET\"}" | jq .results[] | grep subject_dn | grep -oE "CN=.*" | awk -F\" ' | |
{print $1}' | awk -F\= '{print $2}' | grep -v "*" | sort -u | grep -i "$TARGET" > subs.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment