(self, scapy_pkt)
Filter packet based on the specified
        HTTPRequest rules.

        Args:
            scapy_pkt (scapy_object): Packet to filter

        Raises:
            None

        Returns:
            dict:
                'action': User specified action
                'result': Rule matched or not
Filter packet based on the specified
        HTTPRequest rules.
Filter packet based on the specified HTTPRequest rules .
def HTTPRequest(self, scapy_pkt):
        """
        Filter packet based on the specified
        HTTPRequest rules.

        Args:
            scapy_pkt (scapy_object): Packet to filter

        Raises:
            None

        Returns:
            dict:
                'action': User specified action
                'result': Rule matched or not
        """
        try:
            if scapy_pkt.haslayer(scapy.Raw):
                if scapy_pkt[scapy.TCP].dport == 80:
                    # User defined action
                    return self._action_HTTPRequest
                else:
                    # Allow if not found
                    return 1
            else:
                # Allow if not found
                return 1
        except Exception as e:
            self.logger.log(
                str(e),
                logtype="error"
            )
            return 1
def HTTPRequest ( self , scapy_pkt ) : try : if scapy_pkt . haslayer ( scapy . Raw ) : if scapy_pkt [ scapy . TCP ] . dport == 80 : # User defined action return self . _action_HTTPRequest else : # Allow if not found return 1 else : # Allow if not found return 1 except Exception as e : self . logger . log ( str ( e ) , logtype = "error" ) return 1