fix: let --brute-mac run with -H instead of -p - #27
Merged
Conversation
With -H and no -p, source MAC prefixes for that server from its mac_prefixes rows plus any SEP devices harvested from it via --userenum/--spray. If the server has no prefixes recorded, retarget prefixes discovered elsewhere at it rather than exiting. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
thief -b -H <cucm>previously exited with "You must specify at least one phone with -p" unless the database already held amac_prefixesrow for that exact host. Now-His a usable stand-in for-p.Changes
get_uds_device_macs_from_db()extracts MACs fromSEP…device names inuds_devicesfor a given CUCM host — the devices--userenumand--sprayharvest.-Hfrom that host'smac_prefixesrows plus those UDS devices. If the host has nothing recorded, prefixes learned from phones on other servers are retargeted at it (with a printed notice).-H.Behavior change
-b -H <host>against a host with no history used to exit 1; it now brute-forces using whatever prefixes the database holds.Testing
uv run pytest -q→ 224 passed, 2 skipped. Newtests/test_brute_host_prefixes.pycovers host scoping, non-SEPnames, missing-table tolerance, and the CLI path.🤖 Generated with Claude Code