esp8266-deauth icon indicating copy to clipboard operation
esp8266-deauth copied to clipboard

Refresh AP and STA lists

Open an-al-bumcover opened this issue 7 years ago • 0 comments

Thank you for making your code available. I think there is a problem wherein an AP can be added while the loop is running or a MAC/SSID could be changed or spoofed and program would not detect the new devices. I admit I don't fully understand the code but as tested, I plugged in a new router and it was successful at evading the attack.

I considered placing all of the void loop() inside a nonblocking loop but have not tested it. My crappy coding skills led me to think that I could just apply a nonblocking timer to have it restart every minute or so.
Something like this as the first step in the loop():

  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) {
    //Do something here
    ESP.restart();
    // save the last time you reset the ESP
    //I'm thinking this is superfluous b/c it will be reset every time it starts but whatever.
    previousMillis = currentMillis;
  }

Thoughts?

an-al-bumcover avatar Nov 29 '17 21:11 an-al-bumcover