|
import requests |
|
import urllib3 |
|
|
|
from multiprocessing.pool import ThreadPool |
|
|
|
requests.packages.urllib3.disable_warnings() |
|
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'ALL' |
|
|
|
|
|
def process(pair): |
|
url, name = pair |
|
- |
|
try: |
|
requests.get(url, verify=False) |
|
except: |
|
return (url, name, False) |
|
else: |
|
return (url, name, True) |
|
|
|
|
|
bad = [ |
|
("https://expired.badssl.com/", "expired"), |
|
("https://wrong.host.badssl.com/", "wrong.host"), |
|
("https://self-signed.badssl.com/", "self-signed"), |
|
("https://untrusted-root.badssl.com/", "untrusted-root"), |
|
("https://revoked.badssl.com/", "revoked"), |
|
("https://pinning-test.badssl.com/", "pinning-test"), |
|
("https://sha1-intermediate.badssl.com/", "sha1-intermediate"), |
|
("https://client-cert-missing.badssl.com/", "client-cert-missing"), |
|
("https://mixed-script.badssl.com/", "mixed-script"), |
|
("https://very.badssl.com/", "very"), |
|
("http://http.badssl.com/", "http"), |
|
("http://http-textarea.badssl.com/", "http-textarea"), |
|
("http://http-password.badssl.com/", "http-password"), |
|
("http://http-login.badssl.com/", "http-login"), |
|
("http://http-dynamic-login.badssl.com/", "http-dynamic-login"), |
|
("http://http-credit-card.badssl.com/", "http-credit-card"), |
|
("https://rc4-md5.badssl.com/", "rc4-md5"), |
|
("https://rc4.badssl.com/", "rc4"), |
|
("https://3des.badssl.com/", "3des"), |
|
("https://null.badssl.com/", "null"), |
|
("https://mozilla-old.badssl.com/", "mozilla-old"), |
|
("https://dh480.badssl.com/", "dh480"), |
|
("https://dh512.badssl.com/", "dh512"), |
|
("https://dh1024.badssl.com/", "dh1024"), |
|
("https://dh-small-subgroup.badssl.com/", "dh-small-subgroup"), |
|
("https://dh-composite.badssl.com/", "dh-composite"), |
|
("https://invalid-expected-sct.badssl.com/", "invalid-expected-sct"), |
|
("https://no-sct.badssl.com/", "no-sct"), |
|
("https://subdomain.preloaded-hsts.badssl.com/", |
|
"subdomain.preloaded-hsts"), |
|
("https://superfish.badssl.com/", "(Lenovo) Superfish"), |
|
("https://edellroot.badssl.com/", "(Dell) eDellRoot"), |
|
("https://dsdtestprovider.badssl.com/", "(Dell) DSD Test Provider"), |
|
("https://preact-cli.badssl.com/", "preact-cli"), |
|
("https://webpack-dev-server.badssl.com/", "webpack-dev-server"), |
|
("https://captive-portal.badssl.com/", "captive-portal"), |
|
("https://mitm-software.badssl.com/", "mitm-software"), |
|
("https://sha1-2017.badssl.com/", "sha1-2017"), |
|
] |
|
|
|
pool = ThreadPool(15) |
|
results = pool.map(process, bad) |
|
for x in results: |
|
url, name, res = x |
|
|
|
if not res: |
|
print('Failed', url, name) |