tlsenum/__init__.py
def send_sslv2_client_hello(host, port):
    """
    Sends a SSLv2 ClientHello message in bytes.

    If server supports SSLv2, returns None. Else raise a HandshakeFailure().

    """
    data = construct_sslv2_client_hello()

    try:
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((host, port))
        s.send(data)

        server_hello = s.recv(3)

        if len(server_hello) == 0:
            raise HandshakeFailure()

        if server_hello[2] == 4:
            pass
        else:
            raise HandshakeFailure()

    except socket.error:
        raise HandshakeFailure()

    Sends a SSLv2 ClientHello message in bytes.

    If server supports SSLv2, returns None. Else raise a HandshakeFailure().

    
Sends a SSLv2 ClientHello message in bytes.
If server supports SSLv2, returns None. Else raise a HandshakeFailure().
Sends a SSLv2 ClientHello message in bytes . If server supports SSLv2 returns None . Else raise a HandshakeFailure () .
def send_sslv2_client_hello(host, port):
    data = construct_sslv2_client_hello()
    try:
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((host, port))
        s.send(data)
        server_hello = s.recv(3)
        if len(server_hello) == 0:
            raise HandshakeFailure()
        if server_hello[2] == 4:
            pass
        else:
            raise HandshakeFailure()
    except socket.error:
        raise HandshakeFailure()
def send_sslv2_client_hello ( host , port ) : data = construct_sslv2_client_hello ( ) try : s = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) s . connect ( ( host , port ) ) s . send ( data ) server_hello = s . recv ( 3 ) if len ( server_hello ) == 0 : raise HandshakeFailure ( ) if server_hello [ 2 ] == 4 : pass else : raise HandshakeFailure ( ) except socket . error : raise HandshakeFailure ( )
Sends a SSLv2 ClientHello message in bytes.
Sends a SSLv2 ClientHello message in bytes .
"""
    Sends a SSLv2 ClientHello message in bytes.

    If server supports SSLv2, returns None. Else raise a HandshakeFailure().

    """
host
port