feat(evil-portal): saved-name picker + SSID cap + optional WPA2 password - #4
Merged
quietdom merged 3 commits intoJul 20, 2026
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few enhancements on top of your Evil Portal AP-name prompt (BruceDevices#2550), three
commits, all confined to
evil_portal.cpp/.h:Restore the saved-name picker. The
evilWifiNamespicker (added incb9b693) has been unreachable since the "Fix karma" commit (d854ced) added
if (apName.isEmpty()) apName = "Free Wifi";at the top ofsetup(), so onlaunch 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
!_autoModeso Karma/automated flows never get an interactive prompt.Cap the SSID at 32 chars (802.11 limit) so a long cloned name produces a
well-formed AP.
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 (samename + 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.