This commit is contained in:
crusader 2018-03-29 22:55:08 +09:00
parent 976439bd02
commit 9e8d2691dc
25 changed files with 99 additions and 3 deletions

View File

@ -174,6 +174,10 @@ type ActiveDirectoryMatcher struct {
} }
func (m *ActiveDirectoryMatcher) ServiceName() string { func (m *ActiveDirectoryMatcher) ServiceName() string {
return "ACTIVEDIRECTORY"
}
func (m *ActiveDirectoryMatcher) String() string {
return "ActiveDirectory" return "ActiveDirectory"
} }

View File

@ -20,6 +20,10 @@ type CassandraMatcher struct {
} }
func (m *CassandraMatcher) ServiceName() string { func (m *CassandraMatcher) ServiceName() string {
return "CASSANDRA"
}
func (m *CassandraMatcher) String() string {
return "Cassandra" return "Cassandra"
} }

View File

@ -45,6 +45,10 @@ func (t *DNSMatcher) ServiceName() string {
return "DNS" return "DNS"
} }
func (t *DNSMatcher) String() string {
return "DNS"
}
func (t *DNSMatcher) IsPrePacket() bool { func (t *DNSMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -29,6 +29,10 @@ type FTPMatcher struct {
} }
func (ftp *FTPMatcher) ServiceName() string { func (ftp *FTPMatcher) ServiceName() string {
return "FTP"
}
func (ftp *FTPMatcher) String() string {
re := "" re := ""
if ftp.isFtps { if ftp.isFtps {
re = "FTPS" re = "FTPS"

View File

@ -14,6 +14,10 @@ func (h *HTTPMatcher) ServiceName() string {
return "HTTP" return "HTTP"
} }
func (h *HTTPMatcher) String() string {
return "HTTP"
}
func (h *HTTPMatcher) IsPrePacket() bool { func (h *HTTPMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -17,6 +17,10 @@ func (i *IMAPMatcher) ServiceName() string {
return "IMAP" return "IMAP"
} }
func (i *IMAPMatcher) String() string {
return "IMAP"
}
func (i *IMAPMatcher) IsPrePacket() bool { func (i *IMAPMatcher) IsPrePacket() bool {
return true return true
} }

View File

@ -91,6 +91,10 @@ func (l *LDAPMatcher) ServiceName() string {
return "LDAP" return "LDAP"
} }
func (l *LDAPMatcher) String() string {
return "LDAP"
}
func (l *LDAPMatcher) IsPrePacket() bool { func (l *LDAPMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -9,6 +9,10 @@ type TestMatcher struct {
} }
func (t *TestMatcher) ServiceName() string { func (t *TestMatcher) ServiceName() string {
return "TESTMATCHER"
}
func (t *TestMatcher) String() string {
return "TestMatcher" return "TestMatcher"
} }

View File

@ -38,6 +38,10 @@ type MongoDBMatcher struct {
} }
func (t *MongoDBMatcher) ServiceName() string { func (t *MongoDBMatcher) ServiceName() string {
return "MONGODB"
}
func (t *MongoDBMatcher) String() string {
return "MongoDB" return "MongoDB"
} }

View File

@ -42,6 +42,10 @@ type MySqlMatcher struct {
} }
func (t *MySqlMatcher) ServiceName() string { func (t *MySqlMatcher) ServiceName() string {
return "MYSQL"
}
func (t *MySqlMatcher) String() string {
if t.isErrResp { if t.isErrResp {
return "MySQL" + "(Err-" + strconv.Itoa(t.errCode) + " : " + t.errMsg + ")" return "MySQL" + "(Err-" + strconv.Itoa(t.errCode) + " : " + t.errMsg + ")"
} }

View File

@ -34,6 +34,10 @@ func (t *NetBiosMatcher) ServiceName() string {
return "NBSS" return "NBSS"
} }
func (t *NetBiosMatcher) String() string {
return "NBSS"
}
func (t *NetBiosMatcher) IsPrePacket() bool { func (t *NetBiosMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -12,6 +12,9 @@ type OracleMatcher struct {
} }
func (o *OracleMatcher) ServiceName() string { func (o *OracleMatcher) ServiceName() string {
return "ORACLE"
}
func (o *OracleMatcher) String() string {
return "Oracle" return "Oracle"
} }

View File

@ -16,6 +16,10 @@ func (p *POPMatcher) ServiceName() string {
return "POP3" return "POP3"
} }
func (p *POPMatcher) String() string {
return "POP3"
}
func (p *POPMatcher) IsPrePacket() bool { func (p *POPMatcher) IsPrePacket() bool {
return true return true
} }

View File

@ -57,6 +57,10 @@ type PostgreSQLMatcher struct {
} }
func (t *PostgreSQLMatcher) ServiceName() string { func (t *PostgreSQLMatcher) ServiceName() string {
return "POSTGRESQL"
}
func (t *PostgreSQLMatcher) String() string {
return "PostgreSQL" return "PostgreSQL"
} }

View File

@ -14,6 +14,10 @@ type RedisProtectedMatcher struct {
} }
func (r *RedisProtectedMatcher) ServiceName() string { func (r *RedisProtectedMatcher) ServiceName() string {
return "REDIS"
}
func (r *RedisProtectedMatcher) String() string {
return "Redis:Protected" return "Redis:Protected"
} }

View File

@ -13,6 +13,10 @@ type RedisMatcher struct {
} }
func (t *RedisMatcher) ServiceName() string { func (t *RedisMatcher) ServiceName() string {
return "REDIS"
}
func (t *RedisMatcher) String() string {
return "Redis" return "Redis"
} }
@ -20,7 +24,6 @@ func (t *RedisMatcher) IsPrePacket() bool {
return false return false
} }
func (t *RedisMatcher) HasResponse(index int) bool { func (t *RedisMatcher) HasResponse(index int) bool {
return true return true
} }

