Skip to content

fix(validate): accept bare IP for -dns-server with default port 53 - #425

Merged
TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
prascli:fix/417-dns-server-bare-ip
Nov 17, 2026
Merged

TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
prascli:fix/417-dns-server-bare-ip

Conversation

@prascli

@prascli prascli commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Description

-dns-server now accepts a bare IPv4 or IPv6 literal, appending port 53 the same way -r resolver files already do. 1.1.1.1 and 2606:4700:4700::1111 are normalized to 1.1.1.1:53 and [2606:4700:4700::1111]:53, so the CLI, TUI, MCP server, config files and pkg/subenum all accept the shorter form. Help text and the generated flag table were updated to ip[:port].

Related Issue

Fixes #417

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvements
  • Test updates

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project
  • I have added/updated appropriate comments to the code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)

Ethical Considerations

  • This change maintains or improves the security controls in the tool
  • This change follows the educational/legitimate security testing focus of the project
  • I have considered potential misuse cases and taken appropriate steps to prevent them

Verification

go test ./internal/validate/ ./internal/scan/ ./internal/cli/ ./internal/tui/ ./pkg/subenum/

All packages pass. gofmt -l . prints nothing. Build succeeds with go build ./....

Additional Information

The change is localized to input normalization; encrypted transports and hostnames for DoT/DoH are unaffected.

Signed-off-by: Indra Prasetya <11029197+prascli@users.noreply.github.com>
@prascli
prascli force-pushed the fix/417-dns-server-bare-ip branch from 7923172 to e46e3b8 Compare November 17, 2026 07:31
@TMHSDigital
TMHSDigital merged commit 2e9b6bc into TMHSDigital:main Nov 17, 2026
2 checks passed
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.

-dns-server rejects a bare IP that -r accepts

2 participants