From bdcc67e6531b996015c90b068ad451157c0a3a4f Mon Sep 17 00:00:00 2001 From: maride Date: Thu, 28 Sep 2017 10:56:36 +0200 Subject: [PATCH] Add error messages to error messages --- knockr.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/knockr.go b/knockr.go index 6cce622..5428e00 100644 --- a/knockr.go +++ b/knockr.go @@ -32,6 +32,7 @@ func listener(port int, listen_func func(c net.Conn)) { if err != nil { fmt.Println("[ERR] Creating listener for Port ", port) + fmt.Println(" Error is ", err) } else { fmt.Println("[OK ] Creating listener for Port ", port) for { @@ -85,6 +86,7 @@ func proxy(c net.Conn) { ln, err := net.Dial("tcp", arguments.Destination) if err != nil { fmt.Println("[ERR] Proxy connection to server failed") + fmt.Println(" Error is ", err) } else { go io.Copy(c, ln) io.Copy(ln, c)