Skip to content

Commit

Permalink
fix: fix running multiple methods
Browse files Browse the repository at this point in the history
  • Loading branch information
NSEcho committed Sep 13, 2023
1 parent 786bfc6 commit fe52156
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions mutator/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ func (m *Mutator) Mutate() <-chan *Mutated {
}
ct++
}
}

if _, ok := applyFunctions[m.fnName]; ok {
mutatedInput = applyFunctions[m.fnName](mutatedInput)
}
if _, ok := applyFunctions[m.fnName]; ok {
mutatedInput = applyFunctions[m.fnName](mutatedInput)
}

if m.fuzzIdx == -1 || len(m.validInputs) == 0 {
m.ch <- &Mutated{
Input: mutatedInput,
Mutation: method,
}
} else {
m.ch <- &Mutated{
Input: strings.Replace(m.baseURL, "FUZZ", mutatedInput, -1),
Mutation: method,
}
if m.fuzzIdx == -1 || len(m.validInputs) == 0 {
m.ch <- &Mutated{
Input: mutatedInput,
Mutation: method,
}
} else {
m.ch <- &Mutated{
Input: strings.Replace(m.baseURL, "FUZZ", mutatedInput, -1),
Mutation: method,
}
}
m.lastInput = mutatedInput
Expand Down

0 comments on commit fe52156

Please sign in to comment.