sensepost / gowitness

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

Proxy Support Feature #62

Closed randomactsofsecurity closed 3 years ago

randomactsofsecurity commented 3 years ago

Describe the solution you'd like Add HTTP and SOCKS5 proxy support screenshot functionality

Describe alternatives you've considered Related to the old issue https://github.com/sensepost/gowitness/pull/21

Additional context Seems like chromedp has this built in support already, just need to stub in the options and test in chrome/chrome.go

https://github.com/chromedp/examples/pull/20/files/0bfcebe721cd401786649f72d0b7926369348623#diff-a5b9dfd3fa592c284ba488a7c748679e

leonjza commented 3 years ago

I played with this a bit last night actually and was having trouble getting a proxy configuration to work for Chrome. Maybe someone else could test it as well?

randomactsofsecurity commented 3 years ago

the chromedp proxyserver works fine, it's actually the preflight http.client that will need proxy support added as well.

I've got a local copy working with socks5, just need to allow it to work with http. Will make a PR soon

randomactsofsecurity commented 3 years ago

Added proxy support at PR #65

I've tested without proxy, with a socks 5 and with a HTTP proxy and it seems to work for me. Should be good with a bit more validation on your part. I've also made it so it follows the global timeout argument, in case someone needs to delay the connection more.

Also I haven't tested, but it may also support environment variables as well even if the proxy-server isn't set, at least for the preflight checks

randomactsofsecurity commented 3 years ago

closed, merged in https://github.com/sensepost/gowitness/commit/9736345601bcb75f56ac5340b738d5615178eeb3