(pkt)
return (None, None)
Initialize parsing of the packet
Initialize parsing of the packet
Initialize parsing of the packet
def parse_pkt(pkt):
    """ Initialize parsing of the packet
    """
    if pkt.haslayer(TCP) and pkt.getlayer(TCP).dport == 80 and pkt.haslayer(Raw):
        return parse_http(pkt)
    elif pkt.haslayer(TCP) and pkt.getlayer(TCP).dport == 21:
        return parse_ftp(pkt)
    elif pkt.haslayer(TCP) and pkt.getlayer(TCP).dport == 389:
        return parse_ldap(pkt)
    return (None, None)
def parse_pkt ( pkt ) : if pkt . haslayer ( TCP ) and pkt . getlayer ( TCP ) . dport == 80 and pkt . haslayer ( Raw ) : return parse_http ( pkt ) elif pkt . haslayer ( TCP ) and pkt . getlayer ( TCP ) . dport == 21 : return parse_ftp ( pkt ) elif pkt . haslayer ( TCP ) and pkt . getlayer ( TCP ) . dport == 389 : return parse_ldap ( pkt ) return ( None , None )