Remove Loading
This commit is contained in:
parent
43ebb12f4c
commit
66ff78b9cf
@ -52,15 +52,14 @@ def analyze_ssl(host, context):
|
|||||||
from urllib2 import urlopen
|
from urllib2 import urlopen
|
||||||
|
|
||||||
api_url = 'https://api.ssllabs.com/api/v3/'
|
api_url = 'https://api.ssllabs.com/api/v3/'
|
||||||
counter = 0
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
main_request = loads(urlopen(api_url + 'analyze?host={}'.format(host)).read().decode('utf-8'))
|
main_request = loads(urlopen(api_url + 'analyze?host={}'.format(host)).read().decode('utf-8'))
|
||||||
if main_request['status'] in ['DNS', 'IN_PROGRESS']:
|
if main_request['status'] == 'DNS':
|
||||||
print('Analyzing {}. Please wait'.format(host) + '.' * counter)
|
print('Analyzing the security of {}. Please wait...'.format(host))
|
||||||
sys.stdout.write("\033[F")
|
|
||||||
counter += 1
|
|
||||||
continue
|
continue
|
||||||
|
if main_request['status'] == 'IN_PROGRESS':
|
||||||
|
# We can find a way to show the progress
|
||||||
|
pass
|
||||||
elif main_request['status'] == 'READY':
|
elif main_request['status'] == 'READY':
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user