From c2ba8ea0e2c0d88b7aedbf78e07197638567f8ca Mon Sep 17 00:00:00 2001 From: kv2 Date: Sun, 9 Mar 2025 10:21:51 +0800 Subject: [PATCH 1/2] add HTTPEventLog --- protocols/http/request.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 } From 4d03789597f6e8fddb57e0250141c6c5886352f6 Mon Sep 17 00:00:00 2001 From: kv2 Date: Wed, 26 Mar 2025 16:57:12 +0800 Subject: [PATCH 2/2] add interacthsh complie --- operators/matcher.go | 3 +++ 1 file changed, 3 insertions(+) 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 {