Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/input/provider/chunked.go
2070 views
1
package provider
2
3
import (
4
"github.com/projectdiscovery/nuclei/v3/pkg/input/types"
5
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/contextargs"
6
)
7
8
// TODO: Implement ChunkedInputProvider
9
// 1. Lazy loading of input targets
10
// 2. Load and execute in chunks that fit in memory
11
// 3. Eliminate use of HybridMap since it performs worst due to marshal/unmarshal overhead
12
13
// ChunkedInputProvider is an input providing chunked targets instead of loading all at once
14
type ChunkedInputProvider interface {
15
// Count returns total targets for input provider
16
Count() int64
17
// Iterate over all inputs in order
18
Iterate(callback func(value *contextargs.MetaInput) bool)
19
// Set adds item to input provider
20
Set(value string)
21
// SetWithProbe adds item to input provider with http probing
22
SetWithProbe(value string, probe types.InputLivenessProbe) error
23
// SetWithExclusions adds item to input provider if it doesn't match any of the exclusions
24
SetWithExclusions(value string) error
25
// InputType returns the type of input provider
26
InputType() string
27
// Switches to the next chunk/batch of input
28
NextChunk() bool
29
}
30
31