setup macsniff with ota trigger mac
This commit is contained in:
parent
2ec6966496
commit
e92bcbd8b1
@ -12,6 +12,7 @@
|
||||
#define MAC_SNIFF_WIFI 0
|
||||
#define MAC_SNIFF_BLE 1
|
||||
|
||||
void macsniff_setup(void);
|
||||
uint16_t get_salt(void);
|
||||
uint64_t macConvert(uint8_t *paddr);
|
||||
bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type);
|
||||
|
@ -6,10 +6,22 @@
|
||||
#include "vendor_array.h"
|
||||
#endif
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
// Local logging tag
|
||||
static const char TAG[] = __FILE__;
|
||||
|
||||
uint16_t salt;
|
||||
uint64_t fota_trigger_mac;
|
||||
|
||||
void macsniff_setup() {
|
||||
std::stringstream ss;
|
||||
ss << std::hex << OTA_TRIGGER_MAC;
|
||||
ESP_LOGI(TAG, "OTA_TRIGGER_MAC %X", OTA_TRIGGER_MAC);
|
||||
ss >> fota_trigger_mac;
|
||||
std::cout << static_cast<int>(fota_trigger_mac) << std::endl;
|
||||
}
|
||||
|
||||
uint16_t get_salt(void) {
|
||||
salt = (uint16_t)random(65536); // get new 16bit random for salting hashes
|
||||
|
@ -444,6 +444,8 @@ void setup() {
|
||||
// show compiled features
|
||||
ESP_LOGI(TAG, "Features:%s", features);
|
||||
|
||||
macsniff_setup();
|
||||
|
||||
uart_setup();
|
||||
|
||||
} // setup()
|
||||
|
Loading…
Reference in New Issue
Block a user