Exemple #1
0
 def _handle(self, flow, message):
     if not message.parsed:
         # if this is the first message in the connection we just skip it
         return 'done'
     for msg in message.parsed:
         typ = structs.message_type(msg, from_frontend=message.from_client)
         if typ == self.packet_kind:
             matches = structs.message_matches(msg, self.filters, message.from_client)
             if matches:
                 return 'pass'
     return 'done'
Exemple #2
0
 def _handle(self, flow, message):
     if not message.parsed:
         # if this is the first message in the connection we just skip it
         return 'done'
     for msg in message.parsed:
         typ = structs.message_type(msg, from_frontend=message.from_client)
         if typ == self.packet_kind:
             matches = structs.message_matches(msg, self.filters, message.from_client)
             if matches:
                 return 'pass'
     return 'done'