ing
This commit is contained in:
parent
9975361ba2
commit
cb8c795e70
|
@ -63,31 +63,31 @@ type mssqlResponse struct {
|
||||||
PreLoginResp PreloginResponse
|
PreLoginResp PreloginResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
type MSSqlMatcher struct {
|
type SQLServerMatcher struct {
|
||||||
cnsm.Matchers
|
cnsm.Matchers
|
||||||
isSSL bool
|
isSSL bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MSSqlMatcher) ServiceName() string {
|
func (t *SQLServerMatcher) ServiceName() string {
|
||||||
if t.isSSL {
|
if t.isSSL {
|
||||||
return "SQL Server (SSL)"
|
return "SQL Server (SSL)"
|
||||||
}
|
}
|
||||||
return "SQL Server"
|
return "SQL Server"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MSSqlMatcher) IsPrePacket() bool {
|
func (t *SQLServerMatcher) IsPrePacket() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MSSqlMatcher) HasResponse(index int) bool {
|
func (t *SQLServerMatcher) HasResponse(index int) bool {
|
||||||
return true
|
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
|
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 {
|
if packet == nil {
|
||||||
return false
|
return false
|
||||||
|
@ -131,7 +131,7 @@ func (t *MSSqlMatcher) Match(info cnsm.MatchInfo, index int, packet *cnsm.Packet
|
||||||
|
|
||||||
func NewMatcher() cnsm.Matcher {
|
func NewMatcher() cnsm.Matcher {
|
||||||
|
|
||||||
mm := &MSSqlMatcher{}
|
mm := &SQLServerMatcher{}
|
||||||
|
|
||||||
tempBuf := new(bytes.Buffer)
|
tempBuf := new(bytes.Buffer)
|
||||||
binary.Write(tempBuf, binary.BigEndian, mssql{})
|
binary.Write(tempBuf, binary.BigEndian, mssql{})
|
|
@ -58,7 +58,7 @@ func sqlServerRun(conn net.Conn, t *testing.T) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Error("MSSQL not found")
|
t.Error("SQL Server not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user