MCPcopy
hub / github.com/projectdiscovery/subfinder / Source

Interface Source

pkg/subscraping/types.go:48–77  ·  view source on GitHub ↗

Source is an interface inherited by each passive source

Source from the content-addressed store, hash-verified

46
47// Source is an interface inherited by each passive source
48type Source interface {
49 // Run takes a domain as argument and a session object
50 // which contains the extractor for subdomains, http client
51 // and other stuff.
52 Run(context.Context, string, *Session) <-chan Result
53
54 // Name returns the name of the source. It is preferred to use lower case names.
55 Name() string
56
57 // IsDefault returns true if the current source should be
58 // used as part of the default execution.
59 IsDefault() bool
60
61 // HasRecursiveSupport returns true if the current source
62 // accepts subdomains (e.g. subdomain.domain.tld),
63 // not just root domains.
64 HasRecursiveSupport() bool
65
66 // KeyRequirement returns the API key requirement level for this source
67 KeyRequirement() KeyRequirement
68
69 // NeedsKey returns true if the source requires an API key.
70 // Deprecated: Use KeyRequirement() instead for more granular control.
71 NeedsKey() bool
72
73 AddApiKeys([]string)
74
75 // Statistics returns the scrapping statistics for the source
76 Statistics() Statistics
77}
78
79// SubdomainExtractor is an interface that defines the contract for subdomain extraction.
80type SubdomainExtractor interface {

Callers 168

TestSourceFilteringFunction · 0.65
TestSourcesWithoutKeysFunction · 0.65
TestSourcesWithKeysFunction · 0.65
listSourcesFunction · 0.65
createProviderConfigYAMLFunction · 0.65
UnmarshalFromFunction · 0.65
TestSourceCategorizationFunction · 0.65
TestSourceFilteringFunction · 0.65
TestSourcesWithoutKeysFunction · 0.65

Implementers 15

Sourcepkg/subscraping/sources/submd/submd.go
Sourcepkg/subscraping/sources/waybackarchive
Sourcepkg/subscraping/sources/bevigil/bevigi
Sourcepkg/subscraping/sources/hackertarget/h
Sourcepkg/subscraping/sources/chinaz/chinaz.
Sourcepkg/subscraping/sources/rapiddns/rapid
Sourcepkg/subscraping/sources/chaos/chaos.go
Sourcepkg/subscraping/sources/windvane/windv
Sourcepkg/subscraping/sources/hudsonrock/hud
Sourcepkg/subscraping/sources/threatbook/thr
Sourcepkg/subscraping/sources/dnsdumpster/dn
Sourcepkg/subscraping/sources/threatcrowd/th

Calls

no outgoing calls

Tested by

no test coverage detected