From 174247e5a951b0cec5a5ac5784feaa9f291a8fb3 Mon Sep 17 00:00:00 2001 From: Veritas Date: Thu, 13 Apr 2017 11:23:53 +0200 Subject: [PATCH] Better OLED-Display-Menu and spelling error fix Capital letter in menu for difference between menu and APs Fix spelling error in APScan.cpp ("seect" -> "select") Format files with Strg+T in Arduino-IDE - looks better ;-) --- esp8266_deauther/APScan.cpp | 318 +- esp8266_deauther/APScan.h | 18 +- esp8266_deauther/Attack.cpp | 368 +- esp8266_deauther/Attack.h | 28 +- esp8266_deauther/ClientScan.cpp | 134 +- esp8266_deauther/ClientScan.h | 18 +- esp8266_deauther/Mac.cpp | 50 +- esp8266_deauther/MacList.cpp | 58 +- esp8266_deauther/MacList.h | 6 +- esp8266_deauther/NameList.cpp | 76 +- esp8266_deauther/NameList.h | 10 +- esp8266_deauther/SSIDList.cpp | 94 +- esp8266_deauther/SSIDList.h | 8 +- esp8266_deauther/Settings.cpp | 154 +- esp8266_deauther/Settings.h | 8 +- esp8266_deauther/data.h | 46318 ++++++++++++------------ esp8266_deauther/esp8266_deauther.ino | 281 +- 17 files changed, 24003 insertions(+), 23944 deletions(-) diff --git a/esp8266_deauther/APScan.cpp b/esp8266_deauther/APScan.cpp index 1465597..1c648ad 100644 --- a/esp8266_deauther/APScan.cpp +++ b/esp8266_deauther/APScan.cpp @@ -1,86 +1,86 @@ #include "APScan.h" -APScan::APScan(){ - +APScan::APScan() { + } -bool APScan::start(){ - if(debug){ - Serial.println("starting AP scan..."); - Serial.println("MAC - Ch - RSSI - Encrypt. - SSID - Hidden");// - Vendor"); +bool APScan::start() { + if (debug) { + Serial.println("starting AP scan..."); + Serial.println("MAC - Ch - RSSI - Encrypt. - SSID - Hidden");// - Vendor"); + } + aps._clear(); + for (int i = 0; i < maxAPScanResults; i++) selected[i] = false; + results = WiFi.scanNetworks(false, settings.apScanHidden); // lets scanNetworks return hidden APs. (async = false & show_hidden = true) + + for (int i = 0; i < results && i < maxAPScanResults; i++) { + Mac _ap; + _ap.set(WiFi.BSSID(i)[0], WiFi.BSSID(i)[1], WiFi.BSSID(i)[2], WiFi.BSSID(i)[3], WiFi.BSSID(i)[4], WiFi.BSSID(i)[5]); + aps.add(_ap); + channels[i] = WiFi.channel(i); + rssi[i] = WiFi.RSSI(i); + encryption[i] = WiFi.encryptionType(i); + hidden[i] = WiFi.isHidden(i); + String _ssid = WiFi.SSID(i); + _ssid.replace("\"", "\\\""); + _ssid.toCharArray(names[i], 33); + //data_getVendor(WiFi.BSSID(i)[0],WiFi.BSSID(i)[1],WiFi.BSSID(i)[2]).toCharArray(vendors[i],9); + if (debug) { + Serial.print((String)i); + Serial.print(" - "); + _ap._print(); + Serial.print(" - "); + Serial.print(channels[i]); + Serial.print(" - "); + Serial.print(rssi[i]); + Serial.print(" - "); + Serial.print(getEncryption(encryption[i])); + Serial.print(" - "); + Serial.print(names[i]); + Serial.print(" - "); + Serial.print(hidden[i]); + //Serial.print(" - "); + //Serial.print(vendors[i]); + Serial.println(); } - aps._clear(); - for(int i=0;i