From 3448a08875952e374beb60af5d39ee642e6d09b5 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sat, 31 Mar 2018 21:50:03 +0200 Subject: [PATCH] srand() init with temperature --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 007b8341..47b6d84b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -219,11 +219,10 @@ void wifi_sniffer_loop(void * pvParameters) { // clear counter if not in cumulative counter mode if (cfg.countermode != 1) { macs.clear(); // clear macs container - //srand(macnum); // use macnum to reinitialize pseudorandom generator srand((uint32_t) temperatureRead()); // use chip temperature for pseudorandom generator init + salt = rand() % 256; // get new random int between 0 and 255 for salting MAC hashes macnum = 0; u8x8.clearLine(0); u8x8.clearLine(1); // clear Display counter - salt = rand() % 256; // get new random int between 0 and 255 for salting MAC hashes ESP_LOGI(TAG, "Scan cycle completed, new salt value: %i", salt); }