def __init__(self, frames_queue, output_queue, injection_queue=None): WigProcess.__init__(self) self.__stop__ = Event() self.__queue__ = frames_queue self.__output__ = output_queue self.decoder = ImpactDecoder.Dot11Decoder() self.decoder.FCS_at_end(False) self.__devices__ = dict()
def __init__(self, iface, mac_address): self.devices = dict() self.pd = pcapy.open_live(iface, helpers.PCAP_SNAPLEN, helpers.PCAP_PROMISCOUS, helpers.PCAP_TIMEOUT) bpf_filter = "(type mgt subtype probe-resp) and (wlan addr1 %s)" % mac_address self.pd.setfilter(bpf_filter) datalink = self.pd.datalink() if datalink == helpers.PCAP_DLT_IEEE802_11: self.decoder = ImpactDecoder.Dot11Decoder() elif datalink == helpers.PCAP_DLT_IEEE802_11_RADIOTAP: self.decoder = ImpactDecoder.RadioTapDecoder() else: raise Exception("Invalid datalink.") self.run()
def __init__(self, iface): self.devices = dict() self.pd = pcapy.open_live(iface, helpers.PCAP_SNAPLEN, helpers.PCAP_PROMISCOUS, helpers.PCAP_TIMEOUT) # Filter Action frames with an specific BSSID Address bpf_filter = "wlan[0] = 0xd0 and wlan addr3 00:25:00:ff:94:73" self.pd.setfilter(bpf_filter) datalink = self.pd.datalink() if datalink == helpers.PCAP_DLT_IEEE802_11: self.decoder = ImpactDecoder.Dot11Decoder() elif datalink == helpers.PCAP_DLT_IEEE802_11_RADIOTAP: self.decoder = ImpactDecoder.RadioTapDecoder() else: raise Exception("Invalid datalink.") self.run()
def __init__(self, iface, mac_address): self.devices = dict() self.iface = iface self.pd = pcapy.open_live(iface, helpers.PCAP_SNAPLEN, helpers.PCAP_PROMISCOUS, helpers.PCAP_TIMEOUT) self.mac_address = helpers.get_buffer_from_string_mac_address( mac_address) # We need to capture beacon and probe response frames to get BSSID, SSID and CCX 85 IE. # But we also need to get reassociation response frames with CCX 95 IE. bpf_filter = "(type mgt subtype beacon) or (type mgt subtype probe-resp) or (type mgt subtype reassoc-resp)" self.pd.setfilter(bpf_filter) datalink = self.pd.datalink() if datalink == helpers.PCAP_DLT_IEEE802_11: self.decoder = ImpactDecoder.Dot11Decoder() elif datalink == helpers.PCAP_DLT_IEEE802_11_RADIOTAP: self.decoder = ImpactDecoder.RadioTapDecoder() else: raise Exception("Invalid datalink.") self.run()