def parse_ssl2(message, enforce_length=True):
 try:
  (record, size) = types.Sslv2Record.from_stream(message)
  if (enforce_length and (size != len(message))):
   return None
  return record
 except (IndexError, ValueError, struct.error) as e:
  return None

def parse_ssl2 ( message , enforce_length = True ) : try : ( record , size ) = types . Sslv2Record . from_stream ( message ) if ( enforce_length and ( size != len ( message ) ) ) : return None return record except ( IndexError , ValueError , struct . error ) as e : return None
try and parse an sslv2 record from message .