diff --git a/pgsql/pgsql.go b/postgresql/postgresql.go similarity index 100% rename from pgsql/pgsql.go rename to postgresql/postgresql.go diff --git a/pgsql/pgsql_test.go b/postgresql/postgresql_test.go similarity index 100% rename from pgsql/pgsql_test.go rename to postgresql/postgresql_test.go diff --git a/mssql/mssql.go b/sqlserver/sqlserver.go similarity index 87% rename from mssql/mssql.go rename to sqlserver/sqlserver.go index 9e24bb9..bc69503 100644 --- a/mssql/mssql.go +++ b/sqlserver/sqlserver.go @@ -63,31 +63,31 @@ type mssqlResponse struct { PreLoginResp PreloginResponse } -type MSSqlMatcher struct { +type SQLServerMatcher struct { cnsm.Matchers isSSL bool } -func (t *MSSqlMatcher) ServiceName() string { +func (t *SQLServerMatcher) ServiceName() string { if t.isSSL { return "SQL Server (SSL)" } return "SQL Server" } -func (t *MSSqlMatcher) IsPrePacket() bool { +func (t *SQLServerMatcher) IsPrePacket() bool { return false } -func (t *MSSqlMatcher) HasResponse(index int) bool { +func (t *SQLServerMatcher) HasResponse(index int) bool { return true } -func (t *MSSqlMatcher) IsError(info cnsm.MatchInfo, index int, packet *cnsm.Packet) bool { +func (t *SQLServerMatcher) IsError(info cnsm.MatchInfo, index int, packet *cnsm.Packet) bool { return false } -func (t *MSSqlMatcher) Match(info cnsm.MatchInfo, index int, packet *cnsm.Packet) bool { +func (t *SQLServerMatcher) Match(info cnsm.MatchInfo, index int, packet *cnsm.Packet) bool { if packet == nil { return false @@ -131,7 +131,7 @@ func (t *MSSqlMatcher) Match(info cnsm.MatchInfo, index int, packet *cnsm.Packet func NewMatcher() cnsm.Matcher { - mm := &MSSqlMatcher{} + mm := &SQLServerMatcher{} tempBuf := new(bytes.Buffer) binary.Write(tempBuf, binary.BigEndian, mssql{}) diff --git a/mssql/mssql_test.go b/sqlserver/sqlserver_test.go similarity index 96% rename from mssql/mssql_test.go rename to sqlserver/sqlserver_test.go index 52aff93..2af3661 100644 --- a/mssql/mssql_test.go +++ b/sqlserver/sqlserver_test.go @@ -58,7 +58,7 @@ func sqlServerRun(conn net.Conn, t *testing.T) { return } - t.Error("MSSQL not found") + t.Error("SQL Server not found") } }