Skip to content

Commit

Permalink
salt logic modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus K Wilting authored and Klaus K Wilting committed Apr 1, 2018
1 parent 39022e2 commit 0326e03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wifisniffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void wifi_sniffer_packet_handler(void* buff, wifi_promiscuous_pkt_type_t type) {

addr2int |= (uint64_t) salt << 48; // prepend 12 bit salt to 48 bit MAC
itoa(addr2int, macbuf, 10); // convert 64 bit MAC to base 10 decimal string
hashedmac = rokkit(macbuf, 10); // hash MAC, use 10 chars to fit hash in uint32_t container
hashedmac = rokkit(macbuf, 5); // hash MAC, use 5 chars to fit hash in uint16_t container
newmac = macs.insert(hashedmac); // store hashed MAC if new unique
if (newmac.second) { // first time seen MAC
macnum++; // increment MAC counter
Expand Down

0 comments on commit 0326e03

Please sign in to comment.