sensepost / gowitness

🔍 gowitness - a golang, web screenshot utility using Chrome Headless
GNU General Public License v3.0
2.82k stars 323 forks source link

Specify IP address to connect to? #189

Open RoganDawes opened 1 year ago

RoganDawes commented 1 year ago

Is your feature request related to a problem? Please describe. Sometimes you need to get screenshots of vhosts on a particular IP. But chrome will just do a DNS resolve of the provided hostname, and pick an address in the response to connect to. This may not always be the IP address that you are interested in!

Describe the solution you'd like It would be great to be able to specify the IP address that chrome should connect to, for the various URL's provided.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context This can be worked around by creating entries in /etc/hosts to return only the IP address that you want for each hostname, but that gets a little bit complicated when running in a Docker container. Since there is a reasonable workaround, this is obviously a low priority suggestion.

leonjza commented 1 year ago

Could maybe implement using this approach for host-resolver-rules. https://github.com/chromedp/chromedp/issues/985#issuecomment-1008362284