mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-23 06:59:59 +01:00
mobile optimization
- set maxResults to 80 (for APScan & ClientScan) - updated HTML & CSS files - set EEPROM size to 4096 - set namelist length to 50
This commit is contained in:
@@ -70,7 +70,7 @@ String APScan::getResults(){
|
|||||||
json += "\"vendor\": \""+getAPVendor(i)+"\",";
|
json += "\"vendor\": \""+getAPVendor(i)+"\",";
|
||||||
json += "\"selected\": "+getAPSelected(i);
|
json += "\"selected\": "+getAPSelected(i);
|
||||||
json += "}";
|
json += "}";
|
||||||
if((i!=results-1) && (i!=maxResults-1)) json += ",";
|
if(i!=results-1) json += ",";
|
||||||
}
|
}
|
||||||
json += "] }";
|
json += "] }";
|
||||||
return json;
|
return json;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef APScan_h
|
#ifndef APScan_h
|
||||||
#define APScan_h
|
#define APScan_h
|
||||||
|
|
||||||
#define maxResults 30
|
#define maxResults 80
|
||||||
|
|
||||||
#include "ESP8266WiFi.h"
|
#include "ESP8266WiFi.h"
|
||||||
#include "Mac.h"
|
#include "Mac.h"
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ extern "C" {
|
|||||||
#include "APScan.h"
|
#include "APScan.h"
|
||||||
#include "ClientScan.h"
|
#include "ClientScan.h"
|
||||||
|
|
||||||
#define attackNum 4
|
#define attackNum 4 //number of defined attacks
|
||||||
|
|
||||||
#define deauthsPerSecond 10
|
#define deauthsPerSecond 10 //number of deauthentication & disassociation frames sent per second per target.
|
||||||
|
|
||||||
#define beaconPerSecond 10
|
#define beaconPerSecond 10 //number of beacon frames sent per second
|
||||||
#define randomBeacons 50
|
#define randomBeacons 50 //number of generated beacon frames
|
||||||
#define SSIDLen 32
|
#define SSIDLen 32 //SSID length of random generated APs (random beacon spam)
|
||||||
#define randomBeaconChange 3
|
#define randomBeaconChange 3 //time in seconds after new beacon frames are generated
|
||||||
#define beaconChannel 10
|
#define beaconChannel 10 //channel to send beacon frames on (only for the packet bytes, it will actually sent on the current channel)
|
||||||
|
|
||||||
extern void PrintHex8(uint8_t *data, uint8_t length);
|
extern void PrintHex8(uint8_t *data, uint8_t length);
|
||||||
extern void getRandomVendorMac(uint8_t *buf);
|
extern void getRandomVendorMac(uint8_t *buf);
|
||||||
@@ -71,7 +71,7 @@ class Attack
|
|||||||
|
|
||||||
uint8_t beaconNumbers[randomBeacons];
|
uint8_t beaconNumbers[randomBeacons];
|
||||||
|
|
||||||
uint8_t packet[512];
|
uint8_t packet[128];
|
||||||
int packetSize;
|
int packetSize;
|
||||||
|
|
||||||
int randomBeaconCounter = 0;
|
int randomBeaconCounter = 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef ClientScan_h
|
#ifndef ClientScan_h
|
||||||
#define ClientScan_h
|
#define ClientScan_h
|
||||||
|
|
||||||
#define maxResults 30
|
#define maxResults 80
|
||||||
|
|
||||||
#include "ESP8266WiFi.h"
|
#include "ESP8266WiFi.h"
|
||||||
#include "Mac.h"
|
#include "Mac.h"
|
||||||
@@ -39,9 +39,6 @@ class ClientScan{
|
|||||||
int results = 0;
|
int results = 0;
|
||||||
int timeout = 0;
|
int timeout = 0;
|
||||||
|
|
||||||
uint8_t beaconPacket[512];
|
|
||||||
int beaconPacketLen = 0;
|
|
||||||
|
|
||||||
bool sniffing = false;
|
bool sniffing = false;
|
||||||
private:
|
private:
|
||||||
long startTime = 0;
|
long startTime = 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef MacList_h
|
#ifndef MacList_h
|
||||||
#define MacList_h
|
#define MacList_h
|
||||||
|
|
||||||
#define listLen 30
|
#define listLen 80
|
||||||
|
|
||||||
#include "Mac.h"
|
#include "Mac.h"
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ NameList::NameList(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NameList::begin(){
|
void NameList::begin(){
|
||||||
EEPROM.begin(512);
|
EEPROM.begin(eepromSize);
|
||||||
if((listLength*nameLength+6)+1>512) Serial.println("ERROR: EEPROM OVERFLOW!");
|
if((listLength*nameLength+6)+1>eepromSize) Serial.println("ERROR: EEPROM OVERFLOW!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void NameList::load(){
|
void NameList::load(){
|
||||||
|
|||||||
@@ -6,12 +6,13 @@
|
|||||||
#include "MacList.h"
|
#include "MacList.h"
|
||||||
|
|
||||||
#define romAdr 0
|
#define romAdr 0
|
||||||
#define listLength 20
|
#define listLength 50
|
||||||
#define nameLength 14
|
#define nameLength 32
|
||||||
|
#define eepromSize 4096
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The NameList holds and saves all your custom device names in the EEPROM.
|
The NameList holds and saves all your custom device names in the EEPROM.
|
||||||
You can modify the length above, but be careful the EEPROM has only 512 bytes.
|
You can modify the length above, but be careful the EEPROM size is limited.
|
||||||
You may have to call nameList.clear() when uploading for the first time.
|
You may have to call nameList.clear() when uploading for the first time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -15,15 +15,14 @@ extern "C" {
|
|||||||
#include "Attack.h"
|
#include "Attack.h"
|
||||||
|
|
||||||
const static char *ssid = "pwned";
|
const static char *ssid = "pwned";
|
||||||
const static char *password = "deauther";
|
const static char *password = "deauther"; //must have at least 8 characters
|
||||||
|
|
||||||
ESP8266WebServer server(80);
|
ESP8266WebServer server(80);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
I had some troubles implementing singleton classes.
|
I had some troubles implementing singleton classes.
|
||||||
see: https://github.com/esp8266/Arduino/issues/500
|
see: https://github.com/esp8266/Arduino/issues/500
|
||||||
They fixed this issue with in the newer SDK version (the one we can't use),
|
They fixed this issue within a newer SDK version - the one we can't use, so I used global variables.
|
||||||
so I used global variables.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NameList nameList;
|
NameList nameList;
|
||||||
@@ -39,9 +38,13 @@ void sniffer(uint8_t *buf, uint16_t len){
|
|||||||
void startWifi(){
|
void startWifi(){
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
wifi_set_promiscuous_rx_cb(sniffer);
|
wifi_set_promiscuous_rx_cb(sniffer);
|
||||||
WiFi.softAP(ssid, password);
|
WiFi.softAP(ssid, password); //for an open network without a password change to: WiFi.softAP(ssid);
|
||||||
Serial.println("SSID: "+(String)ssid);
|
String _ssid = (String)ssid;
|
||||||
Serial.println("Password: "+(String)password);
|
String _password = (String)password;
|
||||||
|
Serial.println("SSID: "+_ssid);
|
||||||
|
Serial.println("Password: "+_password);
|
||||||
|
if(_password.length()<8) Serial.println("WARNING: password must have at least 8 characters!");
|
||||||
|
if(_ssid.length()<1 || _ssid.length()>32) Serial.println("WARNING: SSID length must be between 1 and 32 characters!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +134,7 @@ void startClientScan(){
|
|||||||
server.send(200, "text/json", "true");
|
server.send(200, "text/json", "true");
|
||||||
clientScan.start(server.arg("time").toInt());
|
clientScan.start(server.arg("time").toInt());
|
||||||
attack.stop(0);
|
attack.stop(0);
|
||||||
} else server.send ( 200, "text/json", "false");
|
} else server.send ( 200, "text/json", "Error: no selected access point");
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendClientResults(){ server.send( 200, "text/json", clientScan.getResults()); }
|
void sendClientResults(){ server.send( 200, "text/json", clientScan.getResults()); }
|
||||||
|
|||||||
@@ -42,9 +42,11 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
var table = document.getElementsByTagName('table')[0];
|
var table = document.getElementsByTagName('table')[0];
|
||||||
@@ -115,7 +117,7 @@
|
|||||||
getResults(true);
|
getResults(true);
|
||||||
},scanTime.value*1000);
|
},scanTime.value*1000);
|
||||||
}
|
}
|
||||||
else alert("error");
|
else alert(responseText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
height: 15px;
|
height: 15px;
|
||||||
background: #c20000;
|
background: #c20000;
|
||||||
}
|
}
|
||||||
|
#wpa_info{
|
||||||
|
padding-left: 0.34em;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script src="functions.js"></script>
|
<script src="functions.js"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
||||||
@@ -43,13 +47,15 @@
|
|||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
</table>
|
</table>
|
||||||
<p class="small">
|
<p class="small" id="wpa_info">
|
||||||
<br />
|
<br />
|
||||||
WPA* = WPA/WPA2 auto mode
|
WPA* = WPA/WPA2 auto mode
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
var table = document.getElementsByTagName('table')[0];
|
var table = document.getElementsByTagName('table')[0];
|
||||||
@@ -85,7 +91,7 @@
|
|||||||
apVendor.innerHTML = "";
|
apVendor.innerHTML = "";
|
||||||
|
|
||||||
var tr = '';
|
var tr = '';
|
||||||
if(res.aps.length > 0) tr += '<tr><th>Ch</th><th>SSID</th><th>RSSI</th><th>Encryption</th><th>Select</th></tr>';
|
if(res.aps.length > 0) tr += '<tr><th>Ch</th><th>SSID</th><th>RSSI</th><th>Encrypt.</th><th>Select</th></tr>';
|
||||||
|
|
||||||
for(var i=0;i<res.aps.length;i++){
|
for(var i=0;i<res.aps.length;i++){
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ h1{
|
|||||||
button{
|
button{
|
||||||
background: #00B0FF;
|
background: #00B0FF;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #7A7A7A;
|
border: 1px solid #7A7A7A80;
|
||||||
border-radius: 12px;
|
border-radius: 14px;
|
||||||
padding: 0.34em 1em;
|
padding: 0.34em 0.3em;
|
||||||
margin-bottom: 0.6em;
|
margin-bottom: 0.6em;
|
||||||
}
|
}
|
||||||
button:hover{
|
button:hover{
|
||||||
@@ -85,7 +85,8 @@ nav a:hover{
|
|||||||
table{
|
table{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 420px;
|
max-width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
background: #222222;
|
background: #222222;
|
||||||
}
|
}
|
||||||
@@ -98,9 +99,8 @@ table td{
|
|||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
}
|
}
|
||||||
table th, table td{
|
table th, table td{
|
||||||
border: 1px solid #000;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0.1em 0.2em;
|
padding: 0.1em 0;
|
||||||
}
|
}
|
||||||
table .selected td{
|
table .selected td{
|
||||||
background: #11a4cc;
|
background: #11a4cc;
|
||||||
|
|||||||
Reference in New Issue
Block a user