def __sniff(self): interfaces = WirelessInterface.get_interfaces() mon = False for i in interfaces: if i.get_mode() == "Monitor": mon = True if not mon: print("[!] Sniffer.__sniff(): No monitor interfaces, show dialog...") return sniff(prn=self.__callback_packet, stop_filter=self.__callback_stop)
def interfaces_update(self): interfaces = WirelessInterface.get_interfaces() self.interfaces_clear() for i in interfaces: self.interface_append(i.get_as_tuple())