Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions operators/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions protocols/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -516,16 +517,16 @@ 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
}
if checkRequestConditionExpressions(matcher.Part) {
return true
}
}
for _, extractor := range request.Extractors {
for _, extractor := range r.Extractors {
if checkRequestConditionExpressions(extractor.DSL...) {
return true
}
Expand Down