Preparing report...

Report for github.com/BishopFox/sliver

A+    Excellent!    Found 91 issues across 393 files

Tweet

gofmt89%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


golint90%

Golint is a linter for Go source code.

    • sliver/implant/sliver/pivots/pivots.go
    • Line 61: warning: exported type PivotListener should have comment or be unexported (golint)
    • Line 66: warning: exported function GetListeners should have comment or be unexported (golint)
    • Line 96: warning: exported function Pivot should have comment or be unexported (golint)
    • sliver/server/rpc/rpc-wg.go
    • Line 13: warning: exported method Server.GenerateWGClientConfig should have comment or be unexported (golint)
    • Line 39: warning: exported method Server.WGStartPortForward should have comment or be unexported (golint)
    • Line 48: warning: exported method Server.WGStopPortForward should have comment or be unexported (golint)
    • Line 57: warning: exported method Server.WGStartSocks should have comment or be unexported (golint)
    • Line 66: warning: exported method Server.WGStopSocks should have comment or be unexported (golint)
    • Line 75: warning: exported method Server.WGListSocksServers should have comment or be unexported (golint)
    • Line 84: warning: exported method Server.WGListForwarders should have comment or be unexported (golint)
    • sliver/implant/sliver/netstack/tun.go
    • Line 46: warning: exported type Net should have comment or be unexported (golint)
    • Line 94: warning: exported function CreateNetTUN should have comment or be unexported (golint)
    • Line 205: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 214: warning: exported method Net.DialContextTCP should have comment or be unexported (golint)
    • Line 222: warning: exported method Net.DialTCP should have comment or be unexported (golint)
    • Line 230: warning: exported method Net.ListenTCP should have comment or be unexported (golint)
    • Line 238: warning: exported method Net.DialUDP should have comment or be unexported (golint)
    • Line 270: warning: exported method Net.LookupHost should have comment or be unexported (golint)
    • Line 429: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 519: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 586: warning: exported method Net.LookupContextHost should have comment or be unexported (golint)
    • Line 586: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 728: warning: exported method Net.DialContext should have comment or be unexported (golint)
    • Line 728: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 821: warning: exported method Net.Dial should have comment or be unexported (golint)
    • Line 821: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • sliver/implant/sliver/forwarder/socks.go
    • Line 24: warning: exported function NewWGSocksServer should have comment or be unexported (golint)
    • Line 37: warning: exported method WGSocksServer.LocalAddr should have comment or be unexported (golint)
    • Line 41: warning: exported method WGSocksServer.Start should have comment or be unexported (golint)
    • Line 65: warning: exported method WGSocksServer.Stop should have comment or be unexported (golint)
    • sliver/server/netstack/tun.go
    • Line 46: warning: exported type Net should have comment or be unexported (golint)
    • Line 94: warning: exported function CreateNetTUN should have comment or be unexported (golint)
    • Line 209: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 218: warning: exported method Net.DialContextTCP should have comment or be unexported (golint)
    • Line 226: warning: exported method Net.DialTCP should have comment or be unexported (golint)
    • Line 234: warning: exported method Net.ListenTCP should have comment or be unexported (golint)
    • Line 242: warning: exported method Net.DialUDP should have comment or be unexported (golint)
    • Line 274: warning: exported method Net.LookupHost should have comment or be unexported (golint)
    • Line 433: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 523: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 590: warning: exported method Net.LookupContextHost should have comment or be unexported (golint)
    • Line 590: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 732: warning: exported method Net.DialContext should have comment or be unexported (golint)
    • Line 732: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • Line 825: warning: exported method Net.Dial should have comment or be unexported (golint)
    • Line 825: warning: receiver name tnet should be consistent with previous receiver name net for Net (golint)
    • sliver/implant/sliver/proxy/proxy.go
    • Line 1: warning: package comment should be of the form "Package proxy ..." (golint)
    • Line 24: warning: comment on exported type Proxy should be of the form "Proxy ..." (with optional leading article) (golint)
    • Line 50: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 182: warning: exported type Auth should have comment or be unexported (golint)
    • Line 197: warning: exported function RegisterDialerType should have comment or be unexported (golint)
    • Line 204: warning: exported function FromURL should have comment or be unexported (golint)
    • sliver/client/console/console.go
    • Line 50: warning: comment on exported const Normal should be of the form "Normal ..." (golint)
    • Line 52: warning: exported const Black should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: exported type ActiveSession should have comment or be unexported (golint)
    • Line 85: warning: exported type SliverConsoleClient should have comment or be unexported (golint)
    • Line 136: warning: exported method SliverConsoleClient.EventLoop should have comment or be unexported (golint)
    • Line 248: warning: exported method SliverConsoleClient.GetPrompt should have comment or be unexported (golint)
    • Line 260: warning: exported method SliverConsoleClient.PrintLogo should have comment or be unexported (golint)
    • Line 287: warning: exported method SliverConsoleClient.CheckLastUpdate should have comment or be unexported (golint)
    • Line 381: warning: comment on exported method SliverConsoleClient.IsUserAnAdult should be of the form "IsUserAnAdult ..." (golint)
    • Line 389: warning: exported method SliverConsoleClient.Printf should have comment or be unexported (golint)
    • Line 393: warning: exported method SliverConsoleClient.Println should have comment or be unexported (golint)
    • Line 397: warning: exported method SliverConsoleClient.PrintInfof should have comment or be unexported (golint)
    • Line 401: warning: exported method SliverConsoleClient.PrintWarnf should have comment or be unexported (golint)
    • Line 405: warning: exported method SliverConsoleClient.PrintErrorf should have comment or be unexported (golint)
    • Line 409: warning: exported method SliverConsoleClient.SpinUntil should have comment or be unexported (golint)
    • Line 441: warning: exported method ActiveSession.RemoveObserver should have comment or be unexported (golint)
    • Line 445: warning: exported method ActiveSession.Request should have comment or be unexported (golint)
    • sliver/server/rpc/rpc-monitor.go
    • Line 11: warning: exported method Server.MonitorStart should have comment or be unexported (golint)
    • Line 21: warning: exported method Server.MonitorStop should have comment or be unexported (golint)
    • sliver/implant/sliver/proxy/provider.go
    • Line 1: warning: package comment should be of the form "Package proxy ..." (golint)
    • Line 33: warning: exported type Provider should have comment or be unexported (golint)
    • Line 242: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 244: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 246: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 248: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 252: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 256: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • sliver/server/watchtower/watchtower.go
    • Line 61: warning: exported function StartWatchTower should have comment or be unexported (golint)
    • Line 93: warning: exported function AddImplantToWatchlist should have comment or be unexported (golint)
    • Line 97: warning: exported function StopWatchTower should have comment or be unexported (golint)
    • sliver/implant/sliver/proxy/url.go
    • Line 1: warning: package comment should be of the form "Package proxy ..." (golint)
    • Line 26: warning: comment on exported function ParseURL should be of the form "ParseURL ..." (golint)
    • Line 40: warning: comment on exported function ParseTargetURL should be of the form "ParseTargetURL ..." (golint)
    • Line 70: warning: comment on exported function SplitHostPort should be of the form "SplitHostPort ..." (golint)
    • Line 100: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 107: warning: comment on exported function IsLoopbackHost should be of the form "IsLoopbackHost ..." (golint)
    • sliver/implant/sliver/transports/udp-dns.go
    • Line 142: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 356: warning: don't use underscores in Go names; var error_counter should be errorCounter (golint)
    • Line 369: warning: don't use underscores in Go names; var error_counter should be errorCounter (golint)
    • sliver/protobuf/sliverpb/constants.go
    • Line 174: warning: comment on exported const MsgPivotListReq should be of the form "MsgPivotListReq ..." (golint)
    • Line 199: warning: comment on exported const MsgSetEnvReq should be of the form "MsgSetEnvReq ..." (golint)
    • Line 201: warning: comment on exported const MsgSetEnv should be of the form "MsgSetEnv ..." (golint)
    • Line 205: warning: comment on exported const MsgRegistryReadReq should be of the form "MsgRegistryReadReq ..." (golint)
    • Line 207: warning: comment on exported const MsgRegistryWriteReq should be of the form "MsgRegistryWriteReq ..." (golint)
    • Line 209: warning: comment on exported const MsgRegistryCreateKeyReq should be of the form "MsgRegistryCreateKeyReq ..." (golint)
    • Line 216: warning: comment on exported const MsgWGStartSocksReq should be of the form "MsgWGStartSocksReq ..." (golint)
    • Line 218: warning: comment on exported const MsgWGStopSocksReq should be of the form "MsgWGStopSocksReq ..." (golint)
    • Line 220: warning: comment on exported const MsgWGListForwardersReq should be of the form "MsgWGListForwardersReq ..." (golint)
    • Line 222: warning: comment on exported const MsgWGListSocksReq should be of the form "MsgWGListSocksReq ..." (golint)
    • Line 230: warning: comment on exported const MsgReconnectIntervalReq should be of the form "MsgReconnectIntervalReq ..." (golint)
    • Line 233: warning: exported const MsgReconnectInterval should have comment (or a comment on this block) or be unexported (golint)
    • Line 235: warning: comment on exported const MsgPollIntervalReq should be of the form "MsgPollIntervalReq ..." (golint)
    • Line 240: warning: comment on exported const MsgUnsetEnvReq should be of the form "MsgUnsetEnvReq ..." (golint)
    • Line 249: warning: comment on exported const MsgRegistrySubKeysListReq should be of the form "MsgRegistrySubKeysListReq ..." (golint)
    • sliver/server/rpc/rpc-hijack.go
    • Line 40: warning: exported method Server.HijackDLL should have comment or be unexported (golint)
    • Line 155: warning: exported const DEFAULT_CHARACTERISTICS should have comment (or a comment on this block) or be unexported (golint)
    • sliver/server/rpc/rpc-pivots.go
    • Line 27: warning: exported method Server.NamedPipes should have comment or be unexported (golint)
    • Line 36: warning: exported method Server.TCPListener should have comment or be unexported (golint)
    • Line 45: warning: exported method Server.ListPivots should have comment or be unexported (golint)
    • sliver/server/certs/wg.go
    • Line 17: warning: exported var ErrWGPeerDoesNotExist should have comment or be unexported (golint)
    • Line 21: warning: exported function SetupWGKeys should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function GetWGPeers should be of the form "GetWGPeers ..." (golint)
    • sliver/implant/sliver/transports/transports.go
    • Line 132: warning: exported method Connection.RequestResend should have comment or be unexported (golint)
    • Line 308: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 313: warning: exported function SetReconnectInterval should have comment or be unexported (golint)
    • Line 325: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 330: warning: exported function SetPollInterval should have comment or be unexported (golint)

gocyclo94%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • sliver/implant/sliver/netstack/tun.go
    • Line 728: warning: cyclomatic complexity 33 of function (*Net).DialContext() is high (> 15) (gocyclo)
    • Line 586: warning: cyclomatic complexity 29 of function (*Net).LookupContextHost() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 23 of function isDomainName() is high (> 15) (gocyclo)
    • sliver/server/netstack/tun.go
    • Line 732: warning: cyclomatic complexity 33 of function (*Net).DialContext() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 29 of function (*Net).LookupContextHost() is high (> 15) (gocyclo)
    • Line 278: warning: cyclomatic complexity 23 of function isDomainName() is high (> 15) (gocyclo)
    • sliver/server/rpc/rpc-hijack.go
    • Line 40: warning: cyclomatic complexity 23 of function (*Server).HijackDLL() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 20 of function cloneExports() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!