"""Utilities"""

def is_ssl_handshake(buf):
    """Detect an SSLv2 or SSLv3 handshake"""

    # SSLv3
    v = buf[:3]
    if v in ("\x16\x03\x00", "\x16\x03\x01", "\x16\x03\x02"):
        return True

    # SSLv2
    v = list(iterbytes(buf[:2])) + [0x00, 0x00]
    if (v[0] & 0x80 == 0x80) and ((v[0] & 0x7f) << 8 | v[1]) > 9:
        return True

@@ -10,16 +10,44 @@
 ies%22%22%22%0A%0A
+from six import iterbytes%0A%0A%0A
 def is_s
@@ -348,28 +348,29 @@
 %5D) %3E 9:%0A        return True%0A
+%0A

fix crash: name 'iterbytes' is not defined