parameters: (pkt)
docstring: Check for SYN fragmentation. Drop a packet if
          SYN flag is set, and IP flag is set to "MF" or
          fragment offset > 0.
  
          Args:
              scapy_pkt (scapy_object): Packet to filter
  
          Raises:
              None
  
          Returns:
              bool (int): Allow or drop
docstring_summary: Check for SYN fragmentation. Drop a packet if
          SYN flag is set, and IP flag is set to "MF" or
          fragment offset > 0.
docstring_tokens: Check for SYN fragmentation . Drop a packet if SYN flag is set and IP flag is set to MF or fragment offset > 0 .
function: def syn_fragmentation_attack(pkt):
          """
          Check for SYN fragmentation. Drop a packet if
          SYN flag is set, and IP flag is set to "MF" or
          fragment offset > 0.
  
          Args:
              scapy_pkt (scapy_object): Packet to filter
  
          Raises:
              None
  
          Returns:
              bool (int): Allow or drop
          """
          if (pkt.haslayer(scapy.IP) and
              pkt.haslayer(scapy.TCP)):
              tcp_flag = pkt[scapy.TCP].flags
              if tcp_flag == "S":
                  flags = str(pkt[scapy.IP].flags)
                  frag = int(pkt[scapy.IP].frag)
                  if (flags == "MF" or frag > 0):
                      return 0
                  else:
                      return 1
              else:
                  return 1
          else:
              return 1
function_tokens: def syn_fragmentation_attack ( pkt ) : if ( pkt . haslayer ( scapy . IP ) and pkt . haslayer ( scapy . TCP ) ) : tcp_flag = pkt [ scapy . TCP ] . flags if tcp_flag == "S" : flags = str ( pkt [ scapy . IP ] . flags ) frag = int ( pkt [ scapy . IP ] . frag ) if ( flags == "MF" or frag > 0 ) : return 0 else : return 1 else : return 1 else : return 1