diff --git a/network_crawler.go b/network_crawler.go index be6464e..cabe3ea 100644 --- a/network_crawler.go +++ b/network_crawler.go @@ -8,6 +8,29 @@ import ( "loafle.com/overflow/crawler_go/health_crawler/redis_protocol_crawler_go" "log" "net" + "loafle.com/overflow/crawler_go/health_crawler/activedirectory_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/dns_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/ftp_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/ftps_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/imap_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/ldap_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/mongodb_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/mssql_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/mysql_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/pgsql_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/netbios_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/oracle_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/pop3_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/rmi_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/smb_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/smtp_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/snmpv2c_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/snmpv3_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/ssh_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/telnet_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/wmi_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/cassandra_protocol_crawler_go" + "loafle.com/overflow/crawler_go/health_crawler/http_protocol_crawler_go" ) var g_crawlers map[string]crawler.Crawler @@ -22,31 +45,31 @@ func AddDelegate(name string, c crawler.Crawler) { func initCrawlers() { g_crawlers = make(map[string]crawler.Crawler, 0) - //AddDelegate(pb.Crawlers_HEALTH_ACTIVEDIRECTORY.String(), activedirectory_protocol_crawler_go.NewActiveDirectoryHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_DNS.String(), dns_protocol_crawler_go.NewDNSHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_FTP.String(), ftp_protocol_crawler_go.NewFTPHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_FTPS.String(), ftps_protocol_crawler_go.NewFTPSHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_IMAP.String(), imap_protocol_crawler_go.NewIMAPHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_LDAP.String(), ldap_protocol_crawler_go.NewLDAPHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_MONGODB.String(), mongodb_protocol_crawler_go.NewMongoDBHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_MSSQL.String(), mssql_protocol_crawler_go.NewMSSqlHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_MYSQL.String(), mysql_protocol_crawler_go.NewMysqlHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_MARIADB.String(), mysql_protocol_crawler_go.NewMysqlHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_PGSQL.String(), pgsql_protocol_crawler_go.NewPGSqlHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_NETBIOS.String(), netbios_protocol_crawler_go.NewNetbiosHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_ORACLE.String(), oracle_protocol_crawler_go.NewOracleHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_POP3.String(), pop3_protocol_crawler_go.NewPOP3HeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_ACTIVEDIRECTORY.String(), activedirectory_protocol_crawler_go.NewActiveDirectoryHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_DNS.String(), dns_protocol_crawler_go.NewDNSHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_FTP.String(), ftp_protocol_crawler_go.NewFTPHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_FTPS.String(), ftps_protocol_crawler_go.NewFTPSHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_IMAP.String(), imap_protocol_crawler_go.NewIMAPHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_LDAP.String(), ldap_protocol_crawler_go.NewLDAPHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_MONGODB.String(), mongodb_protocol_crawler_go.NewMongoDBHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_MSSQL.String(), mssql_protocol_crawler_go.NewMSSqlHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_MYSQL.String(), mysql_protocol_crawler_go.NewMysqlHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_MARIADB.String(), mysql_protocol_crawler_go.NewMysqlHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_PGSQL.String(), pgsql_protocol_crawler_go.NewPGSqlHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_NETBIOS.String(), netbios_protocol_crawler_go.NewNetbiosHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_ORACLE.String(), oracle_protocol_crawler_go.NewOracleHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_POP3.String(), pop3_protocol_crawler_go.NewPOP3HeahthCrawler()) AddDelegate(pb.Crawlers_HEALTH_REDIS.String(), redis_protocol_crawler_go.NewRedisHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_RMI.String(), rmi_protocol_crawler_go.NewRMIHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_SMB.String(), smb_protocol_crawler_go.NewSMBHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_SMTP.String(), smtp_protocol_crawler_go.NewSMTPHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_SNMPV2C.String(), snmpv2c_protocol_crawler_go.NewSNMPV2CHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_SNMPV3.String(), snmpv3_protocol_crawler_go.NewSNMPV3HeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_SSH.String(), ssh_protocol_crawler_go.NewSSHHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_TELNET.String(), telnet_protocol_crawler_go.NewTelnetHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_WMI.String(), wmi_protocol_crawler_go.NewWMIHeahthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_CASSANDRA.String(), cassandra_protocol_crawler_go.NewCassandraHealthCrawler()) - //AddDelegate(pb.Crawlers_HEALTH_HTTP.String(), http_protocol_crawler_go.NewHTTPHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_RMI.String(), rmi_protocol_crawler_go.NewRMIHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_SMB.String(), smb_protocol_crawler_go.NewSMBHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_SMTP.String(), smtp_protocol_crawler_go.NewSMTPHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_SNMPV2C.String(), snmpv2c_protocol_crawler_go.NewSNMPV2CHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_SNMPV3.String(), snmpv3_protocol_crawler_go.NewSNMPV3HeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_SSH.String(), ssh_protocol_crawler_go.NewSSHHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_TELNET.String(), telnet_protocol_crawler_go.NewTelnetHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_WMI.String(), wmi_protocol_crawler_go.NewWMIHeahthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_CASSANDRA.String(), cassandra_protocol_crawler_go.NewCassandraHealthCrawler()) + AddDelegate(pb.Crawlers_HEALTH_HTTP.String(), http_protocol_crawler_go.NewHTTPHealthCrawler()) } func start(rc pb.ConfigServer, rd pb.DataServer, rs pb.StatusServer) {