Skip to content

Commit 333e3eb

Browse files
author
Spacehuhn
committed
Removed remnants of forcePackets setting
The setting was already removed in 2019 with the rewrite of the settings module. In my tests, it didn't make the performance better, but added complexity and made the web interface unstable.
1 parent abf56ca commit 333e3eb

File tree

5 files changed

+38
-50
lines changed

5 files changed

+38
-50
lines changed

esp8266_deauther/Attack.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_
303303
// send deauth frame
304304
deauthpkt[0] = 0xc0;
305305

306-
if (sendPacket(deauthpkt, packetSize, ch, 1, true)) {
306+
if (sendPacket(deauthpkt, packetSize, ch, true)) {
307307
success = true;
308308
deauth.packetCounter++;
309309
}
@@ -315,7 +315,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_
315315

316316
disassocpkt[0] = 0xa0;
317317

318-
if (sendPacket(disassocpkt, packetSize, ch, 1, false)) {
318+
if (sendPacket(disassocpkt, packetSize, ch, false)) {
319319
success = true;
320320
deauth.packetCounter++;
321321
}
@@ -330,15 +330,15 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_
330330
// send deauth frame
331331
disassocpkt[0] = 0xc0;
332332

333-
if (sendPacket(disassocpkt, packetSize, ch, 1, false)) {
333+
if (sendPacket(disassocpkt, packetSize, ch, false)) {
334334
success = true;
335335
deauth.packetCounter++;
336336
}
337337

338338
// send disassociate frame
339339
disassocpkt[0] = 0xa0;
340340

341-
if (sendPacket(disassocpkt, packetSize, ch, 1, false)) {
341+
if (sendPacket(disassocpkt, packetSize, ch, false)) {
342342
success = true;
343343
deauth.packetCounter++;
344344
}
@@ -383,7 +383,7 @@ bool Attack::sendBeacon(uint8_t* mac, const char* ssid, uint8_t ch, bool wpa2) {
383383
tmpPacket[37] = ssidLen; // update SSID length byte
384384
memcpy(&tmpPacket[38 + ssidLen], &beaconPacket[70], wpa2 ? 39 : 13); // copy second half of packet into buffer
385385

386-
bool success = sendPacket(tmpPacket, tmpPacketSize, ch, 1, false);
386+
bool success = sendPacket(tmpPacket, tmpPacketSize, ch, false);
387387

388388
if (success) {
389389
beacon.time = currentTime;
@@ -411,7 +411,7 @@ bool Attack::sendProbe(uint8_t* mac, const char* ssid, uint8_t ch) {
411411
memcpy(&probePacket[10], mac, 6);
412412
memcpy(&probePacket[26], ssid, ssidLen);
413413

414-
if (sendPacket(probePacket, packetSize, ch, 1, false)) {
414+
if (sendPacket(probePacket, packetSize, ch, false)) {
415415
probe.time = currentTime;
416416
probe.packetCounter++;
417417
return true;
@@ -420,7 +420,7 @@ bool Attack::sendProbe(uint8_t* mac, const char* ssid, uint8_t ch) {
420420
return false;
421421
}
422422

423-
bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16_t tries, bool force_ch) {
423+
bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, bool force_ch) {
424424
// Serial.println(bytesToStr(packet, packetSize));
425425

426426
// set channel
@@ -429,10 +429,7 @@ bool Attack::sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16
429429
// sent out packet
430430
bool sent = wifi_send_pkt_freedom(packet, packetSize, 0) == 0;
431431

432-
// try again until it's sent out
433-
for (int i = 0; i < tries && !sent; i++) sent = wifi_send_pkt_freedom(packet, packetSize, 0) == 0;
434-
435-
if (sent) tmpPacketRate++;
432+
if (sent) ++tmpPacketRate;
436433

437434
return sent;
438435
}

esp8266_deauther/Attack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Attack {
5656
bool sendProbe(uint8_t tc);
5757
bool sendProbe(uint8_t* mac, const char* ssid, uint8_t ch);
5858

59-
bool sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, uint16_t tries, bool force_ch);
59+
bool sendPacket(uint8_t* packet, uint16_t packetSize, uint8_t ch, bool force_ch);
6060

6161
bool isRunning();
6262

esp8266_deauther/CLI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ void CLI::runCommand(String input) {
10791079
for (int i = 0; i < packetSize; i++) packet[i] = strtoul((packetStr.substring(i * 2,
10801080
i * 2 + 2)).c_str(), NULL, 16);
10811081

1082-
if (attack.sendPacket(packet, packetSize, wifi_channel, 10, true)) {
1082+
if (attack.sendPacket(packet, packetSize, wifi_channel, true)) {
10831083
prntln(CLI_CUSTOM_SENT);
10841084
counter++;
10851085
} else {

settings.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
- [`chTime`](#ch-time)
2424
- [`minDeauths`](#mindeauths)
2525
- [`attackTimeout`](#attacktimeout)
26-
- [`forcePackets`](#force-packets)
2726
- [`deauthsPerTarget`](#deauths-per-target)
2827
- [`deauthReason`](#deauth-reason)
2928
- [`beaconChannel`](#beacon-channel)
@@ -132,13 +131,6 @@ Minimum number of deauthentication frames when scanning to change the LED to dea
132131
After what amount of time (in seconds) the attack will stop automatically.
133132
Set it to 0 to disable it.
134133

135-
## FORCE-PACKETS
136-
`uint8_t forcePackets = 1;`
137-
How many attempts to send out a packet.
138-
Set this value higher if you want to achieve a better packet rate in a busy area.
139-
Be careful this setting could make the device slower or more unstable.
140-
**Max value is 255**.
141-
142134
## DEAUTHS-PER-TARGET
143135
`uint16_t deauthsPerTarget = 10;`
144136
How many deauthentication and disassociation frames are sent out for each target.

web_interface/settings.json

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
{
2-
"version":"over9000",
3-
"ssid":"pwned",
4-
"password":"deauther",
5-
"channel":1,
6-
"hidden":false,
7-
"captivePortal":true,
8-
"lang": "en",
9-
"autosave":true,
10-
"autosavetime":30000,
11-
"display":false,
12-
"displayTimeout":600,
13-
"serial":true,
14-
"serialEcho":true,
15-
"web":true,
16-
"led":true,
17-
"maxch":14,
18-
"macSt":"aa:bb:cc:dd:ee:ff",
19-
"macAP":"00:11:22:33:44:55",
20-
"chtime":384,
21-
"minDeauths":3,
22-
"attacktimeout":600,
23-
"forcepackets":3,
24-
"deauthspertarget":20,
25-
"deauthReason":1,
26-
"beaconchannel":false,
27-
"beaconInterval":false,
28-
"randomTX":false,
29-
"probesPerSSID":1
1+
{
2+
"version": "over9000",
3+
"ssid": "pwned",
4+
"password": "deauther",
5+
"channel": 1,
6+
"hidden": false,
7+
"captivePortal": true,
8+
"lang": "en",
9+
"autosave": true,
10+
"autosavetime": 30000,
11+
"display": false,
12+
"displayTimeout": 600,
13+
"serial": true,
14+
"serialEcho": true,
15+
"web": true,
16+
"led": true,
17+
"maxch": 14,
18+
"macSt": "aa:bb:cc:dd:ee:ff",
19+
"macAP": "00:11:22:33:44:55",
20+
"chtime": 384,
21+
"minDeauths": 3,
22+
"attacktimeout": 600,
23+
"deauthspertarget": 20,
24+
"deauthReason": 1,
25+
"beaconchannel": false,
26+
"beaconInterval": false,
27+
"randomTX": false,
28+
"probesPerSSID": 1
3029
}

0 commit comments

Comments
 (0)