if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Check SSL ciphers supported by a host')
+ parser.add_argument("--starttls", dest="starttls",
+ help="Use a STARTTLS variant to establish the TLS connection. Possible values include smpt, imap, xmpp.")
parser.add_argument("host", metavar='HOST[:PORT]',
help="The host to check")
args = parser.parse_args()
host = args.host
port = 443
+ # get options
+ options = []
+ if args.starttls is not None:
+ options += ['-starttls', args.starttls]
+
# run the test
- results = test_host(host, port)
+ results = test_host(host, port, options)
+
+ # print the results
for protocol, ciphers in results.items():
print(protocol+":")
if ciphers is None: