27 lines
492 B
Go
27 lines
492 B
Go
|
package netbios
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"testing"
|
||
|
|
||
|
ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestMatch(t *testing.T) {
|
||
|
config := &ocsm.SensorConfig{}
|
||
|
config.Target = &ocsm.Target{}
|
||
|
config.Target.Connection = &ocsm.Connection{
|
||
|
IP: "192.168.1.106",
|
||
|
Port: json.Number(139),
|
||
|
PortType: "tcp",
|
||
|
SSL: false,
|
||
|
}
|
||
|
|
||
|
c := NewCrawler()
|
||
|
rss, err := c.Get(config)
|
||
|
|
||
|
assert.Nil(t, err)
|
||
|
assert.NotNil(t, rss)
|
||
|
}
|