pcap sniffer: re-add manual "Deauth Now" button to capture handshake menu#2667
Merged
Conversation
allowing users to manually send a deauth without waiting for the 15-second interval.
There was a problem hiding this comment.
Pull request overview
Adds a manual deauthentication action to the PCAP sniffer UI by extracting the existing deauth-send logic into a reusable helper and reusing it for both manual and timer-based sending.
Changes:
- Extracted deauth send loop into a new
sendDeauthNow()helper. - Added a new “Deauth Now” menu option that invokes
sendDeauthNow()on demand. - Updated the 15s auto-deauth path to call the shared helper (reducing duplication).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for (auto registeredBeacon : registeredBeacons) { | ||
| if (registeredBeacon.channel == ch) { | ||
| memcpy(&ap_record.bssid, registeredBeacon.MAC, 6); | ||
| wsl_bypasser_send_raw_frame(&ap_record, registeredBeacon.channel); |
| if (registeredBeacons.size() > 40) | ||
| registeredBeacons.clear(); | ||
| Serial.println("<<---- Sending deauth packets ---->>"); | ||
| for (auto registeredBeacon : registeredBeacons) { |
Contributor
Author
There was a problem hiding this comment.
Fixed: changed auto to const auto & (commit 64f3e7a).
| send_raw_frame(deauth_frame, 26); | ||
| deauth_sent = true; | ||
| deauth_counter++; | ||
| vTaskDelay(2 / portTICK_RATE_MS); |
Mysteriza
added a commit
to Mysteriza/firmware
that referenced
this pull request
Jul 20, 2026
- store actual WiFi channel number instead of array index in BeaconList - iterate registeredBeacons by const reference instead of by value - use pdMS_TO_TICKS(2) instead of integer division for vTaskDelay - fixes pre-existing channel mismatch bug in countActiveBeaconsOnChannel - resolves Copilot review comments on PR BruceDevices#2667
This was referenced Jul 20, 2026
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.
Proposed Changes
Extract the inline deauth-sending logic in the PCAP sniffer into a reusable
sendDeauthNow()helper, then expose it as a "Deauth Now" menu option so users can trigger deauth frames on demand without waiting for the 15-second auto-deauth interval. The existing timer-based deauth path now calls the same helper, eliminating code duplication.Types of Changes
sendDeauthNow(), no behavioral change to auto-deauth)Verification
Testing
Verified on reaper hardware (ESP32-S3). The helper is a straightforward extraction of previously inlined code — no new blocking paths, no new allocations.
Linked Issues
Continues from PR #2663 (sniffer reliability improvements).
User-Facing Change
Further Comments
The refactoring removed ~25 lines of duplicated code from the main loop.