In the end of setup():
pinMode(D6, INPUT_PULLUP); // enable button pin
At the end of loop():
if(digitalRead(D6)){
if(!attack.isRunning()){
serialInterface.runCommand("stopap"); // stop access point and web interface