jeudi 27 mars 2014

SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC topic





hei ,

I am a newcome to Python.

I am trying to create a python script which will connect to an SSL URL and using the HEAD request will get the status of URL.

For one the link I am getting following error

[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:589)

I am using python on windows.

Following is the code snippet

def checkURLStatusSecure(testhostname,urlsinatest):
global conn, url, res

for url in urlsinatest:
conn = HTTPSConnection(testhostname,'443')
conn.request('HEAD', url)
res = conn.getresponse()
print('|***https://' + testhostname + url + '| %s | %s |' % (res.status, res.reason))
res.close()
conn.close()

Any idea why I am gtting the above mentioned error.

Any help will be appreciable

Python version in 3.4





Aucun commentaire:

Enregistrer un commentaire