Add sleep for 5 seconds
This commit is contained in:
parent
66ff78b9cf
commit
bbc46201ba
@ -5,6 +5,7 @@ import sys
|
|||||||
from argparse import ArgumentParser, SUPPRESS
|
from argparse import ArgumentParser, SUPPRESS
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from ssl import PROTOCOL_TLSv1
|
from ssl import PROTOCOL_TLSv1
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from OpenSSL import SSL
|
from OpenSSL import SSL
|
||||||
@ -56,9 +57,11 @@ def analyze_ssl(host, context):
|
|||||||
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'] == 'DNS':
|
if main_request['status'] == 'DNS':
|
||||||
print('Analyzing the security of {}. Please wait...'.format(host))
|
print('Analyzing the security of {}. Please wait...'.format(host))
|
||||||
|
sleep(5)
|
||||||
continue
|
continue
|
||||||
if main_request['status'] == 'IN_PROGRESS':
|
if main_request['status'] == 'IN_PROGRESS':
|
||||||
# We can find a way to show the progress
|
# We can find a way to show the progress
|
||||||
|
sleep(5)
|
||||||
pass
|
pass
|
||||||
elif main_request['status'] == 'READY':
|
elif main_request['status'] == 'READY':
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user