diff --git a/operators/matcher.go b/operators/matcher.go index f83444b..996a57d 100644 --- a/operators/matcher.go +++ b/operators/matcher.go @@ -97,6 +97,9 @@ func (m *Matcher) CompileMatchers() error { if m.Part == "" { m.Part = "body" } + if strings.HasPrefix(m.Part, "interactsh") { + return fmt.Errorf("interactsh is not supported as matcher part") + } // Compile the regexes for _, regex := range m.Regex { diff --git a/protocols/http/request.go b/protocols/http/request.go index 0003c96..f86b413 100644 --- a/protocols/http/request.go +++ b/protocols/http/request.go @@ -435,6 +435,7 @@ func (r *Request) executeRequest(input *protocols.ScanContext, request *generate common.Dump(finalEvent) event := &protocols.InternalWrappedEvent{InternalEvent: finalEvent} + defer input.LogEvent(event) if r.CompiledOperators != nil { var ok bool event.OperatorsResult, ok = r.CompiledOperators.Execute(finalEvent, r.Match, r.Extract) @@ -516,8 +517,8 @@ var ( ) // NeedsRequestCondition determines if request condition should be enabled -func (request *Request) NeedsRequestCondition() bool { - for _, matcher := range request.Matchers { +func (r *Request) NeedsRequestCondition() bool { + for _, matcher := range r.Matchers { if checkRequestConditionExpressions(matcher.DSL...) { return true } @@ -525,7 +526,7 @@ func (request *Request) NeedsRequestCondition() bool { return true } } - for _, extractor := range request.Extractors { + for _, extractor := range r.Extractors { if checkRequestConditionExpressions(extractor.DSL...) { return true }