fix: scope UDS version probe to UDS features; clarify --brute-mac -H error - #29
Merged
Merged
Conversation
…error The startup version probe hit the UDS port (8443) for every -H host, even for --brute-mac and plain config/phone scans that never touch UDS. Against a host where UDS is firewalled or not listening, those runs paid a full read timeout and printed a misleading "Could not retrieve CUCM version" error unrelated to what the user asked for. Gate the probe to the features that actually use UDS (--servers, --directory, --userenum, --spray). Separately, --brute-mac with -H and no seeded prefixes printed "You must specify at least one phone with -p (or a CUCM server with -H)", implying -H was missing when it was in fact supplied. --brute-mac never queries the server; it replays MAC prefixes already harvested by --userenum/--spray or a phone scan. The message now names the host and points at the seeding steps. 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.
What
Two fixes prompted by a
--brute-mac -H <host>run that hung ~10s and then printed a confusing error, against a host where UDS on 8443 was unreachable.1. Version probe now only runs for UDS features
get_version()(the/cucm-uds/versionprobe) ran for every-Hhost, before dispatch, including--brute-macand plain config/phone scans that never touch UDS. On a host where 8443 is firewalled or not listening, that cost a full 10sReadTimeoutand printed[-] Could not retrieve CUCM version— noise unrelated to the requested action. It's now gated to--servers,--directory,--userenum, and--spray.2.
--brute-mac -Hempty-database message--brute-macwith-Hbut no seeded prefixes printed "You must specify at least one phone with -p (or a CUCM server with -H)" — implying-Hwas missing when it was supplied.--brute-macdoesn't query the server; it replays MAC prefixes already harvested by--userenum/--sprayor a phone scan. The message now names the host and points at the seeding steps.Not a version-gating bug
The report suspected a CUCM 14 UDS incompatibility. It isn't: the symptom was a
ReadTimeout(port silent), not the fast 401/403 an auth-gated UDS returns. Confirmed against Cisco DevNet docs — the anonymous UDS endpoint set (version,servers,clusterUser) is unchanged through 14/15, and/usersauth is a per-cluster toggle (usersResourceAuthEnabled, defaultfalse) that has existed since 11.5, not a version behavior. No version gating is warranted.Testing
tests/test_brute_host_prefixes.py: probe skipped for--brute-mac, probe still runs for--servers, and the new host-named message.-b -H 192.0.2.1now returns in 0.19s (was 10s+) with the clear message.🤖 Generated with Claude Code