Skip to content

Instantly share code, notes, and snippets.

@JosephGregg
Created May 31, 2016 15:51
Show Gist options
  • Save JosephGregg/11741057daf550a146cb3f460a20e299 to your computer and use it in GitHub Desktop.
Save JosephGregg/11741057daf550a146cb3f460a20e299 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"h12.me/socks"
"strconv"
)
const (
PROXY_ADDR = "127.0.0.1:9050"
)
func main() {
WEB_PORTS := [...]int{80, 8080, 81, 82, 8008, 8443}
for i := 0; i < len(WEB_PORTS); i++ {
var port int = WEB_PORTS[i]
dport := strconv.Itoa(port)
//fmt.Printf("Attempting connection on port %d\n", port)
_, err := socks.DialSocksProxy(socks.SOCKS5, PROXY_ADDR)("", "ADDRESS.onion:"+dport)
if err != nil {
//fmt.Println(err)
} else {
fmt.Printf("Successful connection %s\n", dport)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment