def detect_other_protocol(server_handshake_bytes):
if server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:5>] == b'<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:4>] == b'<STR_LIT>':<EOL><INDENT>if re.match(b'<STR_LIT>', server_handshake_bytes, re.I):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT><DEDENT>if server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:4>] == b'<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:4>] == b'<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:4>] == b'<STR_LIT>' or server_handshake_bytes[<NUM_LIT:0>:<NUM_LIT:9>] == b'<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return None<EOL>
Looks at the server handshake bytes to try and detect a different protocol

:param server_handshake_bytes:
    A byte string of the handshake data received from the server

:return:
    None, or a unicode string of "ftp", "http", "imap", "pop3", "smtp"