ing
This commit is contained in:
		
							parent
							
								
									3efa746c76
								
							
						
					
					
						commit
						042e4ac37b
					
				@ -9,7 +9,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	cnsm "git.loafle.net/commons/service_matcher-go"
 | 
			
		||||
	cuej "git.loafle.net/commons_go/util/encoding/json"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,7 @@ func (s *SocketHeahthCrawler) SetMatcher(m cnsm.Matcher) {
 | 
			
		||||
	s.m = m
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *SocketHeahthCrawler) getConnection(config *ocsm.SensorConfig) (net.Conn, error) {
 | 
			
		||||
func (s *SocketHeahthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Conn, error) {
 | 
			
		||||
	connection := config.Target.Connection
 | 
			
		||||
 | 
			
		||||
	ip := connection.IP
 | 
			
		||||
@ -54,7 +54,7 @@ func (s *SocketHeahthCrawler) getConnection(config *ocsm.SensorConfig) (net.Conn
 | 
			
		||||
	return conn, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *SocketHeahthCrawler) CheckHeahth(config *ocsm.SensorConfig) (result map[string]string, err error) {
 | 
			
		||||
func (s *SocketHeahthCrawler) CheckHeahth(config *ocmsc.SensorConfig) (result map[string]string, err error) {
 | 
			
		||||
	result = make(map[string]string, 0)
 | 
			
		||||
 | 
			
		||||
	result["StartTime"] = time.Now().String()
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package activedirectory
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	csma "git.loafle.net/commons/service_matcher-go/activedirectory"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *ActiveDirectoryHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *ActiveDirectoryHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *ActiveDirectoryHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.1",
 | 
			
		||||
		Port:     json.Number(389),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package cassandra
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmc "git.loafle.net/commons/service_matcher-go/cassandra"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *CassandraHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *CassandraHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *CassandraHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.104",
 | 
			
		||||
		Port:     json.Number(9042),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package dns
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmd "git.loafle.net/commons/service_matcher-go/dns"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *DNSHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *DNSHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *DNSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(53),
 | 
			
		||||
		PortType: "udp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package ftp
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmf "git.loafle.net/commons/service_matcher-go/ftp"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *FTPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *FTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *FTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(21),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package http
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmh "git.loafle.net/commons/service_matcher-go/http"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *HTTPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *HTTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *HTTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.105",
 | 
			
		||||
		Port:     json.Number(80),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package imap
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmi "git.loafle.net/commons/service_matcher-go/imap"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *IMAPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *IMAPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *IMAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(993),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package ldap
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsml "git.loafle.net/commons/service_matcher-go/ldap"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *LDAPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *LDAPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *LDAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(389),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package mongodb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmm "git.loafle.net/commons/service_matcher-go/mongodb"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *MongoDBHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *MongoDBHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *MongoDBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.104",
 | 
			
		||||
		Port:     json.Number(27017),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package mysql
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmm "git.loafle.net/commons/service_matcher-go/mysql"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *MySQLHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *MySQLHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *MySQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.103",
 | 
			
		||||
		Port:     json.Number(3306),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package netbios
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmn "git.loafle.net/commons/service_matcher-go/netbios"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *NetBIOSHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *NetBIOSHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *NetBIOSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.106",
 | 
			
		||||
		Port:     json.Number(139),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package oracle
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmo "git.loafle.net/commons/service_matcher-go/oracle"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *OracleHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *OracleHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *OracleHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.30",
 | 
			
		||||
		Port:     json.Number(1521),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package pop
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmp "git.loafle.net/commons/service_matcher-go/pop"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *POPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *POPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *POPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(110),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package postgresql
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmp "git.loafle.net/commons/service_matcher-go/postgresql"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *PostgreSQLHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *PostgreSQLHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *PostgreSQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.107",
 | 
			
		||||
		Port:     json.Number(5432),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package redis
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmr "git.loafle.net/commons/service_matcher-go/redis"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *RedisHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *RedisHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *RedisHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.104",
 | 
			
		||||
		Port:     json.Number(6379),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package rmi
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmr "git.loafle.net/commons/service_matcher-go/rmi"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *RMIHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *RMIHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *RMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.103",
 | 
			
		||||
		Port:     json.Number(9840),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package smb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/smb"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SMBHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SMBHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SMBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.106",
 | 
			
		||||
		Port:     json.Number(445),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package smtp
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/smtp"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SMTPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SMTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SMTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(25),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package v2
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/snmp/v2"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SNMPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(161),
 | 
			
		||||
		PortType: "udp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package v3
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/snmp/v3"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	"git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SNMPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.254",
 | 
			
		||||
		Port:     json.Number(161),
 | 
			
		||||
		PortType: "udp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package sqlserver
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/sqlserver"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SQLServerHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SQLServerHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SQLServerHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.106",
 | 
			
		||||
		Port:     json.Number(1433),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package ssh
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsms "git.loafle.net/commons/service_matcher-go/ssh"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *SSHHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SSHHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SSHHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(22),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package telnet
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmt "git.loafle.net/commons/service_matcher-go/telnet"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *TelnetHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *TelnetHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *TelnetHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.215",
 | 
			
		||||
		Port:     json.Number(23),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package wmi
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	cnsmw "git.loafle.net/commons/service_matcher-go/wmi"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/health"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
)
 | 
			
		||||
@ -23,7 +23,7 @@ func (c *WMIHealthCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *WMIHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *WMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	rss, err := c.CheckHeahth(config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,14 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config.Target = &ocsm.Target{}
 | 
			
		||||
	config.Target.Connection = &ocsm.Connection{
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	config.Target = &ocmsc.Target{}
 | 
			
		||||
	config.Target.Connection = &ocmsc.Connection{
 | 
			
		||||
		IP:       "192.168.1.1",
 | 
			
		||||
		Port:     json.Number(135),
 | 
			
		||||
		PortType: "tcp",
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	uuid "github.com/satori/go.uuid"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/ssh/client"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/crawler/ssh/parser"
 | 
			
		||||
	crawler "git.loafle.net/overflow/crawler-go"
 | 
			
		||||
@ -29,7 +29,7 @@ func (c *SSHCrawler) Auth(auth map[string]interface{}) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *SSHCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
func (c *SSHCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) {
 | 
			
		||||
	sshClient, err := client.New(config.Target)
 | 
			
		||||
	if nil != err {
 | 
			
		||||
		return nil, err
 | 
			
		||||
@ -73,7 +73,7 @@ func (c *SSHCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) {
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if nil != rm {
 | 
			
		||||
			mm := ocsm.KeysToMap(item.Keys)
 | 
			
		||||
			mm := ocmsc.KeysToMap(item.Keys)
 | 
			
		||||
			for key, value := range mm {
 | 
			
		||||
				results[value] = rm[key]
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@ -6,12 +6,12 @@ import (
 | 
			
		||||
	"log"
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestMatch(t *testing.T) {
 | 
			
		||||
	config := &ocsm.SensorConfig{}
 | 
			
		||||
	config := &ocmsc.SensorConfig{}
 | 
			
		||||
	data, err := ioutil.ReadFile("./SSHCrawler_test.json")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatal(err)
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	"git.loafle.net/commons_go/logging"
 | 
			
		||||
	cuej "git.loafle.net/commons_go/util/encoding/json"
 | 
			
		||||
	ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
 | 
			
		||||
	ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
 | 
			
		||||
	"golang.org/x/crypto/ssh"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -88,7 +88,7 @@ func parsePrivateKey(keyPath, pw string) (ssh.Signer, error) {
 | 
			
		||||
	return ssh.ParsePrivateKeyWithPassphrase(buff, []byte(pw))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func New(target *ocsm.Target) (*SSHClient, error) {
 | 
			
		||||
func New(target *ocmsc.Target) (*SSHClient, error) {
 | 
			
		||||
	connection := target.Connection
 | 
			
		||||
	auth := target.Auth
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.go
									
									
									
									
									
								
							@ -10,7 +10,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"git.loafle.net/commons/logging-go"
 | 
			
		||||
	ocpcc "git.loafle.net/overflow/commons-go/probe/constants"
 | 
			
		||||
	occp "git.loafle.net/overflow/commons-go/config/probe"
 | 
			
		||||
	"git.loafle.net/overflow/container_network/server"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -19,8 +19,8 @@ var (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	pidFilePath = flag.String(ocpcc.FlagPidFilePathName, "./dist/network.pid", "PID file path")
 | 
			
		||||
	loggingConfigFilePath := flag.String(ocpcc.FlagLoggingConfigFilePathName, "", "logging config path")
 | 
			
		||||
	pidFilePath = flag.String(occp.FlagPidFilePathName, "./dist/network.pid", "PID file path")
 | 
			
		||||
	loggingConfigFilePath := flag.String(occp.FlagLoggingConfigFilePathName, "", "logging config path")
 | 
			
		||||
	flag.Parse()
 | 
			
		||||
 | 
			
		||||
	logging.InitializeLogger(*loggingConfigFilePath)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user