Skip to content

Commit a1c9af2

Browse files
committed
up
1 parent 8fe0781 commit a1c9af2

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
# ESP32 Deauthentication Tool
2+
3+
24
A powerful, cross-platform Python toolkit for Wi-Fi deauthentication testing using only an ESP32 board and a data cable. With a simple command-line interface and interactive menus, you can easily erase and flash your ESP32, scan for Wi-Fi networks, and launch a variety of wireless attacks—all from your terminal. The tool also provides seamless WiFi reconnection to the ESP32's ManagementAP WiFi network (**SSID:** `ManagementAP`, **password:** `mgmtadmin`) on Windows, Linux, and macOS.
35

46
Supports continuous or unlimited attack looping—run attacks in a loop for as long as needed (e.g., for stress testing or research).
57

8+
9+
<center>
10+
11+
![video.gif](/src/video.gif)
12+
13+
</center>
614
> **⚠️ Legal Notice:**
715
> Deauthentication attacks are illegal without explicit permission from the network owner. This tool is intended strictly for educational, research, and authorized penetration testing purposes. Use responsibly and only on networks you own or have written authorization to test. The authors disclaim all liability for misuse.
816
17+
## Required Hardware
18+
19+
To use the ESP32 Deauthentication Tool, you will need:
20+
21+
- **ESP32 Board:**
22+
Any ESP32 development board (e.g., ESP32-WROOM-32) is supported.
23+
> The tool is designed for use with standard ESP32 boards and has been tested with models such as the ESP32-WROOM-32.
24+
25+
- **USB Data Cable:**
26+
A USB cable with data lines (not just charging) to connect the ESP32 to your computer for flashing and serial communication.
27+
28+
- **Computer:**
29+
A Windows, Linux, or macOS machine with Python 3.7+ installed.
30+
31+
No additional Wi-Fi adapters or special hardware are required—just a standard ESP32 board and a USB cable.
32+
33+
![img](/src/pic.jpg)
934

1035
## ✨ Features
1136

esp32_deauth/deauth.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,14 @@ def attack_network(self, ap, attack_type, attack_method, timeout, continuous=Fal
547547
status = self.get_status()
548548
except:
549549
status = ""
550+
550551
if status:
552+
try:
553+
if status["state"] == 0:
554+
print("Sometimes, 5G Wi-Fi networks can't be attacked.")
555+
break
556+
except:
557+
pass
551558
if status['state'] in [self.attack_state_enum['FINISHED'], self.attack_state_enum['TIMEOUT']]:
552559
logger.info(f"Attack {'completed' if status['state'] == self.attack_state_enum['FINISHED'] else 'timed out'}")
553560
if status['state'] == self.attack_state_enum['FINISHED']:
@@ -571,6 +578,27 @@ def attack_network(self, ap, attack_type, attack_method, timeout, continuous=Fal
571578
if status and status['state'] == self.attack_state_enum['RUNNING']:
572579
logger.error("Attack did not complete within timeout, resetting...")
573580
self.reset_attack()
581+
# Ask user if they want to try reconnecting (up to 6 attempts)
582+
for attempt in range(6):
583+
user_input = input("Attack status is failing or timing out. The Wi-Fi connection may be lost. Try reconnecting? (y/n): ").strip().lower()
584+
if user_input == 'y':
585+
logger.info(f"Attempting to reconnect to ManagementAP (attempt {attempt + 1}/6)...")
586+
if self.reconnect_wifi() and self.check_api_connectivity():
587+
logger.info("Reconnected successfully. Retrying attack...")
588+
status = self.get_status()
589+
if status and status['state'] == self.attack_state_enum['RUNNING']:
590+
logger.error("Attack did not complete within timeout, resetting...")
591+
self.reset_attack()
592+
else:
593+
logger.error("Reconnect failed.")
594+
elif user_input == 'n':
595+
logger.info("Exiting attack loop.")
596+
return False
597+
else:
598+
logger.error("Invalid input. Please enter 'y' or 'n'.")
599+
else:
600+
logger.info("Maximum reconnect attempts reached. Exiting attack loop.")
601+
return False
574602
else:
575603
logger.error("Failed to initiate attack, possibly AP is off. Retrying after reconnect...")
576604
self.reconnect_wifi()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="esp32-deauth",
8-
version="0.3.2",
8+
version="0.3.3",
99
description="A Python tool for Wi-Fi deauthentication attacks using ESP32 with webserver firmware",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

src/pic.jpg

318 KB
Loading

src/video.gif

7.44 MB
Loading

0 commit comments

Comments
 (0)