import click


CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])


@click.command(context_settings=CONTEXT_SETTINGS)
@click.argument("host", type=click.STRING)
@click.argument("port", type=click.INT)
@click.option("--verify-cert", is_flag=True)
def cli(host, port, verify_cert):
    """
    A command line tool to enumerate TLS cipher-suites supported by a server.

    """
    pass

@@ -4,390 +4,1851 @@
 ort 
-click%0A%0A%0ACONTEXT_SETTINGS = dict(help_option_names=%5B%22-h%22, %22--help%22%5D)%0A%0A%0A@click.command(context_settings=CONTEXT_SETTINGS)%0A@click.argument(%22host%22, type=click.STRING)%0A@click.argument(%22port%22, type=click.INT)%0A@click.option(%22--verify-cert%22, is_flag=True)%0Adef cli(host, port, verify_cert):%0A    %22%22%22%0A    A command line tool to enumerate TLS cipher-suites supported by a server.%0A%0A    %22%22%22%0A    pass
+socket%0A%0Aimport click%0A%0Afrom construct import UBInt16%0A%0Afrom tlsenum.parse_hello import (%0A    ClientHello, Extensions, HandshakeFailure, ServerHello%0A)%0Afrom tlsenum.mappings import CipherSuites, ECCurves, ECPointFormat%0A%0ACONTEXT_SETTINGS = dict(help_option_names=%5B%22-h%22, %22--help%22%5D)%0A%0A%0Adef send_client_hello(host, port, data):%0A    %22%22%22%0A    Sends a ClientHello message in bytes.%0A%0A    Returns a ServerHello message in bytes%0A%0A    %22%22%22%0A    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)%0A    s.connect((host, port))%0A    s.send(data)%0A%0A    server_hello = s.recv(5)%0A    server_hello += s.recv(UBInt16(%22length%22).parse(server_hello%5B3:5%5D))%0A%0A    return server_hello%0A%0A%0A@click.command(context_settings=CONTEXT_SETTINGS)%0A@click.argument(%22host%22, type=click.STRING)%0A@click.argument(%22port%22, type=click.INT)%0A@click.option(%22--verify-cert%22, is_flag=True)%0Adef cli(host, port, verify_cert):%0A    %22%22%22%0A    A command line tool to enumerate TLS cipher-suites supported by a server.%0A%0A    %22%22%22%0A    cipher_suites_list = %5Bi.name for i in CipherSuites%5D%0A%0A    extension = Extensions()%0A    extension.sni = host%0A    extension.ec_curves = %5Bi.name for i in ECCurves%5D%0A    extension.ec_point_format = %5Bi.name for i in ECPointFormat%5D%0A%0A    client_hello = ClientHello()%0A    client_hello.protocol_version = %221.2%22%0A    client_hello.deflate = False%0A    client_hello.extensions = extension.build()%0A%0A    supported_cipher_suites = %5B%5D%0A%0A    while True:%0A        client_hello.cipher_suites = cipher_suites_list%0A        server_hello = send_client_hello(host, port, client_hello.build())%0A        try:%0A            server_hello = ServerHello.parse_server_hello(server_hello)%0A        except HandshakeFailure:%0A            break%0A%0A        supported_cipher_suites.append(server_hello.cipher_suite)%0A        cipher_suites_list.remove(server_hello.cipher_suite)%0A%0A    for i in supported_cipher_suites:%0A        print(i)
 %0A

Add very basic logic to figure out supported cipher suites.