zmap / zgrab2

Fast Go Application Scanner
Other
1.76k stars 308 forks source link

Socks Proxy Support #107

Open djtm opened 6 years ago

djtm commented 6 years ago

feature request: allow scanning via socks5 proxy: https://github.com/golang/net/blob/master/internal/socks/client.go

djtm commented 6 years ago

It should work by default with the http_proxy variable, but it seems it doesn't. https://golang.org/src/net/http/transport.go#L35

e.g. it does not resolve IPs via socks:

[ERROR] banner-grab: Could not connect to remote host https://www.nytimes3xbfgragh.onion/: Get https://www.nytimes3xbfgragh.onion/: dial tcp: lookup www.nytimes3xbfgragh.onion on ...:53: no such host
djtm commented 6 years ago

The fix should be as easy as this: https://godoc.org/golang.org/x/net/proxy#FromEnvironment