From 7e4a2f177588a5c5d273eb62ab190f629ab0e36d Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 13 Sep 2018 07:30:45 +0000 Subject: [PATCH] Revert "ing" This reverts commit f265cbad85fce34ce74278a071a92f56c3e011d3 --- activedirectory/activedirectory.go | 16 ---------------- cassandra/cassandra.go | 16 ---------------- dns/dns.go | 15 --------------- elasticsearch/elasticsearch.go | 15 --------------- ftp/ftp.go | 15 --------------- http/http.go | 16 ---------------- imap/imap.go | 15 --------------- ldap/ldap.go | 15 --------------- lpd/lpd.go | 16 ---------------- matcher.go | 4 ---- mongodb/mongodb.go | 16 ---------------- mysql/mysql.go | 16 ---------------- nbss/nbss.go | 15 --------------- oracle/oracle.go | 15 --------------- pop/pop.go | 15 --------------- postgresql/postgresql.go | 15 --------------- redis/redis.go | 16 ---------------- rmi/rmi.go | 16 ---------------- smb/smb.go | 16 ---------------- smtp/smtp.go | 15 --------------- snmp/v2/snmpv2.go | 16 ---------------- sqlserver/sqlserver.go | 15 --------------- ssh/ssh.go | 16 ---------------- telnet/telnet.go | 15 --------------- wmi/wmi.go | 15 --------------- 25 files changed, 375 deletions(-) diff --git a/activedirectory/activedirectory.go b/activedirectory/activedirectory.go index dab0f95..56d4e3a 100644 --- a/activedirectory/activedirectory.go +++ b/activedirectory/activedirectory.go @@ -181,22 +181,6 @@ func (m *ActiveDirectoryMatcher) Type() string { return "DIRECTORY" } -func (m *ActiveDirectoryMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "MicroSoft" -} - -func (m *ActiveDirectoryMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *ActiveDirectoryMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *ActiveDirectoryMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *ActiveDirectoryMatcher) Name(matchCtx *osm.MatchCtx) string { return "ActiveDirectory" } diff --git a/cassandra/cassandra.go b/cassandra/cassandra.go index 4daa669..d26281f 100644 --- a/cassandra/cassandra.go +++ b/cassandra/cassandra.go @@ -27,22 +27,6 @@ func (m *CassandraMatcher) Type() string { return "NOSQL" } -func (m *CassandraMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "The Apache Software Foundation" -} - -func (m *CassandraMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *CassandraMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *CassandraMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *CassandraMatcher) Name(matchCtx *osm.MatchCtx) string { return "Cassandra" } diff --git a/dns/dns.go b/dns/dns.go index 8dd543d..7819a15 100644 --- a/dns/dns.go +++ b/dns/dns.go @@ -48,21 +48,6 @@ func (m *DNSMatcher) Key() string { func (m *DNSMatcher) Type() string { return "NETWORK" } -func (m *DNSMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *DNSMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *DNSMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *DNSMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *DNSMatcher) Name(matchCtx *osm.MatchCtx) string { return "DNS" diff --git a/elasticsearch/elasticsearch.go b/elasticsearch/elasticsearch.go index 9258c59..80f5c0d 100644 --- a/elasticsearch/elasticsearch.go +++ b/elasticsearch/elasticsearch.go @@ -20,21 +20,6 @@ func (m *ElasticSearchMatcher) Key() string { func (m *ElasticSearchMatcher) Type() string { return "SEARCH" } -func (m *ElasticSearchMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "Elasticsearch" -} - -func (m *ElasticSearchMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *ElasticSearchMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *ElasticSearchMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *ElasticSearchMatcher) Name(matchCtx *osm.MatchCtx) string { name := "ElasticSearch" diff --git a/ftp/ftp.go b/ftp/ftp.go index 3d2daf9..9550685 100644 --- a/ftp/ftp.go +++ b/ftp/ftp.go @@ -36,21 +36,6 @@ func (m *FTPMatcher) Key() string { func (m *FTPMatcher) Type() string { return "NETWORK" } -func (m *FTPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *FTPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *FTPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *FTPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *FTPMatcher) Name(matchCtx *osm.MatchCtx) string { return "FTP" diff --git a/http/http.go b/http/http.go index 175f8ee..a328f75 100644 --- a/http/http.go +++ b/http/http.go @@ -18,22 +18,6 @@ func (m *HTTPMatcher) Type() string { return "WEB" } -func (m *HTTPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *HTTPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *HTTPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *HTTPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *HTTPMatcher) Name(matchCtx *osm.MatchCtx) string { name := "HTTP" if v, ok := matchCtx.GetAttribute("server"); ok { diff --git a/imap/imap.go b/imap/imap.go index e57c614..01d1677 100644 --- a/imap/imap.go +++ b/imap/imap.go @@ -20,21 +20,6 @@ func (m *IMAPMatcher) Key() string { func (m *IMAPMatcher) Type() string { return "MAIL" } -func (m *IMAPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *IMAPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *IMAPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *IMAPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *IMAPMatcher) Name(matchCtx *osm.MatchCtx) string { return "IMAP" diff --git a/ldap/ldap.go b/ldap/ldap.go index 53783b4..b56e3f0 100644 --- a/ldap/ldap.go +++ b/ldap/ldap.go @@ -25,21 +25,6 @@ func (m *LDAPMatcher) Key() string { func (m *LDAPMatcher) Type() string { return "DIRECTORY" } -func (m *LDAPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LDAPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LDAPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LDAPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *LDAPMatcher) Name(matchCtx *osm.MatchCtx) string { return "LDAP" diff --git a/lpd/lpd.go b/lpd/lpd.go index c8cc460..6a511c5 100644 --- a/lpd/lpd.go +++ b/lpd/lpd.go @@ -16,22 +16,6 @@ func (m *LPDMatcher) Type() string { return "NETWORK" } -func (m *LPDMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LPDMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LPDMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *LPDMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *LPDMatcher) Name(matchCtx *osm.MatchCtx) string { return "LPD (Printer)" } diff --git a/matcher.go b/matcher.go index 2b4b1bd..20de11a 100644 --- a/matcher.go +++ b/matcher.go @@ -7,10 +7,6 @@ import ( type Matcher interface { Key() string Type() string - Vendor(matchCtx *MatchCtx) string - Version(matchCtx *MatchCtx) string - OsType(matchCtx *MatchCtx) string - OsVersion(matchCtx *MatchCtx) string Name(matchCtx *MatchCtx) string IsPrePacket() bool diff --git a/mongodb/mongodb.go b/mongodb/mongodb.go index 54d006e..f7c42ed 100644 --- a/mongodb/mongodb.go +++ b/mongodb/mongodb.go @@ -58,22 +58,6 @@ func (m *MongoDBMatcher) Type() string { return "NOSQL" } -func (m *MongoDBMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "MongoDB" -} - -func (m *MongoDBMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *MongoDBMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *MongoDBMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *MongoDBMatcher) Name(matchCtx *osm.MatchCtx) string { return "MongoDB" } diff --git a/mysql/mysql.go b/mysql/mysql.go index 256a0d7..2d63a57 100644 --- a/mysql/mysql.go +++ b/mysql/mysql.go @@ -21,22 +21,6 @@ func (m *MySqlMatcher) Type() string { return "DATABASE" } -func (m *MySqlMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "Oracle" -} - -func (m *MySqlMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *MySqlMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *MySqlMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *MySqlMatcher) Name(matchCtx *osm.MatchCtx) string { name := "MySQL" if v, ok := matchCtx.GetAttribute("version"); ok { diff --git a/nbss/nbss.go b/nbss/nbss.go index b429ca4..2a336b3 100644 --- a/nbss/nbss.go +++ b/nbss/nbss.go @@ -36,21 +36,6 @@ func (m *NBSSMatcher) Key() string { func (m *NBSSMatcher) Type() string { return "NETWORK" } -func (m *NBSSMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *NBSSMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *NBSSMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *NBSSMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *NBSSMatcher) Name(matchCtx *osm.MatchCtx) string { return "NBSS" diff --git a/oracle/oracle.go b/oracle/oracle.go index 4ceee28..3105577 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -18,21 +18,6 @@ func (m *OracleMatcher) Key() string { func (m *OracleMatcher) Type() string { return "DATABASE" } -func (m *OracleMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "Oracle" -} - -func (m *OracleMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *OracleMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *OracleMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *OracleMatcher) Name(matchCtx *osm.MatchCtx) string { return "Oracle" diff --git a/pop/pop.go b/pop/pop.go index f8ccec0..7fe9d8b 100644 --- a/pop/pop.go +++ b/pop/pop.go @@ -19,21 +19,6 @@ func (m *POPMatcher) Key() string { func (m *POPMatcher) Type() string { return "MAIL" } -func (m *POPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *POPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *POPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *POPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *POPMatcher) Name(matchCtx *osm.MatchCtx) string { return "POP3" diff --git a/postgresql/postgresql.go b/postgresql/postgresql.go index b942ef8..ab8f8bc 100644 --- a/postgresql/postgresql.go +++ b/postgresql/postgresql.go @@ -48,21 +48,6 @@ func (m *PostgreSQLMatcher) Key() string { func (m *PostgreSQLMatcher) Type() string { return "DATABASE" } -func (m *PostgreSQLMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "PostgreSQL" -} - -func (m *PostgreSQLMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *PostgreSQLMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *PostgreSQLMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *PostgreSQLMatcher) Name(matchCtx *osm.MatchCtx) string { return "PostgreSQL" diff --git a/redis/redis.go b/redis/redis.go index 90d49e2..6e8cc07 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -24,22 +24,6 @@ func (m *RedisMatcher) Type() string { return "NOSQL" } -func (m *RedisMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "Redis" -} - -func (m *RedisMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *RedisMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *RedisMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *RedisMatcher) Name(matchCtx *osm.MatchCtx) string { name := "Redis" diff --git a/rmi/rmi.go b/rmi/rmi.go index 0d2c628..1d6909a 100644 --- a/rmi/rmi.go +++ b/rmi/rmi.go @@ -39,22 +39,6 @@ func (m *RMIMatcher) Type() string { return "NETWORK" } -func (m *RMIMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *RMIMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *RMIMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *RMIMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *RMIMatcher) Name(matchCtx *osm.MatchCtx) string { return "RMI" } diff --git a/smb/smb.go b/smb/smb.go index bc8c803..fee213c 100644 --- a/smb/smb.go +++ b/smb/smb.go @@ -60,22 +60,6 @@ func (m *SMBMatcher) Type() string { return "NETWORK" } -func (m *SMBMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SMBMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SMBMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SMBMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *SMBMatcher) Name(matchCtx *osm.MatchCtx) string { return "SMB" } diff --git a/smtp/smtp.go b/smtp/smtp.go index 3a97f5d..f08b726 100644 --- a/smtp/smtp.go +++ b/smtp/smtp.go @@ -17,21 +17,6 @@ func (m *SmtpMatcher) Key() string { func (m *SmtpMatcher) Type() string { return "MAIL" } -func (m *SmtpMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SmtpMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SmtpMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SmtpMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *SmtpMatcher) Name(matchCtx *osm.MatchCtx) string { return "SMTP" diff --git a/snmp/v2/snmpv2.go b/snmp/v2/snmpv2.go index beb3a1b..63a6d2e 100644 --- a/snmp/v2/snmpv2.go +++ b/snmp/v2/snmpv2.go @@ -51,22 +51,6 @@ func (m *SNMPMatcher) Type() string { return "MONITORING" } -func (m *SNMPMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SNMPMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SNMPMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SNMPMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (s *SNMPMatcher) Name(matchCtx *osm.MatchCtx) string { return "SNMP" } diff --git a/sqlserver/sqlserver.go b/sqlserver/sqlserver.go index 0eb1bf9..7b539fd 100644 --- a/sqlserver/sqlserver.go +++ b/sqlserver/sqlserver.go @@ -76,21 +76,6 @@ func (m *SQLServerMatcher) Key() string { func (m *SQLServerMatcher) Type() string { return "DATABASE" } -func (m *SQLServerMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "MicroSoft" -} - -func (m *SQLServerMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SQLServerMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SQLServerMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *SQLServerMatcher) Name(matchCtx *osm.MatchCtx) string { if m.isSSL { diff --git a/ssh/ssh.go b/ssh/ssh.go index dba976a..d61bb47 100644 --- a/ssh/ssh.go +++ b/ssh/ssh.go @@ -20,22 +20,6 @@ func (m *SSHMatcher) Type() string { return "NETWORK" } -func (m *SSHMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SSHMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SSHMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *SSHMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string { name := "SSH" if v, ok := matchCtx.GetAttribute("softwareversion"); ok { diff --git a/telnet/telnet.go b/telnet/telnet.go index c04f9f1..ad54df1 100644 --- a/telnet/telnet.go +++ b/telnet/telnet.go @@ -23,21 +23,6 @@ func (m *TelnetMatcher) Key() string { func (m *TelnetMatcher) Type() string { return "NETWORK" } -func (m *TelnetMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *TelnetMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *TelnetMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *TelnetMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *TelnetMatcher) Name(matchCtx *osm.MatchCtx) string { return "Telnet" diff --git a/wmi/wmi.go b/wmi/wmi.go index 5601b5d..267dad6 100644 --- a/wmi/wmi.go +++ b/wmi/wmi.go @@ -28,21 +28,6 @@ func (m *WMIMatcher) Key() string { func (m *WMIMatcher) Type() string { return "MONITORING" } -func (m *WMIMatcher) Vendor(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *WMIMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *WMIMatcher) OsType(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} - -func (m *WMIMatcher) OsVersion(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" -} func (m *WMIMatcher) Name(matchCtx *osm.MatchCtx) string { return "WMI"