package nuclei12import (3"context"45"github.com/projectdiscovery/nuclei/v3/pkg/catalog/config"6uncoverNuclei "github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/uncover"7"github.com/projectdiscovery/nuclei/v3/pkg/templates"8"github.com/projectdiscovery/uncover"9)1011// helper.go file proxy execution of all nuclei functions that are nested deep inside multiple packages12// but are helpful / useful while using nuclei as a library1314// GetTargetsFromUncover returns targets from uncover in given format .15// supported formats are any string with [ip,host,port,url] placeholders16func GetTargetsFromUncover(ctx context.Context, outputFormat string, opts *uncover.Options) (chan string, error) {17return uncoverNuclei.GetTargetsFromUncover(ctx, outputFormat, opts)18}1920// GetTargetsFromTemplateMetadata returns all targets by querying engine metadata (ex: fofo-query,shodan-query) etc from given templates .21// supported formats are any string with [ip,host,port,url] placeholders22func GetTargetsFromTemplateMetadata(ctx context.Context, templates []*templates.Template, outputFormat string, opts *uncover.Options) chan string {23return uncoverNuclei.GetUncoverTargetsFromMetadata(ctx, templates, outputFormat, opts)24}2526// DefaultConfig is instance of default nuclei configs27// any mutations to this config will be reflected in all nuclei instances (saves some config to disk)28var DefaultConfig *config.Config2930func init() {31DefaultConfig = config.DefaultConfig32}333435