Skip to content

Commit

Permalink
Only display errors in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rkervella committed Apr 15, 2021
1 parent f750575 commit 8bfca6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions implant/sliver/transports/transports.go
Expand Up @@ -22,6 +22,7 @@ import (

// {{if or .Config.HTTPc2Enabled .Config.TCPPivotc2Enabled .Config.WGc2Enabled}}
"net"

// {{end}}

// {{if .Config.Debug}}
Expand All @@ -30,8 +31,7 @@ import (

"crypto/x509"
// {{if .Config.WGc2Enabled}}
"fmt"

"errors"
// {{end}}
"io"
"net/url"
Expand Down Expand Up @@ -415,7 +415,7 @@ func wgConnect(uri *url.URL) (*Connection, error) {
return nil, err
}
if len(addrs) == 0 {
return nil, fmt.Errorf("invalid address")
return nil, errors.New("{{if .Config.Debug}}Invalid address{{end}}")
}
hostname := addrs[0]
conn, dev, err := wgSocketConnect(hostname, uint16(lport))
Expand Down

0 comments on commit 8bfca6a

Please sign in to comment.