Tweaks to various tools.

This commit is contained in:
Kyle Isom
2016-04-01 15:09:19 -07:00
parent d1452f54c0
commit e33e8c3ce5
2 changed files with 22 additions and 7 deletions

View File

@@ -7,6 +7,7 @@ import (
"flag"
"fmt"
"io/ioutil"
"net"
"os"
"github.com/kisom/goutils/die"
@@ -39,7 +40,11 @@ func main() {
}
for _, site := range flag.Args() {
conn, err := tls.Dial("tcp", site+":443", cfg)
_, _, err := net.SplitHostPort(site)
if err != nil {
site += ":443"
}
conn, err := tls.Dial("tcp", site, cfg)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)