Skip to content

Commit 4885876

Browse files
author
Stefan Kremser
committed
Merged branch testing into testing
2 parents 37172d4 + 6112973 commit 4885876

File tree

8 files changed

+1849
-8
lines changed

8 files changed

+1849
-8
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,20 @@ It doesn’t matter which board you use, as long as it has an ESP8266 on it.
100100

101101
**don't forget to save!**
102102

103-
**12** Download and open `esp8266_deauther` > `esp8266_deauther.ino` in Arduino
103+
**12** Download the project
104104

105-
**13** Select your ESP8266 board at `Tools` > `Board` and the right port at `Tools` > `Port`
105+
**13** Go to the SDK_fix folder of this project
106+
107+
**14** Copy ESP8266WiFi.cpp and ESP8266WiFi.h
108+
109+
**15** Past these files here `packages` > `esp8266` > `hardware` > `esp8266` > `2.0.0` > `libraries` > `ESP8266WiFi` > `src`
110+
111+
**16** Open `esp8266_deauther` > `esp8266_deauther.ino` in Arduino
112+
113+
**17** Select your ESP8266 board at `Tools` > `Board` and the right port at `Tools` > `Port`
106114
If no port shows up you may have to reinstall the drivers.
107115

108-
**14** Upload!
116+
**18** Upload!
109117

110118
**Your ESP8266 Deauther is now ready!**
111119

esp8266_deauther/APScan.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ APScan::APScan(){
77
bool APScan::start(){
88
if(debug){
99
Serial.println("starting AP scan...");
10-
Serial.println("MAC - Ch - RSSI - Encrypt. - SSID");// - Vendor");
10+
Serial.println("MAC - Ch - RSSI - Encrypt. - SSID - Hidden");// - Vendor");
1111
}
1212
aps._clear();
1313
for(int i=0;i<maxAPScanResults;i++) selected[i] = false;
14-
results = WiFi.scanNetworks();
14+
results = WiFi.scanNetworks(false, true); // lets scanNetworks return hidden APs. (async = false & show_hidden = true)
1515

1616
for(int i=0;i<results && i<maxAPScanResults;i++){
1717
Mac _ap;
@@ -20,6 +20,7 @@ bool APScan::start(){
2020
channels[i] = WiFi.channel(i);
2121
rssi[i] = WiFi.RSSI(i);
2222
encryption[i] = WiFi.encryptionType(i);
23+
hidden[i] = WiFi.isHidden(i);
2324
String _ssid = WiFi.SSID(i);
2425
_ssid.replace("\"","\\\"");
2526
_ssid.toCharArray(names[i],33);
@@ -34,6 +35,8 @@ bool APScan::start(){
3435
Serial.print(getEncryption(encryption[i]));
3536
Serial.print(" - ");
3637
Serial.print(names[i]);
38+
Serial.print(" - ");
39+
Serial.print(hidden[i]);
3740
//Serial.print(" - ");
3841
//Serial.print(vendors[i]);
3942
Serial.println();
@@ -93,11 +96,15 @@ String APScan::getEncryption(int code){
9396
return "?";
9497
}
9598

96-
String APScan::getAPName(int num){ return names[num]; }
99+
String APScan::getAPName(int num){
100+
if(isHidden(num)) return "* Hidden SSID *";
101+
return names[num];
102+
}
97103
String APScan::getAPEncryption(int num){ return getEncryption(encryption[num]); }
98104
//String APScan::getAPVendor(int num){ return vendors[num]; }
99105
String APScan::getAPMac(int num){ return aps._get(num).toString(); }
100106
bool APScan::getAPSelected(int num){ return selected[num]; }
107+
bool APScan::isHidden(int num){ return hidden[num]; }
101108
int APScan::getAPRSSI(int num){ return rssi[num]; }
102109
int APScan::getAPChannel(int num){ return channels[num]; }
103110

esp8266_deauther/APScan.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class APScan{
2323
//String getAPVendor(int num);
2424
String getAPMac(int num);
2525
bool getAPSelected(int num);
26+
bool isHidden(int num);
2627
int getAPRSSI(int num);
2728
int getAPChannel(int num);
2829

@@ -37,7 +38,8 @@ class APScan{
3738
int rssi[maxAPScanResults];
3839
char names[maxAPScanResults][33];
3940
int encryption[maxAPScanResults];
40-
41+
bool hidden[maxAPScanResults];
42+
4143
String getEncryption(int code);
4244

4345
bool selected[maxAPScanResults];

esp8266_deauther/Attack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void Attack::run(){
154154
prevTime[1] = millis();
155155

156156
for(int a=0;a<apScan.results;a++){
157-
if(apScan.isSelected(a)){
157+
if(apScan.isSelected(a) && !apScan.isHidden(a)){
158158
String _ssid = apScan.getAPName(a);
159159
int _ssidLen = _ssid.length();
160160
int _restSSIDLen = 32 - _ssidLen;

0 commit comments

Comments
 (0)