6 class Sniffer(threading.Thread):
7 def __init__(self, args, check_function):
8 threading.Thread.__init__(self)
11 self._recvif = args.recvif[0]
12 self._check_function = check_function
13 self.foundCorrectPacket = False
17 def _checkPacket(self, packet):
18 ret = self._check_function(self._args, packet)
20 self.foundCorrectPacket = True
24 self.packets = sp.sniff(iface=self._recvif,
25 stop_filter=self._checkPacket, timeout=3)