mirror of https://github.com/daffainfo/nuclei.git
Add dynamic extracted values to history
parent
d106ae2ef1
commit
bf63eb5937
|
@ -56,7 +56,7 @@ type Result struct {
|
|||
// OutputExtracts is the list of extracts to be displayed on screen.
|
||||
OutputExtracts []string
|
||||
// DynamicValues contains any dynamic values to be templated
|
||||
DynamicValues map[string]string
|
||||
DynamicValues map[string]interface{}
|
||||
// PayloadValues contains payload values provided by user. (Optional)
|
||||
PayloadValues map[string]interface{}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func (r *Operators) Execute(data map[string]interface{}, match MatchFunc, extrac
|
|||
result := &Result{
|
||||
Matches: make(map[string]struct{}),
|
||||
Extracts: make(map[string][]string),
|
||||
DynamicValues: make(map[string]string),
|
||||
DynamicValues: make(map[string]interface{}),
|
||||
}
|
||||
for _, matcher := range r.Matchers {
|
||||
// Check if the matcher matched
|
||||
|
|
|
@ -197,6 +197,12 @@ func (e *Request) ExecuteWithResults(reqURL string, dynamicValues map[string]int
|
|||
if err != nil {
|
||||
requestErr = multierr.Append(requestErr, err)
|
||||
} else {
|
||||
// Add the extracts to the dynamic values if any.
|
||||
for _, o := range output {
|
||||
if o.OperatorsResult != nil {
|
||||
dynamicValues = generators.MergeMaps(dynamicValues, o.OperatorsResult.DynamicValues)
|
||||
}
|
||||
}
|
||||
outputs = append(outputs, output...)
|
||||
}
|
||||
e.options.Progress.IncrementRequests()
|
||||
|
|
Loading…
Reference in New Issue