mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-22 14:40:05 +01:00
little improvements
- start beacon spam without a selected AP (not necessary). - added beaconChannel definition to Attack.h
This commit is contained in:
@@ -96,7 +96,7 @@ void Attack::start(int num){
|
||||
|
||||
String Attack::getResults(){
|
||||
|
||||
if(apScan.selected < 0) stati[0] = stati[1] = stati[2] = stati[3] = "no AP";
|
||||
if(apScan.selected < 0) stati[0] = stati[1] = stati[2] = "no AP";
|
||||
|
||||
String json = "{ \"aps\": [";
|
||||
json += "\""+apScan.getAPName(apScan.selected)+"\"";
|
||||
@@ -261,7 +261,6 @@ void Attack::generatePacket(){/*
|
||||
|
||||
if(running[2]){ //target spam
|
||||
|
||||
|
||||
String apName = apScan.getAPName(apScan.selected);
|
||||
|
||||
//adds spaces to the AP-SSID if the name length is smaller then the max size of 32
|
||||
|
||||
@@ -20,6 +20,7 @@ extern "C" {
|
||||
#define randomBeacons 50
|
||||
#define SSIDLen 32
|
||||
#define randomBeaconChange 3
|
||||
#define beaconChannel 10
|
||||
|
||||
extern void PrintHex8(uint8_t *data, uint8_t length);
|
||||
extern void getRandomVendorMac(uint8_t *buf);
|
||||
@@ -95,7 +96,7 @@ class Attack
|
||||
uint8_t beaconPacket_end[13] = {
|
||||
0x01, 0x08, 0x82, 0x84,
|
||||
0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01,
|
||||
0x03 //channel
|
||||
beaconChannel //channel
|
||||
};
|
||||
|
||||
uint8_t beaconWPA2tag[26] = {
|
||||
|
||||
@@ -155,9 +155,11 @@ void setClientName(){
|
||||
void sendAttackInfo(){ server.send ( 200, "text/json", attack.getResults()); }
|
||||
|
||||
void startAttack(){
|
||||
if(server.hasArg("num") && apScan.selected > -1) {
|
||||
|
||||
attack.start(server.arg("num").toInt());
|
||||
server.send ( 200, "text/json", "true");
|
||||
if(server.hasArg("num")) {
|
||||
int _attackNum = server.arg("num").toInt();
|
||||
if(apScan.selected > -1 || _attackNum == 3){
|
||||
attack.start(server.arg("num").toInt());
|
||||
server.send ( 200, "text/json", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user