Update macsniff.cpp
added: CWA-handling
This commit is contained in:
		
							parent
							
								
									ad288b7058
								
							
						
					
					
						commit
						e9800db481
					
				@ -10,7 +10,9 @@
 | 
			
		||||
// Local logging tag
 | 
			
		||||
static const char TAG[] = __FILE__;
 | 
			
		||||
 | 
			
		||||
uint16_t salt;
 | 
			
		||||
// used here and in corona.cpp
 | 
			
		||||
uint16_t salt = -1;
 | 
			
		||||
uint16_t hashedmac = -1; // temporary buffer for generated hash value
 | 
			
		||||
 | 
			
		||||
uint16_t get_salt(void) {
 | 
			
		||||
  salt = (uint16_t)random(65536); // get new 16bit random for salting hashes
 | 
			
		||||
@ -51,7 +53,6 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
 | 
			
		||||
  char buff[10]; // temporary buffer for printf
 | 
			
		||||
  bool added = false;
 | 
			
		||||
  int8_t beaconID;    // beacon number in test monitor mode
 | 
			
		||||
  uint16_t hashedmac; // temporary buffer for generated hash value
 | 
			
		||||
  uint32_t *mac;      // temporary buffer for shortened MAC
 | 
			
		||||
 | 
			
		||||
  // only last 3 MAC Address bytes are used for MAC address anonymization
 | 
			
		||||
@ -118,11 +119,18 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
 | 
			
		||||
    // Log scan result
 | 
			
		||||
    ESP_LOGV(TAG,
 | 
			
		||||
             "%s %s RSSI %ddBi -> salted MAC %s -> Hash %04X -> WiFi:%d  "
 | 
			
		||||
             "BLTH:%d -> "
 | 
			
		||||
             "%d Bytes left",
 | 
			
		||||
             "BLTH:%d "
 | 
			
		||||
#if (COUNT_CWA)
 | 
			
		||||
            "(CWA:%d)"
 | 
			
		||||
#endif                     
 | 
			
		||||
             "-> %d Bytes left",
 | 
			
		||||
             added ? "new  " : "known",
 | 
			
		||||
             sniff_type == MAC_SNIFF_WIFI ? "WiFi" : "BLTH", rssi, buff,
 | 
			
		||||
             hashedmac, macs_wifi, macs_ble, getFreeRAM());
 | 
			
		||||
             hashedmac, macs_wifi, macs_ble, 
 | 
			
		||||
#if (COUNT_CWA)
 | 
			
		||||
             cwa_report(),
 | 
			
		||||
#endif
 | 
			
		||||
             getFreeRAM());
 | 
			
		||||
 | 
			
		||||
#if (VENDORFILTER)
 | 
			
		||||
  } else {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user