Skip to content

fix: scope UDS version probe to UDS features; clarify --brute-mac -H error - #29

Merged
bandrel merged 1 commit into
mainfrom
fix/version-probe-and-brutemac-msg
Jul 29, 2026
Merged

fix: scope UDS version probe to UDS features; clarify --brute-mac -H error#29
bandrel merged 1 commit into
mainfrom
fix/version-probe-and-brutemac-msg

Conversation

@bandrel

@bandrel bandrel commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

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/version probe) ran for every -H host, before dispatch, including --brute-mac and plain config/phone scans that never touch UDS. On a host where 8443 is firewalled or not listening, that cost a full 10s ReadTimeout and 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 -H empty-database message

--brute-mac with -H but 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 supplied. --brute-mac doesn't query 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.

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 /users auth is a per-cluster toggle (usersResourceAuthEnabled, default false) that has existed since 11.5, not a version behavior. No version gating is warranted.

Testing

  • 3 new tests in tests/test_brute_host_prefixes.py: probe skipped for --brute-mac, probe still runs for --servers, and the new host-named message.
  • Full suite: 227 passed, 2 skipped.
  • Manual real-mode repro: -b -H 192.0.2.1 now returns in 0.19s (was 10s+) with the clear message.

🤖 Generated with Claude Code

…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>
@bandrel
bandrel merged commit 736345f into main Jul 29, 2026
2 checks passed
@bandrel
bandrel deleted the fix/version-probe-and-brutemac-msg branch July 29, 2026 17:52
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.

1 participant