Skip to content

(feat) allow setting --host-resolver-rules#309

Open
timkent wants to merge 1 commit intosensepost:masterfrom
timkent:master
Open

(feat) allow setting --host-resolver-rules#309
timkent wants to merge 1 commit intosensepost:masterfrom
timkent:master

Conversation

@timkent
Copy link

@timkent timkent commented Jan 30, 2026

I wanted to use this tool to test some reverse proxies that use split DNS, so I can't assume that the DNS host is available or pointing to the correct place.

To do this I have added a --chrome-host-resolver-rules option that passes through to the Chrome --host-resolver-rules option. The format of the rules are explained here:
https://chromium.googlesource.com/chromium/src/+/HEAD/net/dns/mapped_host_resolver.h#40

Here is an example where it is sending my request for http://example.com to 127.0.0.1:8000 and https://example.com to 127.0.0.1:8443 using the one rule:

# gowitness scan --chrome-host-resolver-rules "MAP example.com:80 127.0.0.1:8000,MAP example.com:443 127.0.0.1:8443" single -u http://example.com
# gowitness scan --chrome-host-resolver-rules "MAP example.com:80 127.0.0.1:8000,MAP example.com:443 127.0.0.1:8443" single -u https://example.com

I did some limited testing and Chrome appears to be sending the correct host header and SNI.

Thank you for this awesome project!

@timkent timkent mentioned this pull request Jan 30, 2026
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