View File

@ -35,6 +35,10 @@ func (r *RMIMatcher) ServiceName() string {
return "RMI" return "RMI"
} }
func (r *RMIMatcher) String() string {
return "RMI"
}
func (r *RMIMatcher) IsPrePacket() bool { func (r *RMIMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -56,6 +56,10 @@ func (t *SMBMatcher) ServiceName() string {
return "SMB" return "SMB"
} }
func (t *SMBMatcher) String() string {
return "SMB"
}
func (t *SMBMatcher) IsPrePacket() bool { func (t *SMBMatcher) IsPrePacket() bool {
return false return false
} }

View File

@ -14,6 +14,10 @@ func (t *SmtpMatcher) ServiceName() string {
return "SMTP" return "SMTP"
} }
func (t *SmtpMatcher) String() string {
return "SMTP"
}
func (t *SmtpMatcher) IsPrePacket() bool { func (t *SmtpMatcher) IsPrePacket() bool {
return true return true
} }

View File

@ -54,6 +54,10 @@ type SNMPMatcher struct {
} }
func (t *SNMPMatcher) ServiceName() string { func (t *SNMPMatcher) ServiceName() string {
return "SNMP_V2"
}
func (t *SNMPMatcher) String() string {
return "SNMP V2" return "SNMP V2"
} }

View File

@ -73,6 +73,10 @@ type SNMPMatcher struct {
} }
func (t *SNMPMatcher) ServiceName() string { func (t *SNMPMatcher) ServiceName() string {
return "SNMP_V3"
}
func (t *SNMPMatcher) String() string {
return "SNMP V3" return "SNMP V3"
} }

View File

@ -69,6 +69,10 @@ type SQLServerMatcher struct {
} }
func (t *SQLServerMatcher) ServiceName() string { func (t *SQLServerMatcher) ServiceName() string {
return "SQLSERVER"
}
func (t *SQLServerMatcher) String() string {
if t.isSSL { if t.isSSL {
return "SQL Server (SSL)" return "SQL Server (SSL)"
} }

View File

@ -14,6 +14,10 @@ func (ssh *SSHMatcher) ServiceName() string {
return "SSH" return "SSH"
} }
func (ssh *SSHMatcher) String() string {
return "SSH"
}
func (ssh *SSHMatcher) IsPrePacket() bool { func (ssh *SSHMatcher) IsPrePacket() bool {
return true return true
} }

View File

@ -17,6 +17,10 @@ type TelnetMatcher struct {
} }
func (tel *TelnetMatcher) ServiceName() string { func (tel *TelnetMatcher) ServiceName() string {
return "TELNET"
}
func (tel *TelnetMatcher) String() string {
return "Telnet" return "Telnet"
} }
@ -68,5 +72,3 @@ func NewMatcher() cnsm.Matcher {
return m return m
} }

View File

@ -25,6 +25,10 @@ func (w *WMIMatcher) ServiceName() string {
return "WMI" return "WMI"
} }
func (w *WMIMatcher) String() string {
return "WMI"
}
func (w *WMIMatcher) IsPrePacket() bool { func (w *WMIMatcher) IsPrePacket() bool {
return false return false
} }