mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:55:28 +00:00
Add dynamic extracted values to history
This commit is contained in:
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…
x
Reference in New Issue
Block a user