Advertisement
Guest User

Untitled

a guest
May 31st, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "h12.me/socks"
  6. "strconv"
  7. )
  8.  
  9. const (
  10. PROXY_ADDR = "127.0.0.1:9050"
  11. )
  12.  
  13. func main() {
  14. WEB_PORTS := [...]int{80, 8080, 81, 82, 8008, 8443}
  15. for i := 0; i < len(WEB_PORTS); i++ {
  16. var port int = WEB_PORTS[i]
  17. dport := strconv.Itoa(port)
  18. //fmt.Printf("Attempting connection on port %d\n", port)
  19.  
  20. _, err := socks.DialSocksProxy(socks.SOCKS5, PROXY_ADDR)("", "ADDRESS.onion:"+dport)
  21.  
  22. if err != nil {
  23. //fmt.Println(err)
  24. } else {
  25. fmt.Printf("Successful connection %s\n", dport)
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement