diff --git a/esp8266_deauther/Attack.cpp b/esp8266_deauther/Attack.cpp index da05828..b565190 100644 --- a/esp8266_deauther/Attack.cpp +++ b/esp8266_deauther/Attack.cpp @@ -303,7 +303,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_ // send deauth frame deauthpkt[0] = 0xc0; - if (sendPacket(deauthpkt, packetSize, ch, 1, true)) { + if (sendPacket(deauthpkt, packetSize, ch, true)) { success = true; deauth.packetCounter++; } @@ -315,7 +315,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_ disassocpkt[0] = 0xa0; - if (sendPacket(disassocpkt, packetSize, ch, 1, false)) { + if (sendPacket(disassocpkt, packetSize, ch, false)) { success = true; deauth.packetCounter++; } @@ -330,7 +330,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_ // send deauth frame disassocpkt[0] = 0xc0; - if (sendPacket(disassocpkt, packetSize, ch, 1, false)) { + if (sendPacket(disassocpkt, packetSize, ch, false)) { success = true; deauth.packetCounter++; } @@ -338,7 +338,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_ // send disassociate frame disassocpkt[0] = 0xa0; - if (sendPacket(disassocpkt, packetSize, ch, 1, false)) { + if (sendPacket(disassocpkt, packetSize, ch, false)) { success = true; deauth.packetCounter++; } @@ -383,7 +383,7 @@ bool Attack::sendBeacon(uint8_t* mac, const char* ssid, uint8_t ch, bool wpa2) { tmpPacket[37] = ssidLen; // update SSID length byte memcpy(&tmpPacket[38 + ssidLen], &beaconPacket[70], wpa2 ? 39 : 13); // copy second half of packet into buffer - bool success = sendPacket(tmpPacket, tmpPacketSize, ch, 1, false); + bool success = sendPacket(tmpPacket, tmpPacketSize, ch, false); if (success) { beacon.time = currentTime; @@ -411,7 +411,7 @@ bool Attack::sendProbe(uint8_t* mac, const char* ssid, uint8_t ch) { memcpy(&probePacket[10], mac, 6); memcpy(&probePacket[26], ssid, ssidLen); - if (sendPacket(probePacket, packetSize, ch, 1, false)) { + if (sendPacket(probePacket, packetSize, ch, false)) { probe.time = currentTime; probe.packetCounter++; return true; @@ -420,7 +420,7 @@ bool Attack::sendProbe(uint8_t* mac, const char* ssid, uint8_t ch) { return false; } -bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16_t tries, bool force_ch) { +bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, bool force_ch) { // Serial.println(bytesToStr(packet, packetSize)); // set channel @@ -429,10 +429,7 @@ bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16 // sent out packet bool sent = wifi_send_pkt_freedom(packet, packetSize, 0) == 0; - // try again until it's sent out - for (int i = 0; i < tries && !sent; i++) sent = wifi_send_pkt_freedom(packet, packetSize, 0) == 0; - - if (sent) tmpPacketRate++; + if (sent) ++tmpPacketRate; return sent; } diff --git a/esp8266_deauther/Attack.h b/esp8266_deauther/Attack.h index 7e42f35..d87de19 100644 --- a/esp8266_deauther/Attack.h +++ b/esp8266_deauther/Attack.h @@ -56,7 +56,7 @@ class Attack { bool sendProbe(uint8_t tc); bool sendProbe(uint8_t* mac, const char* ssid, uint8_t ch); - bool sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16_t tries, bool force_ch); + bool sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, bool force_ch); bool isRunning(); diff --git a/esp8266_deauther/CLI.cpp b/esp8266_deauther/CLI.cpp index 5401e36..275ea37 100644 --- a/esp8266_deauther/CLI.cpp +++ b/esp8266_deauther/CLI.cpp @@ -1079,7 +1079,7 @@ void CLI::runCommand(String input) { for (int i = 0; i < packetSize; i++) packet[i] = strtoul((packetStr.substring(i * 2, i * 2 + 2)).c_str(), NULL, 16); - if (attack.sendPacket(packet, packetSize, wifi_channel, 10, true)) { + if (attack.sendPacket(packet, packetSize, wifi_channel, true)) { prntln(CLI_CUSTOM_SENT); counter++; } else { diff --git a/settings.md b/settings.md index ded2048..16256c8 100644 --- a/settings.md +++ b/settings.md @@ -23,7 +23,6 @@ - [`chTime`](#ch-time) - [`minDeauths`](#mindeauths) - [`attackTimeout`](#attacktimeout) - - [`forcePackets`](#force-packets) - [`deauthsPerTarget`](#deauths-per-target) - [`deauthReason`](#deauth-reason) - [`beaconChannel`](#beacon-channel) @@ -132,13 +131,6 @@ Minimum number of deauthentication frames when scanning to change the LED to dea After what amount of time (in seconds) the attack will stop automatically. Set it to 0 to disable it. -## FORCE-PACKETS -`uint8_t forcePackets = 1;` -How many attempts to send out a packet. -Set this value higher if you want to achieve a better packet rate in a busy area. -Be careful this setting could make the device slower or more unstable. -**Max value is 255**. - ## DEAUTHS-PER-TARGET `uint16_t deauthsPerTarget = 10;` How many deauthentication and disassociation frames are sent out for each target. diff --git a/web_interface/settings.json b/web_interface/settings.json index 2327672..b406dea 100644 --- a/web_interface/settings.json +++ b/web_interface/settings.json @@ -1,30 +1,29 @@ -{ - "version":"over9000", - "ssid":"pwned", - "password":"deauther", - "channel":1, - "hidden":false, - "captivePortal":true, - "lang": "en", - "autosave":true, - "autosavetime":30000, - "display":false, - "displayTimeout":600, - "serial":true, - "serialEcho":true, - "web":true, - "led":true, - "maxch":14, - "macSt":"aa:bb:cc:dd:ee:ff", - "macAP":"00:11:22:33:44:55", - "chtime":384, - "minDeauths":3, - "attacktimeout":600, - "forcepackets":3, - "deauthspertarget":20, - "deauthReason":1, - "beaconchannel":false, - "beaconInterval":false, - "randomTX":false, - "probesPerSSID":1 +{ + "version": "over9000", + "ssid": "pwned", + "password": "deauther", + "channel": 1, + "hidden": false, + "captivePortal": true, + "lang": "en", + "autosave": true, + "autosavetime": 30000, + "display": false, + "displayTimeout": 600, + "serial": true, + "serialEcho": true, + "web": true, + "led": true, + "maxch": 14, + "macSt": "aa:bb:cc:dd:ee:ff", + "macAP": "00:11:22:33:44:55", + "chtime": 384, + "minDeauths": 3, + "attacktimeout": 600, + "deauthspertarget": 20, + "deauthReason": 1, + "beaconchannel": false, + "beaconInterval": false, + "randomTX": false, + "probesPerSSID": 1 } \ No newline at end of file