Wednesday, February 17, 2021

OpenSSL: extract web server certificate details

 echo | openssl s_client -showcerts -servername www.ibm.com -connect www.ibm.com:443 2>/dev/null | openssl x509 -inform pem -noout -text


Script:

inputFile=$1

domainName=$2


awk -v domainName="$domainName" '{print "\necho ==== " $1 "." domainName "====\necho | openssl s_client -showcerts -servername " $1 "." domainName " -connect " $1 "." domainName ":443 2>/dev/null | openssl x509 -inform pem -noout -text" }' $inputFile


Retrieve Ciphers Accepted on remote webserver.

nmap -sV -p 443 --script ssl-enum-ciphers www.ibm.com

No comments:

Post a Comment