+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='Check SSL ciphers supported by a host')
+ parser.add_argument("host", metavar='HOST[:PORT]',
+ help="The host to check")
+ args = parser.parse_args()
+
+ # get host, port
+ if ':' in args.host:
+ host, port = args.host.split(':')
+ else:
+ host = args.host
+ port = 443
+
+ # run the test
+ results = test_host(host, port)
+ for protocol, ciphers in results.items():
+ print(protocol+":")
+ if ciphers is None:
+ print(" Is not supported by client or server")
+ else:
+ for cipher, supported in ciphers.items():
+ if supported:
+ print(" "+cipher)
+ print()