diff --git a/src/globals.h b/src/globals.h index aee1fc89..58948a7d 100644 --- a/src/globals.h +++ b/src/globals.h @@ -35,7 +35,7 @@ extern osjob_t sendjob; extern uint16_t macnum, blenum, salt; extern int countermode, screensaver, adrmode, lorasf, txpower, rlim; extern bool joinstate; -extern std::set macs; +extern std::set macs; #ifdef HAS_DISPLAY extern HAS_DISPLAY u8x8; diff --git a/src/main.cpp b/src/main.cpp index df7e61b7..a54489cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,7 +46,7 @@ uint16_t macnum = 0, blenum = 0, salt; uint64_t uptimecounter = 0; bool joinstate = false; -std::set macs; // associative container holds filtered MAC adresses +std::set macs; // associative container holds filtered MAC adresses // this variable will be changed in the ISR, and read in main loop static volatile bool ButtonTriggered = false; diff --git a/src/wifisniffer.cpp b/src/wifisniffer.cpp index 25d6e1a3..bb3fb03c 100644 --- a/src/wifisniffer.cpp +++ b/src/wifisniffer.cpp @@ -62,8 +62,9 @@ void wifi_sniffer_packet_handler(void* buff, wifi_promiscuous_pkt_type_t type) { char counter [6]; // uint16_t -> 2 byte -> 5 decimals + '0' terminator -> 6 chars char macbuf [21]; // uint64_t -> 8 byte -> 20 decimals + '0' terminator -> 21 chars uint64_t addr2int; - uint32_t vendor2int, hashedmac; - std::pair::iterator, bool> newmac; + uint32_t vendor2int; + uint16_t hashedmac; + std::pair::iterator, bool> newmac; if (( cfg.rssilimit == 0 ) || (ppkt->rx_ctrl.rssi > cfg.rssilimit )) { // rssi is negative value addr2int = ( (uint64_t)hdr->addr2[0] ) | ( (uint64_t)hdr->addr2[1] << 8 ) | ( (uint64_t)hdr->addr2[2] << 16 ) | \ @@ -84,7 +85,7 @@ void wifi_sniffer_packet_handler(void* buff, wifi_promiscuous_pkt_type_t type) { macnum++; // increment MAC counter itoa(macnum, counter, 10); // base 10 decimal counter value u8x8.draw2x2String(0, 0, counter); - ESP_LOGI(TAG, "#%05i: RSSI %04d -> Salt %04x -> Hash %08x", macnum, ppkt->rx_ctrl.rssi, salt, hashedmac); + ESP_LOGI(TAG, "#%05i: RSSI %04d -> Salt %04x -> Hash %04x", macnum, ppkt->rx_ctrl.rssi, salt, hashedmac); } #ifdef VENDORFILTER