diff --git a/ldap/ldap.go b/ldap/ldap.go index 5d43e42..36f4507 100644 --- a/ldap/ldap.go +++ b/ldap/ldap.go @@ -45,6 +45,10 @@ func (l *LDAPMatcher) Match(info osm.MatchInfo, index int, packet *osm.Packet) e } p := ber.DecodePacket(packet.Buffer) + if len(p.Children) <= 1 { + return osm.NotMatchedError() + } + respID, ok := p.Children[0].Value.(int64) if !ok { return osm.NotMatchedError() diff --git a/wmi/wmi_test.go b/wmi/wmi_test.go index 357bb1a..f9df46b 100644 --- a/wmi/wmi_test.go +++ b/wmi/wmi_test.go @@ -7,11 +7,12 @@ import ( osm "git.loafle.net/overflow/service_matcher-go" ) +// dcerpc func TestWMI(t *testing.T) { m := NewMatcher() - conn, err := net.Dial("tcp", "192.168.1.203:135") + conn, err := net.Dial("tcp", "192.168.1.200:135") if err != nil { t.Error(err) }