From eebcb4f73a6df54e5007721190d1683c26425ff1 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 1 Apr 2018 13:24:02 +0200 Subject: [PATCH] MAC mask removed again --- src/main.h | 3 +-- src/wifisniffer.cpp | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main.h b/src/main.h index ce960cd2..c01b8e6e 100644 --- a/src/main.h +++ b/src/main.h @@ -19,8 +19,7 @@ #define WIFI_CHANNEL_MIN 1 // start channel number where scan begings #define WIFI_CHANNEL_MAX 13 // total channel number to scan #define WIFI_MY_COUNTRY "EU" // for Wifi RF settings -#define WIFI_CHANNEL_SWITCH_INTERVAL 50 // [seconds/100] -> 0,5 sec. -#define WIFI_MAC_FILTER_MASK 0x000000000003 // filter local and group MACs +#define WIFI_CHANNEL_SWITCH_INTERVAL 50 // [seconds/100] -> 0,5 sec. // Default LoRa Spreadfactor #define LORASFDEFAULT 9 // 7 ... 12 diff --git a/src/wifisniffer.cpp b/src/wifisniffer.cpp index 6b84f61c..56f7bd47 100644 --- a/src/wifisniffer.cpp +++ b/src/wifisniffer.cpp @@ -70,14 +70,10 @@ void wifi_sniffer_packet_handler(void* buff, wifi_promiscuous_pkt_type_t type) { addr2int = ( (uint64_t)hdr->addr2[0] ) | ( (uint64_t)hdr->addr2[1] << 8 ) | ( (uint64_t)hdr->addr2[2] << 16 ) | \ ( (uint64_t)hdr->addr2[3] << 24 ) | ( (uint64_t)hdr->addr2[4] << 32 ) | ( (uint64_t)hdr->addr2[5] << 40 ); -#ifdef VENDORFILTER +#ifdef VENDORFILTER // uses vendor array with prefiltered OUIs (no local nd no group MACs, bits 0+1 in 1st byte of OUI) vendor2int = ( (uint32_t)hdr->addr2[2] ) | ( (uint32_t)hdr->addr2[1] << 8 ) | ( (uint32_t)hdr->addr2[0] << 16 ); - if ( std::find(vendors.begin(), vendors.end(), vendor2int) != vendors.end() ) { #endif - - //if (!(addr2int & WIFI_MAC_FILTER_MASK)) { // filter local and group MACs - // salt and hash MAC, and if new unique one, store hash in container and increment counter on display addr2int <<= 16; // left shift out 2 bytes of vendor oui to give space for salt addr2int |= salt; // append salt value to MAC before hashing it @@ -92,7 +88,6 @@ void wifi_sniffer_packet_handler(void* buff, wifi_promiscuous_pkt_type_t type) { } else // already seen MAC ESP_LOGI(TAG, "RSSI %04d -> already seen", ppkt->rx_ctrl.rssi); - //} #ifdef VENDORFILTER }