You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-dns-server rejects a bare IP that -r accepts #417
-dns-server 1.1.1.1 is rejected with "invalid format, expected ip:port", but the same bare IP works in a -r file, and tls:// addresses get a default port.
Where
internal/validate/validate.go:68-75 (plain transport requires host:port)
internal/validate/validate.go:20-30 (tls:// defaults to 853)
internal/dns/pool.go:111-113 (-r appends :53 to a bare IP)
docs/_includes/flags.md:13
Details
DNSServer calls net.SplitHostPort on the plain form and fails when the port is missing. validate_test.go:21 expects "missing port".
Impact
This is small but common friction. Users type -dns-server 1.1.1.1, as they would with dig, dnsx and most resolver lists, and get an error. The TUI's DNS Server field, the config file and SUBENUM_DNS_SERVER all hit the same check.
Suggested fix
Add validate.NormalizeDNSServer, which appends :53 to a bare IPv4 or IPv6 literal (bracketing IPv6). Call it wherever -dns-server, the TUI field, subenum mcp -dns-server and pkg/subenumConfig.Resolver are read, then validate as before. Change the help text to ip[:port].
Acceptance criteria
-dns-server 1.1.1.1 and -dns-server 2606:4700:4700::1111 work and use port 53
The help text, flag table and validate tests are updated
It adds validate.NormalizeDNSServer, which appends port 53 to a bare IPv4 or IPv6 literal, and calls it in the CLI, MCP server, TUI, scan runner, and library entry points. Help text and the generated flag table now read ip[:port]. All tests in the affected packages pass.
Activity
prascli commentedon Nov 17, 2026
Opened a PR that implements this: #425
It adds
validate.NormalizeDNSServer, which appends port 53 to a bare IPv4 or IPv6 literal, and calls it in the CLI, MCP server, TUI, scan runner, and library entry points. Help text and the generated flag table now readip[:port]. All tests in the affected packages pass.