@@ -15,15 +15,14 @@ extern "C" {
1515#include " Attack.h"
1616
1717const static char *ssid = " pwned" ;
18- const static char *password = " deauther" ;
18+ const static char *password = " deauther" ; // must have at least 8 characters
1919
2020ESP8266WebServer server (80 );
2121
2222/*
2323I had some troubles implementing singleton classes.
2424see: https://github.com/esp8266/Arduino/issues/500
25- They fixed this issue with in the newer SDK version (the one we can't use),
26- so I used global variables.
25+ They fixed this issue within a newer SDK version - the one we can't use, so I used global variables.
2726*/
2827
2928NameList nameList;
@@ -39,9 +38,13 @@ void sniffer(uint8_t *buf, uint16_t len){
3938void startWifi (){
4039 WiFi.mode (WIFI_STA);
4140 wifi_set_promiscuous_rx_cb (sniffer);
42- WiFi.softAP (ssid, password);
43- Serial.println (" SSID: " +(String)ssid);
44- Serial.println (" Password: " +(String)password);
41+ WiFi.softAP (ssid, password); // for an open network without a password change to: WiFi.softAP(ssid);
42+ String _ssid = (String)ssid;
43+ String _password = (String)password;
44+ Serial.println (" SSID: " +_ssid);
45+ Serial.println (" Password: " +_password);
46+ if (_password.length ()<8 ) Serial.println (" WARNING: password must have at least 8 characters!" );
47+ if (_ssid.length ()<1 || _ssid.length ()>32 ) Serial.println (" WARNING: SSID length must be between 1 and 32 characters!" );
4548}
4649
4750
@@ -131,7 +134,7 @@ void startClientScan(){
131134 server.send (200 , " text/json" , " true" );
132135 clientScan.start (server.arg (" time" ).toInt ());
133136 attack.stop (0 );
134- } else server.send ( 200 , " text/json" , " false " );
137+ } else server.send ( 200 , " text/json" , " Error: no selected access point " );
135138}
136139
137140void sendClientResults (){ server.send ( 200 , " text/json" , clientScan.getResults ()); }
0 commit comments