List SAN domains for a certificate

echo | openssl s_client -connect google.com:443 2>&1 | openssl x509 -noout -text | awk -F, -v OFS="\n" '/DNS:/{x=gsub(/ *DNS:/, ""); $1=$1; print $0}'
List SAN Domains for a certificate
Sample Output
*.google.com
*.android.com
*.appengine.google.com
*.cloud.google.com
*.crowdsource.google.com
*.g.co
*.gcp.gvt2.com
*.gcpcdn.gvt1.com
*.ggpht.cn
*.gkecnapps.cn
*.google-analytics.com
*.google.ca
*.google.cl
*.google.co.in
*.google.co.jp
*.google.co.uk
*.google.com.ar
*.google.com.au
*.google.com.br
*.google.com.co
*.google.com.mx
*.google.com.tr
*.google.com.vn
*.google.de
*.google.es
*.google.fr
*.google.hu
*.google.it
*.google.nl
*.google.pl
*.google.pt
*.googleadapis.com
*.googleapis.cn
*.googlecnapps.cn
*.googlecommerce.com
*.googlevideo.com
*.gstatic.cn
*.gstatic.com
*.gstaticcnapps.cn
*.gvt1.com
*.gvt2.com
*.metric.gstatic.com
*.urchin.com
*.url.google.com
*.wear.gkecnapps.cn
*.youtube-nocookie.com
*.youtube.com
*.youtubeeducation.com
*.youtubekids.com
*.yt.be
*.ytimg.com
android.clients.google.com
android.com
developer.android.google.cn
developers.android.google.cn
g.co
ggpht.cn
gkecnapps.cn
goo.gl
google-analytics.com
google.com
googlecnapps.cn
googlecommerce.com
source.android.google.cn
urchin.com
www.goo.gl
youtu.be
youtube.com
youtubeeducation.com
youtubekids.com
yt.be

0
By: shadyabhi
2020-04-10 06:56:51

What Others Think

[Nice](https://www.commandlinefu.com/)
samuelddarden · 12 weeks and 3 days ago
google [url=https://google.com/]google[/url]
samuelddarden · 12 weeks and 3 days ago
The information is worth thinking over. I am really thankful to you for posting this blog. Ghd sports APK
GHDSPORTSAPK · 10 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: