type added
This commit is contained in:
		
							parent
							
								
									add118ce9d
								
							
						
					
					
						commit
						0ef5ca805c
					
				@ -177,6 +177,10 @@ func (m *ActiveDirectoryMatcher) Key() string {
 | 
			
		||||
	return "ACTIVEDIRECTORY"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *ActiveDirectoryMatcher) Type() string {
 | 
			
		||||
	return "DIRECTORY"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *ActiveDirectoryMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "ActiveDirectory"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -23,6 +23,10 @@ func (m *CassandraMatcher) Key() string {
 | 
			
		||||
	return "CASSANDRA"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *CassandraMatcher) Type() string {
 | 
			
		||||
	return "NOSQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *CassandraMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "Cassandra"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,10 @@ func (m *DNSMatcher) Key() string {
 | 
			
		||||
	return "DNS"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *DNSMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *DNSMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "DNS"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,10 @@ func (m *ElasticSearchMatcher) Key() string {
 | 
			
		||||
	return "ELASTICSEARCH"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *ElasticSearchMatcher) Type() string {
 | 
			
		||||
	return "SEARCH"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *ElasticSearchMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	name := "ElasticSearch"
 | 
			
		||||
	if v, ok := matchCtx.GetAttribute("number"); ok {
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,10 @@ func (m *FTPMatcher) Key() string {
 | 
			
		||||
	return "FTP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *FTPMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *FTPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "FTP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,10 @@ func (m *HTTPMatcher) Key() string {
 | 
			
		||||
	return "HTTP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *HTTPMatcher) Type() string {
 | 
			
		||||
	return "WEB"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *HTTPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	name := "HTTP"
 | 
			
		||||
	if v, ok := matchCtx.GetAttribute("server"); ok {
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,10 @@ func (m *IMAPMatcher) Key() string {
 | 
			
		||||
	return "IMAP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *IMAPMatcher) Type() string {
 | 
			
		||||
	return "MAIL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *IMAPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "IMAP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -22,6 +22,10 @@ func (m *LDAPMatcher) Key() string {
 | 
			
		||||
	return "LDAP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *LDAPMatcher) Type() string {
 | 
			
		||||
	return "DIRECTORY"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *LDAPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "LDAP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -12,6 +12,10 @@ func (m *LPDMatcher) Key() string {
 | 
			
		||||
	return "LPD"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *LPDMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *LPDMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "LPD (Printer)"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,12 @@
 | 
			
		||||
package matcher
 | 
			
		||||
 | 
			
		||||
import "fmt"
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Matcher interface {
 | 
			
		||||
	Key() string
 | 
			
		||||
	Type() string
 | 
			
		||||
	Name(matchCtx *MatchCtx) string
 | 
			
		||||
 | 
			
		||||
	IsPrePacket() bool
 | 
			
		||||
 | 
			
		||||
@ -54,6 +54,10 @@ func (m *MongoDBMatcher) Key() string {
 | 
			
		||||
	return "MONGODB"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MongoDBMatcher) Type() string {
 | 
			
		||||
	return "NOSQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MongoDBMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "MongoDB"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,10 @@ func (m *MySqlMatcher) Key() string {
 | 
			
		||||
	return "MYSQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MySqlMatcher) Type() string {
 | 
			
		||||
	return "DATABASE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MySqlMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	name := "MySQL"
 | 
			
		||||
	if v, ok := matchCtx.GetAttribute("version"); ok {
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,10 @@ func (m *NBSSMatcher) Key() string {
 | 
			
		||||
	return "NBSS"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *NBSSMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *NBSSMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "NBSS"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,11 @@ type OracleMatcher struct {
 | 
			
		||||
func (m *OracleMatcher) Key() string {
 | 
			
		||||
	return "ORACLE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *OracleMatcher) Type() string {
 | 
			
		||||
	return "DATABASE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *OracleMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "Oracle"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -16,6 +16,10 @@ func (m *POPMatcher) Key() string {
 | 
			
		||||
	return "POP3"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *POPMatcher) Type() string {
 | 
			
		||||
	return "MAIL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *POPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "POP3"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,10 @@ func (m *PostgreSQLMatcher) Key() string {
 | 
			
		||||
	return "POSTGRESQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *PostgreSQLMatcher) Type() string {
 | 
			
		||||
	return "DATABASE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *PostgreSQLMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "PostgreSQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -20,6 +20,10 @@ func (m *RedisMatcher) Key() string {
 | 
			
		||||
	return "REDIS"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *RedisMatcher) Type() string {
 | 
			
		||||
	return "NOSQL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *RedisMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	name := "Redis"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -35,6 +35,10 @@ func (m *RMIMatcher) Key() string {
 | 
			
		||||
	return "RMI"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *RMIMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *RMIMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "RMI"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -56,6 +56,10 @@ func (m *SMBMatcher) Key() string {
 | 
			
		||||
	return "SMB"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SMBMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SMBMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "SMB"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,10 @@ func (m *SmtpMatcher) Key() string {
 | 
			
		||||
	return "SMTP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SmtpMatcher) Type() string {
 | 
			
		||||
	return "MAIL"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SmtpMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "SMTP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -47,6 +47,10 @@ func (s *SNMPMatcher) Key() string {
 | 
			
		||||
	return "SNMP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SNMPMatcher) Type() string {
 | 
			
		||||
	return "MONITORING"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *SNMPMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "SNMP"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,10 @@ func (m *SQLServerMatcher) Key() string {
 | 
			
		||||
	return "SQLSERVER"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SQLServerMatcher) Type() string {
 | 
			
		||||
	return "DATABASE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SQLServerMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	if m.isSSL {
 | 
			
		||||
		return "SQL Server (SSL)"
 | 
			
		||||
 | 
			
		||||
@ -16,6 +16,10 @@ func (m *SSHMatcher) Key() string {
 | 
			
		||||
	return "SSH"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SSHMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	name := "SSH"
 | 
			
		||||
	if v, ok := matchCtx.GetAttribute("softwareversion"); ok {
 | 
			
		||||
 | 
			
		||||
@ -20,6 +20,10 @@ func (m *TelnetMatcher) Key() string {
 | 
			
		||||
	return "TELNET"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *TelnetMatcher) Type() string {
 | 
			
		||||
	return "NETWORK"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *TelnetMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "Telnet"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -25,6 +25,10 @@ func (m *WMIMatcher) Key() string {
 | 
			
		||||
	return "WMI"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *WMIMatcher) Type() string {
 | 
			
		||||
	return "MONITORING"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *WMIMatcher) Name(matchCtx *osm.MatchCtx) string {
 | 
			
		||||
	return "WMI"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user