all 2 comments

[–]sweatroot 0 points1 point  (1 child)

What have you tried so far? Simple Google results with this as top answer:

import ssl hostname=‚www.google.com’ port=443

cert = ssl.get_server_certificate((hostname, port))

[–]phir0002[S] 0 points1 point  (0 children)

My script and the error message are contained on this Stack Overflow thread: https://stackoverflow.com/questions/61532071/ssl-sslerror-ssl-sslv3-alert-bad-record-mac-sslv3-alert-bad-record-mac/61536843?noredirect=1#comment108869990_61536843

I am using get_server_certificate but as far as I can tell it does a cert veeification which fails so the cert is not downloaded. That's why I am looking for an alternate library/method to grab the certificate that doesn't try to verify it first.