Skip to content

feat(evil-portal): saved-name picker + SSID cap + optional WPA2 password - #4

Merged
quietdom merged 3 commits into
quietdom:devfrom
Pedro-Jesus-Fuentes-Morcillo:feat/evil-portal-wpa2
Jul 20, 2026
Merged

feat(evil-portal): saved-name picker + SSID cap + optional WPA2 password#4
quietdom merged 3 commits into
quietdom:devfrom
Pedro-Jesus-Fuentes-Morcillo:feat/evil-portal-wpa2

Conversation

@Pedro-Jesus-Fuentes-Morcillo

Copy link
Copy Markdown

A few enhancements on top of your Evil Portal AP-name prompt (BruceDevices#2550), three
commits, all confined to evil_portal.cpp/.h:

  1. Restore the saved-name picker. The evilWifiNames picker (added in
    cb9b693) has been unreachable since the "Fix karma" commit (d854ced) added
    if (apName.isEmpty()) apName = "Free Wifi"; at the top of setup(), so on
    launch you always got the bare keyboard and never the saved list. This brings
    the picker back (saved names + "Custom Wifi") on interactive launch, guarded
    with !_autoMode so Karma/automated flows never get an interactive prompt.

  2. Cap the SSID at 32 chars (802.11 limit) so a long cloned name produces a
    well-formed AP.

  3. Optional WPA2 password. Prompt for an AP password after the SSID and pass
    it to WiFi.softAP(), so the portal can mimic a real WPA2 network (same
    name + password) — which makes the Deauth+Clone evil-twin actually auto-reconnect
    victims (a device with the real WPA2 network saved won't auto-join an open twin
    with the same SSID). Empty = open, 8-63 = WPA2, 1-7 chars is rejected and
    re-asked. Skipped in Verify mode (AP must stay open so victims can enter the
    real password to be verified) and in autoMode.

Verified on a T-Embed CC1101. Feel free to squash/adjust anything.

The evil-wifi-names picker became unreachable after the "Fix karma" commit added
\`if (apName.isEmpty()) apName = "Free Wifi";\` at the top of setup(), so on launch
you always got the bare keyboard and never the list of saved SSIDs. Show the
picker again (saved names + "Custom Wifi") when launching interactively with no
preset SSID, and drop the now-dead block below. Guard it with !_autoMode so
automated flows (e.g. Karma) never get an interactive prompt.
802.11 limits an SSID to 32 bytes; truncate before it reaches WiFi.softAP() so a
longer name (e.g. from a cloned target) produces a well-formed AP instead of
being silently rejected or mangled.
Prompt for an AP password after the SSID and pass it to WiFi.softAP(), so the
portal can mimic a WPA2 network (same name+password as a real one) instead of
always being open. Empty keeps it open; 8-63 chars enable WPA2, and 1-7 chars are
rejected and re-asked (softAP would otherwise fail). Skipped in autoMode (e.g.
Karma) and in Verify mode, where the AP must stay open so victims can join and
enter the real Wi-Fi password to be verified.
@Pedro-Jesus-Fuentes-Morcillo Pedro-Jesus-Fuentes-Morcillo changed the title Feat/evil portal wpa2 feat(evil-portal): saved-name picker + SSID cap + optional WPA2 password Jul 19, 2026
@quietdom
quietdom merged commit 603844b into quietdom:dev Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants