salt logic modified
This commit is contained in:
parent
7c906c5d6b
commit
39022e2340
@ -35,7 +35,7 @@ extern osjob_t sendjob;
|
|||||||
extern uint16_t macnum, blenum, salt;
|
extern uint16_t macnum, blenum, salt;
|
||||||
extern int countermode, screensaver, adrmode, lorasf, txpower, rlim;
|
extern int countermode, screensaver, adrmode, lorasf, txpower, rlim;
|
||||||
extern bool joinstate;
|
extern bool joinstate;
|
||||||
extern std::set<uint32_t> macs;
|
extern std::set<uint16_t> macs;
|
||||||
|
|
||||||
#ifdef HAS_DISPLAY
|
#ifdef HAS_DISPLAY
|
||||||
extern HAS_DISPLAY u8x8;
|
extern HAS_DISPLAY u8x8;
|
||||||
|
@ -46,7 +46,7 @@ uint16_t macnum = 0, blenum = 0, salt;
|
|||||||
uint64_t uptimecounter = 0;
|
uint64_t uptimecounter = 0;
|
||||||
bool joinstate = false;
|
bool joinstate = false;
|
||||||
|
|
||||||
std::set<uint32_t> macs; // associative container holds filtered MAC adresses
|
std::set<uint16_t> macs; // associative container holds filtered MAC adresses
|
||||||
|
|
||||||
// this variable will be changed in the ISR, and read in main loop
|
// this variable will be changed in the ISR, and read in main loop
|
||||||
static volatile bool ButtonTriggered = false;
|
static volatile bool ButtonTriggered = false;
|
||||||
|
@ -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 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
|
char macbuf [21]; // uint64_t -> 8 byte -> 20 decimals + '0' terminator -> 21 chars
|
||||||
uint64_t addr2int;
|
uint64_t addr2int;
|
||||||
uint32_t vendor2int, hashedmac;
|
uint32_t vendor2int;
|
||||||
std::pair<std::set<uint32_t>::iterator, bool> newmac;
|
uint16_t hashedmac;
|
||||||
|
std::pair<std::set<uint16_t>::iterator, bool> newmac;
|
||||||
|
|
||||||
if (( cfg.rssilimit == 0 ) || (ppkt->rx_ctrl.rssi > cfg.rssilimit )) { // rssi is negative value
|
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 ) | \
|
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
|
macnum++; // increment MAC counter
|
||||||
itoa(macnum, counter, 10); // base 10 decimal counter value
|
itoa(macnum, counter, 10); // base 10 decimal counter value
|
||||||
u8x8.draw2x2String(0, 0, counter);
|
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
|
#ifdef VENDORFILTER
|
||||||
|
Loading…
Reference in New Issue
Block a user