This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Repository navigation
Claude/zealous volta snwdr9 - #102
Closed
AntiWireless wants to merge 4 commits into
Closed
AntiWireless wants to merge 4 commits into
AntiWireless wants to merge 4 commits into
Conversation
Add tools/awdl_master_inject.py, a stdlib-only Python 3 tool that crafts and injects AWDL Master Indication Frames (MIF) directed at a specific destination MAC and wins the AWDL election deterministically. The frame layout mirrors src/tx.c byte-for-byte. It advertises an Election Parameters v2 TLV (and v1) with the master counter and metric set to 0xFFFFFFFF and distance-to-master 0, so per the election rule in src/election.c (compare counter, then metric) it can never be out-voted by a genuine node whose counter starts at 0. Each frame is a MIF with a Version TLV so the target treats it as a valid peer (awdl_peer_is_valid: sent_mif && devclass && version) and adopts it as master/sync root. Injection uses a raw AF_PACKET socket on a monitor-mode interface; no third-party modules required. Includes a --dry-run frame dumper and a tools/README.md documenting usage and authorised-use scope. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01URb3WiYQ7NfyBMhyGvtSDe
Expose the send cadence and the AWDL timing parameters that were
previously hardcoded:
* --interval / --duration now accept s/ms/us/tu unit suffixes
(1 TU = 1024 us), e.g. 110tu to match a real master's ~110 TU
action-frame cadence; --duration stops after a fixed time.
* --aw-period : advertised Availability Window period (TU)
* --af-period : advertised action-frame / PSF period (TU)
* --presence-mode : advertised presence mode / EAW multiplier
The Sync Parameters TLV and the channel-sequence step_count are built
from these values instead of the AW_PERIOD_TU / PSF_INTERVAL_MASTER_TU /
PRESENCE_MODE constants (now used only as defaults). Values are range
checked, the status line and --dry-run report them, and the README
documents the new timing group.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01URb3WiYQ7NfyBMhyGvtSDe
Add a --aw-offset option (in TU, may be negative) that shifts the phase of the availability-window schedule advertised in the Sync Parameters TLV. The offset is applied to the elapsed-time base so the countdown to the next AW (time_to_next_aw) and the AW sequence counter (aw_counter) move together and stay self-consistent. Once the injected node wins the election and becomes a peer's master, the peer re-aligns its own clock to these fields (awdl_handle_sync_params_tlv in src/rx.c), so the offset steers the AW phase every synchronised peer adopts. One --aw-period worth of offset advances the sequence counter by one AW. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01URb3WiYQ7NfyBMhyGvtSDe
Make -c/--channel optional. When it is omitted, the tool sweeps the three AWDL social channels (6, 44, 149), counts AWDL action frames coming from the target MAC on each, tunes the interface to the channel with the most, and injects there. Channel detection and tuning use `iw`; the raw AF_PACKET socket is now opened with ETH_P_ALL so the same socket both sniffs (for the sweep) and injects. parse_awdl_src() identifies AWDL frames (vendor-specific action, OUI 00:17:f2, type 8) and extracts the transmitter address. A new --sweep-dwell controls the listen time per channel. When a channel is given explicitly, tuning is best-effort so a manually tuned card still works even without `iw`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01URb3WiYQ7NfyBMhyGvtSDe
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.