Preparing report...

Report for github.com/evilsocket/sg1

A    Great!    Found 23 issues across 24 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo100%

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.

No problems detected. Good job!


golint4%

Golint is a linter for Go source code.

    • sg1/sg1/packet.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 35: warning: exported type Packet should have comment or be unexported (golint)
    • Line 42: warning: exported function NewPacket should have comment or be unexported (golint)
    • Line 51: warning: exported method Packet.Copy should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; var new_data should be newData (golint)
    • Line 57: warning: exported function DecodePacket should have comment or be unexported (golint)
    • Line 58: warning: don't use underscores in Go names; var buf_size should be bufSize (golint)
    • Line 63: warning: don't use underscores in Go names; var seqn_buf should be seqnBuf (golint)
    • Line 64: warning: don't use underscores in Go names; var totn_buf should be totnBuf (golint)
    • Line 65: warning: don't use underscores in Go names; var size_buf should be sizeBuf (golint)
    • Line 66: warning: don't use underscores in Go names; var max_size should be maxSize (golint)
    • Line 72: warning: don't use underscores in Go names; var data_buf should be dataBuf (golint)
    • Line 82: warning: exported method Packet.HeaderSize should have comment or be unexported (golint)
    • Line 86: warning: exported method Packet.Raw should have comment or be unexported (golint)
    • Line 87: warning: don't use underscores in Go names; var seqn_buf should be seqnBuf (golint)
    • Line 88: warning: don't use underscores in Go names; var totn_buf should be totnBuf (golint)
    • Line 89: warning: don't use underscores in Go names; var size_buf should be sizeBuf (golint)
    • Line 102: warning: exported method Packet.Hex should have comment or be unexported (golint)
    • Line 106: warning: exported function PadBuffer should have comment or be unexported (golint)
    • Line 107: warning: don't use underscores in Go names; var buf_sz should be bufSz (golint)
    • Line 109: warning: don't use underscores in Go names; var to_pad should be toPad (golint)
    • Line 118: warning: exported function BufferToChunks should have comment or be unexported (golint)
    • Line 118: warning: don't use underscores in Go names; func parameter chunk_size should be chunkSize (golint)
    • Line 119: warning: don't use underscores in Go names; var total_sz should be totalSz (golint)
    • sg1/modules/aes.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 40: warning: exported type AES should have comment or be unexported (golint)
    • Line 47: warning: exported function NewAES should have comment or be unexported (golint)
    • Line 56: warning: exported method AES.Name should have comment or be unexported (golint)
    • Line 60: warning: exported method AES.Description should have comment or be unexported (golint)
    • Line 64: warning: exported method AES.Register should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; range var min_sz should be minSz (golint)
    • Line 95: warning: error should be the last type when returning multiple items (golint)
    • Line 119: warning: error should be the last type when returning multiple items (golint)
    • Line 143: warning: exported method AES.Run should have comment or be unexported (golint)
    • sg1/modules/base64.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 36: warning: exported type Base64 should have comment or be unexported (golint)
    • Line 42: warning: exported function NewBase64 should have comment or be unexported (golint)
    • Line 50: warning: exported method Base64.Name should have comment or be unexported (golint)
    • Line 54: warning: exported method Base64.Description should have comment or be unexported (golint)
    • Line 58: warning: exported method Base64.Register should have comment or be unexported (golint)
    • Line 63: warning: exported method Base64.Run should have comment or be unexported (golint)
    • sg1/modules/raw.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 29: warning: exported type Raw should have comment or be unexported (golint)
    • Line 32: warning: exported function NewRaw should have comment or be unexported (golint)
    • Line 36: warning: exported method Raw.Name should have comment or be unexported (golint)
    • Line 40: warning: exported method Raw.Description should have comment or be unexported (golint)
    • Line 44: warning: exported method Raw.Register should have comment or be unexported (golint)
    • Line 48: warning: exported method Raw.Run should have comment or be unexported (golint)
    • sg1/main.go
    • Line 93: warning: exported type DataHandler should have comment or be unexported (golint)
    • Line 95: warning: exported function ReadLoop should have comment or be unexported (golint)
    • Line 95: warning: don't use underscores in Go names; func parameter buffer_size should be bufferSize (golint)
    • Line 142: warning: don't use underscores in Go names; var run_modules should be runModules (golint)
    • Line 153: warning: don't use underscores in Go names; var module_names should be moduleNames (golint)
    • Line 180: warning: don't use underscores in Go names; var run_error should be runError (golint)
    • sg1/channels/console.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 34: warning: exported type Console should have comment or be unexported (golint)
    • Line 38: warning: exported function NewConsoleChannel should have comment or be unexported (golint)
    • Line 42: warning: exported method Console.Copy should have comment or be unexported (golint)
    • Line 46: warning: exported method Console.Name should have comment or be unexported (golint)
    • Line 50: warning: exported method Console.Register should have comment or be unexported (golint)
    • Line 54: warning: exported method Console.Description should have comment or be unexported (golint)
    • Line 58: warning: exported method Console.Setup should have comment or be unexported (golint)
    • Line 62: warning: exported method Console.Start should have comment or be unexported (golint)
    • Line 66: warning: exported method Console.HasReader should have comment or be unexported (golint)
    • Line 70: warning: exported method Console.HasWriter should have comment or be unexported (golint)
    • Line 96: warning: exported method Console.Stats should have comment or be unexported (golint)
    • sg1/channels/dns.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 40: warning: exported var DNSChunkSize should have comment or be unexported (golint)
    • Line 46: warning: exported type DNSChannel should have comment or be unexported (golint)
    • Line 47: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 57: warning: exported function NewDNSChannel should have comment or be unexported (golint)
    • Line 69: warning: exported method DNSChannel.Copy should have comment or be unexported (golint)
    • Line 73: warning: exported method DNSChannel.Name should have comment or be unexported (golint)
    • Line 77: warning: exported method DNSChannel.Description should have comment or be unexported (golint)
    • Line 81: warning: exported method DNSChannel.Register should have comment or be unexported (golint)
    • Line 95: warning: don't use underscores in Go names; var chunk_hex should be chunkHex (golint)
    • Line 149: warning: exported method DNSChannel.Setup should have comment or be unexported (golint)
    • Line 169: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 174: warning: exported method DNSChannel.Start should have comment or be unexported (golint)
    • Line 192: warning: exported method DNSChannel.HasReader should have comment or be unexported (golint)
    • Line 195: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 200: warning: exported method DNSChannel.HasWriter should have comment or be unexported (golint)
    • Line 203: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 224: warning: exported method DNSChannel.Lookup should have comment or be unexported (golint)
    • Line 271: warning: exported method DNSChannel.Stats should have comment or be unexported (golint)
    • sg1/channels/pastebin_api.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 40: warning: exported const Never should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported type XmlPaste should have comment or be unexported (golint)
    • Line 58: warning: exported type Paste should have comment or be unexported (golint)
    • Line 65: warning: exported type PastebinAPI should have comment or be unexported (golint)
    • Line 70: warning: exported function NewPastebinAPI should have comment or be unexported (golint)
    • Line 77: warning: exported method PastebinAPI.Request should have comment or be unexported (golint)
    • Line 103: warning: exported method PastebinAPI.GetPaste should have comment or be unexported (golint)
    • Line 137: warning: exported method PastebinAPI.GetPastes should have comment or be unexported (golint)
    • Line 150: warning: exported method PastebinAPI.DeletePaste should have comment or be unexported (golint)
    • Line 158: warning: exported method PastebinAPI.CreatePaste should have comment or be unexported (golint)
    • sg1/sg1/packet_sequencer.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 35: warning: exported type PacketSequencer should have comment or be unexported (golint)
    • Line 43: warning: exported function NewPacketSequencer should have comment or be unexported (golint)
    • Line 56: warning: exported method PacketSequencer.Start should have comment or be unexported (golint)
    • Line 93: warning: exported method PacketSequencer.Packets should have comment or be unexported (golint)
    • Line 93: warning: don't use underscores in Go names; method parameter chunk_size should be chunkSize (golint)
    • Line 116: warning: exported method PacketSequencer.Packet should have comment or be unexported (golint)
    • Line 127: warning: exported method PacketSequencer.Add should have comment or be unexported (golint)
    • Line 131: warning: exported method PacketSequencer.HasPacket should have comment or be unexported (golint)
    • Line 137: warning: exported method PacketSequencer.Wait should have comment or be unexported (golint)
    • Line 143: warning: exported method PacketSequencer.WaitForSeqn should have comment or be unexported (golint)
    • Line 161: warning: exported method PacketSequencer.Get should have comment or be unexported (golint)
    • sg1/modules/exec.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 35: warning: exported type Exec should have comment or be unexported (golint)
    • Line 38: warning: exported function NewExec should have comment or be unexported (golint)
    • Line 42: warning: exported method Exec.Name should have comment or be unexported (golint)
    • Line 46: warning: exported method Exec.Description should have comment or be unexported (golint)
    • Line 50: warning: exported method Exec.Register should have comment or be unexported (golint)
    • Line 54: warning: exported method Exec.Run should have comment or be unexported (golint)
    • sg1/modules/factory.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 39: warning: exported function Register should have comment or be unexported (golint)
    • Line 43: warning: don't use underscores in Go names; var module_name should be moduleName (golint)
    • Line 58: warning: exported function Registered should have comment or be unexported (golint)
    • Line 64: warning: exported function Factory should have comment or be unexported (golint)
    • Line 64: warning: don't use underscores in Go names; func parameter module_name should be moduleName (golint)
    • sg1/modules/module.go
    • Line 1: warning: package comment should be of the form "Package modules ..." (golint)
    • Line 29: warning: exported type Module should have comment or be unexported (golint)
    • sg1/channels/channel.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 29: warning: exported type Direction should have comment or be unexported (golint)
    • Line 32: warning: exported const INPUT_CHANNEL should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type Stats should have comment or be unexported (golint)
    • Line 41: warning: exported type Channel should have comment or be unexported (golint)
    • sg1/channels/icmp.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 39: warning: exported const ProtocolICMP should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported type ICMPChannel should have comment or be unexported (golint)
    • Line 45: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 52: warning: exported function NewICMPChannel should have comment or be unexported (golint)
    • Line 61: warning: exported method ICMPChannel.Copy should have comment or be unexported (golint)
    • Line 65: warning: exported method ICMPChannel.Name should have comment or be unexported (golint)
    • Line 69: warning: exported method ICMPChannel.Description should have comment or be unexported (golint)
    • Line 73: warning: exported method ICMPChannel.Register should have comment or be unexported (golint)
    • Line 77: warning: exported method ICMPChannel.Setup should have comment or be unexported (golint)
    • Line 94: warning: exported method ICMPChannel.Start should have comment or be unexported (golint)
    • Line 148: warning: exported method ICMPChannel.HasReader should have comment or be unexported (golint)
    • Line 155: warning: exported method ICMPChannel.HasWriter should have comment or be unexported (golint)
    • Line 229: warning: exported method ICMPChannel.Stats should have comment or be unexported (golint)
    • sg1/channels/pastebin.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 41: warning: exported const DefaultStreamName should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type Pastebin should have comment or be unexported (golint)
    • Line 48: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 52: warning: don't use underscores in Go names; struct field poll_time should be pollTime (golint)
    • Line 56: warning: exported function NewPastebinChannel should have comment or be unexported (golint)
    • Line 67: warning: exported method Pastebin.Copy should have comment or be unexported (golint)
    • Line 71: warning: exported method Pastebin.Name should have comment or be unexported (golint)
    • Line 75: warning: exported method Pastebin.Register should have comment or be unexported (golint)
    • Line 81: warning: exported method Pastebin.Description should have comment or be unexported (golint)
    • Line 85: warning: exported method Pastebin.Setup should have comment or be unexported (golint)
    • Line 106: warning: exported method Pastebin.Start should have comment or be unexported (golint)
    • Line 148: warning: don't use underscores in Go names; var n_available should be nAvailable (golint)
    • Line 207: warning: exported method Pastebin.HasReader should have comment or be unexported (golint)
    • Line 211: warning: exported method Pastebin.HasWriter should have comment or be unexported (golint)
    • Line 255: warning: exported method Pastebin.Stats should have comment or be unexported (golint)
    • sg1/sg1/log.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 52: warning: exported function Hex should have comment or be unexported (golint)
    • Line 56: warning: exported function Bold should have comment or be unexported (golint)
    • Line 60: warning: exported function Raw should have comment or be unexported (golint)
    • Line 67: warning: exported function Log should have comment or be unexported (golint)
    • Line 71: warning: exported function Warning should have comment or be unexported (golint)
    • Line 75: warning: exported function Error should have comment or be unexported (golint)
    • Line 79: warning: exported function Debug should have comment or be unexported (golint)
    • sg1/sg1/options.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 30: warning: exported var From should have comment or be unexported (golint)
    • sg1/sg1/version.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 30: warning: exported const APP_NAME should have comment (or a comment on this block) or be unexported (golint)
    • sg1/channels/factory.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 40: warning: exported function Register should have comment or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; var channel_name should be channelName (golint)
    • Line 58: warning: exported function Registered should have comment or be unexported (golint)
    • Line 65: warning: exported function Factory should have comment or be unexported (golint)
    • Line 65: warning: don't use underscores in Go names; func parameter channel_name should be channelName (golint)
    • Line 73: warning: don't use underscores in Go names; var channel_args should be channelArgs (golint)
    • sg1/channels/tcp.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 35: warning: exported type TCPChannel should have comment or be unexported (golint)
    • Line 36: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 46: warning: exported function NewTCPChannel should have comment or be unexported (golint)
    • Line 59: warning: exported method TCPChannel.Copy should have comment or be unexported (golint)
    • Line 63: warning: exported method TCPChannel.Name should have comment or be unexported (golint)
    • Line 67: warning: exported method TCPChannel.Description should have comment or be unexported (golint)
    • Line 71: warning: exported method TCPChannel.Register should have comment or be unexported (golint)
    • Line 75: warning: exported method TCPChannel.Setup should have comment or be unexported (golint)
    • Line 92: warning: exported method TCPChannel.Start should have comment or be unexported (golint)
    • Line 122: warning: exported method TCPChannel.HasReader should have comment or be unexported (golint)
    • Line 126: warning: exported method TCPChannel.HasWriter should have comment or be unexported (golint)
    • Line 130: warning: exported method TCPChannel.SetClient should have comment or be unexported (golint)
    • Line 145: warning: exported method TCPChannel.WaitForClient should have comment or be unexported (golint)
    • Line 155: warning: exported method TCPChannel.GetClient should have comment or be unexported (golint)
    • Line 194: warning: exported method TCPChannel.Stats should have comment or be unexported (golint)
    • sg1/channels/tls.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 47: warning: exported type TLSChannel should have comment or be unexported (golint)
    • Line 48: warning: don't use underscores in Go names; struct field pem_file should be pemFile (golint)
    • Line 49: warning: don't use underscores in Go names; struct field key_file should be keyFile (golint)
    • Line 51: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 63: warning: exported function NewTLSChannel should have comment or be unexported (golint)
    • Line 81: warning: exported method TLSChannel.Copy should have comment or be unexported (golint)
    • Line 85: warning: exported method TLSChannel.Name should have comment or be unexported (golint)
    • Line 89: warning: exported method TLSChannel.Description should have comment or be unexported (golint)
    • Line 93: warning: exported method TLSChannel.Register should have comment or be unexported (golint)
    • Line 158: warning: don't use underscores in Go names; var cert_raw should be certRaw (golint)
    • Line 163: warning: don't use underscores in Go names; var pem_cert should be pemCert (golint)
    • Line 164: warning: don't use underscores in Go names; var pem_key should be pemKey (golint)
    • Line 175: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 190: warning: exported method TLSChannel.Setup should have comment or be unexported (golint)
    • Line 210: warning: exported method TLSChannel.Start should have comment or be unexported (golint)
    • Line 240: warning: exported method TLSChannel.HasReader should have comment or be unexported (golint)
    • Line 244: warning: exported method TLSChannel.HasWriter should have comment or be unexported (golint)
    • Line 248: warning: exported method TLSChannel.SetClient should have comment or be unexported (golint)
    • Line 263: warning: exported method TLSChannel.WaitForClient should have comment or be unexported (golint)
    • Line 273: warning: exported method TLSChannel.GetClient should have comment or be unexported (golint)
    • Line 312: warning: exported method TLSChannel.Stats should have comment or be unexported (golint)
    • sg1/channels/udp.go
    • Line 1: warning: package comment should be of the form "Package channels ..." (golint)
    • Line 36: warning: exported const UDPChunkSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported type UDPChannel should have comment or be unexported (golint)
    • Line 41: warning: don't use underscores in Go names; struct field is_client should be isClient (golint)
    • Line 48: warning: exported function NewUDPChannel should have comment or be unexported (golint)
    • Line 57: warning: exported method UDPChannel.Copy should have comment or be unexported (golint)
    • Line 61: warning: exported method UDPChannel.Name should have comment or be unexported (golint)
    • Line 65: warning: exported method UDPChannel.Description should have comment or be unexported (golint)
    • Line 69: warning: exported method UDPChannel.Register should have comment or be unexported (golint)
    • Line 73: warning: exported method UDPChannel.Setup should have comment or be unexported (golint)
    • Line 90: warning: exported method UDPChannel.Start should have comment or be unexported (golint)
    • Line 137: warning: exported method UDPChannel.HasReader should have comment or be unexported (golint)
    • Line 144: warning: exported method UDPChannel.HasWriter should have comment or be unexported (golint)
    • Line 203: warning: exported method UDPChannel.Stats should have comment or be unexported (golint)
    • sg1/sg1/misc.go
    • Line 1: warning: package comment should be of the form "Package sg1 ..." (golint)
    • Line 35: warning: exported const KB should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported function Time should have comment or be unexported (golint)
    • Line 44: warning: exported function FormatBytes should have comment or be unexported (golint)
    • Line 56: warning: exported function FormatSpeed should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!