diff options
author | Jack Lloyd <[email protected]> | 2016-11-21 10:16:02 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-21 10:16:02 -0500 |
commit | ff777b6a6938ba312768f5934701352b1473f189 (patch) | |
tree | 693be4638b9be65b5047c03ad23aa1e93054a45c /src | |
parent | a957796da6343e76130a87eecc4c71c78580c759 (diff) |
Add timeouts to TLS scanner [ci skip]
Diffstat (limited to 'src')
-rwxr-xr-x | src/extra_tests/tls_scanner/tls_scanner.py | 13 | ||||
-rw-r--r-- | src/extra_tests/tls_scanner/urls.txt | 8 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/extra_tests/tls_scanner/tls_scanner.py b/src/extra_tests/tls_scanner/tls_scanner.py index f36ee6bfa..8fdf046ca 100755 --- a/src/extra_tests/tls_scanner/tls_scanner.py +++ b/src/extra_tests/tls_scanner/tls_scanner.py @@ -1,6 +1,7 @@ #!/usr/bin/python2 import sys +import time import subprocess import re @@ -27,16 +28,24 @@ def scanner(args = None): scanners = {} for url in [s.strip() for s in open(args[1]).readlines()]: - scanners[url] = subprocess.Popen(['../../../botan', 'tls_client', url], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) + scanners[url] = subprocess.Popen(['../../../botan', 'tls_client', '--policy=policy.txt', url], + stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) for url in scanners.keys(): scanners[url].stdin.close() report = {} + timeout = 10 for url in scanners.keys(): print "waiting for", url - scanners[url].wait() + + for i in range(timeout): + scanners[url].poll() + if scanners[url].returncode != None: + break + #print "Waiting %d more seconds for %s" % (timeout-i, url) + time.sleep(1) if scanners[url].returncode != None: output = scanners[url].stdout.read() + scanners[url].stderr.read() diff --git a/src/extra_tests/tls_scanner/urls.txt b/src/extra_tests/tls_scanner/urls.txt index 33c7e0870..a5bcf349e 100644 --- a/src/extra_tests/tls_scanner/urls.txt +++ b/src/extra_tests/tls_scanner/urls.txt @@ -22,7 +22,6 @@ hp.com huawei.com ibm.com ietf.org -intel.com intuit.com linkedin.com medium.com @@ -32,6 +31,12 @@ nec.com netflix.com openssl.org oracle.com +sgi.com +chase.com +bankofamerica.com +citibank.com +wellsfargo.com +ebay.com paypal.com pwc.com randombit.net @@ -42,7 +47,6 @@ sas.com siemens.com sony.com stripe.com -swift.com symantec.com tls.mbed.org twitter.com |