Update ssl_checker.py
This commit is contained in:
parent
fd7f729114
commit
82698dafa6
@ -63,14 +63,14 @@ def analyze_ssl(host, context):
|
|||||||
|
|
||||||
api_url = 'https://api.ssllabs.com/api/v3/'
|
api_url = 'https://api.ssllabs.com/api/v3/'
|
||||||
while True:
|
while True:
|
||||||
main_request = loads(urlopen(api_url + 'analyze?host={}'.format(host)).read().decode('utf-8'))
|
main_request = json.loads(urlopen(api_url + 'analyze?host={}'.format(host)).read().decode('utf-8'))
|
||||||
if main_request['status'] in ('DNS', 'IN_PROGRESS'):
|
if main_request['status'] in ('DNS', 'IN_PROGRESS'):
|
||||||
sleep(5)
|
sleep(5)
|
||||||
continue
|
continue
|
||||||
elif main_request['status'] == 'READY':
|
elif main_request['status'] == 'READY':
|
||||||
break
|
break
|
||||||
|
|
||||||
endpoint_data = loads(urlopen(api_url + 'getEndpointData?host={}&s={}'.format(
|
endpoint_data = json.loads(urlopen(api_url + 'getEndpointData?host={}&s={}'.format(
|
||||||
host, main_request['endpoints'][0]['ipAddress'])).read().decode('utf-8'))
|
host, main_request['endpoints'][0]['ipAddress'])).read().decode('utf-8'))
|
||||||
|
|
||||||
# if the certificate is invalid
|
# if the certificate is invalid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user