Skip to content

pcap sniffer: re-add manual "Deauth Now" button to capture handshake menu#2667

Merged
bmorcelli merged 1 commit into
BruceDevices:devfrom
Mysteriza:deauth-now
Jul 19, 2026
Merged

pcap sniffer: re-add manual "Deauth Now" button to capture handshake menu#2667
bmorcelli merged 1 commit into
BruceDevices:devfrom
Mysteriza:deauth-now

Conversation

@Mysteriza

Copy link
Copy Markdown
Contributor

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

  • New feature (manual "Deauth Now" button in sniffer menu)
  • Refactor (extract inline deauth logic into sendDeauthNow(), no behavioral change to auto-deauth)

Verification

  1. Open PCAP Sniffer, press OK → menu shows "Deauth Now" between the deauth toggle and reset counters
  2. Select "Deauth Now" — deauth frames are sent immediately to all APs on current channel, "Deauth sent." is displayed
  3. Auto-deauth (every 15s when enabled) continues to work identically

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

pcap sniffer: add "Deauth Now" button to manually trigger deauthentication without waiting for the 15-second interval

Further Comments

The refactoring removed ~25 lines of duplicated code from the main loop.

allowing users to manually send a deauth without waiting for the
15-second interval.
Copilot AI review requested due to automatic review settings July 19, 2026 14:26
@Mysteriza Mysteriza changed the title pcap sniffer: add manual "Deauth Now" button to capture handshake menu pcap sniffer: re-add manual "Deauth Now" button to capture handshake menu Jul 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: changed auto to const auto & (commit 64f3e7a).

send_raw_frame(deauth_frame, 26);
deauth_sent = true;
deauth_counter++;
vTaskDelay(2 / portTICK_RATE_MS);
@bmorcelli
bmorcelli merged commit 3b4bede into BruceDevices:dev Jul 19, 2026
7 checks passed
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
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.

3 participants