mirror of https://github.com/daffainfo/nuclei.git
Fixed stats calculation for payloads in http base request
parent
4421202bc1
commit
bd7f32d92f
|
@ -346,7 +346,7 @@ func (r *Runner) RunEnumeration() error {
|
|||
if len(t.Workflows) > 0 {
|
||||
continue
|
||||
}
|
||||
totalRequests += int64(t.TotalRequests) * r.hmapInputProvider.Count()
|
||||
totalRequests += int64(t.Executer.Requests()) * r.hmapInputProvider.Count()
|
||||
}
|
||||
if totalRequests < unclusteredRequests {
|
||||
gologger.Info().Msgf("Templates clustered: %d (Reduced %d HTTP Requests)", clusterCount, unclusteredRequests-totalRequests)
|
||||
|
|
|
@ -298,7 +298,13 @@ func (request *Request) Compile(options *protocols.ExecuterOptions) error {
|
|||
// Requests returns the total number of requests the YAML rule will perform
|
||||
func (request *Request) Requests() int {
|
||||
if request.generator != nil {
|
||||
payloadRequests := request.generator.NewIterator().Total() * len(request.Raw)
|
||||
payloadRequests := request.generator.NewIterator().Total()
|
||||
if len(request.Raw) > 0 {
|
||||
payloadRequests = payloadRequests * len(request.Raw)
|
||||
}
|
||||
if len(request.Path) > 0 {
|
||||
payloadRequests = payloadRequests * len(request.Path)
|
||||
}
|
||||
return payloadRequests
|
||||
}
|
||||
if len(request.Raw) > 0 {
|
||||
|
|
Loading…
Reference in New Issue