From 75087e12f6986031a23aecddf61988324ae2df2d Mon Sep 17 00:00:00 2001 From: Stefan Kremser Date: Sat, 25 Feb 2017 15:07:57 +0100 Subject: [PATCH] minor improvements --- esp8266_deauther/Attack.cpp | 30 +++++++----------------------- esp8266_deauther/Attack.h | 2 +- esp8266_deauther/data.h | 4 ++-- htmlfiles/attack.html | 6 +++++- htmlfiles/clients.html | 11 ++++++----- 5 files changed, 21 insertions(+), 32 deletions(-) diff --git a/esp8266_deauther/Attack.cpp b/esp8266_deauther/Attack.cpp index 1de6a60..a71d746 100644 --- a/esp8266_deauther/Attack.cpp +++ b/esp8266_deauther/Attack.cpp @@ -6,7 +6,7 @@ Attack::Attack(){ } void Attack::generate(){ - if(debug) Serial.print("generating Macs"); + if(debug) Serial.print("generating Macs..."); Mac _randomBeaconMac; uint8_t _randomMacBuffer[6]; @@ -16,7 +16,7 @@ void Attack::generate(){ getRandomVendorMac(_randomMacBuffer); for(int i=0;i<6;i++) _randomBeaconMac.setAt(_randomMacBuffer[i],i); }while(beaconAdrs.add(_randomBeaconMac) >= 0); - if(debug) Serial.println(" done"); + if(debug) Serial.println("done"); } void Attack::buildDeauth(Mac _ap, Mac _client, uint8_t type, uint8_t reason){ @@ -165,42 +165,26 @@ void Attack::run(){ Mac _broadcast; _broadcast.set(0xFF,0xFF,0xFF,0xFF,0xFF,0xFF); - wifi_set_channel(_ch); - - //int _selectedClients = 0; + //wifi_set_channel(_ch); for(int c=0;c \ No newline at end of file diff --git a/htmlfiles/clients.html b/htmlfiles/clients.html index 4e1e4dc..3bead6c 100644 --- a/htmlfiles/clients.html +++ b/htmlfiles/clients.html @@ -130,11 +130,12 @@ function changeName(id){ var newName = prompt("Name for "+res.clients[id].mac); - - getResponse("setName.json?id="+id+"&name="+newName,function(responseText){ - if(responseText == "true") getResults(); - else alert("error"); - }); + if(newName != null){ + getResponse("setName.json?id="+id+"&name="+newName,function(responseText){ + if(responseText == "true") getResults(); + else alert("error"); + }); + } } getResponse("ClientScanTime.json",function(responseText){