ing
This commit is contained in:
parent
9975361ba2
commit
cb8c795e70
|
@ -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{})
|
|
@ -58,7 +58,7 @@ func sqlServerRun(conn net.Conn, t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
t.Error("MSSQL not found")
|
||||
t.Error("SQL Server not found")
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user