diff --git a/v2/pkg/runner/options.go b/v2/pkg/runner/options.go index 582486503..195165856 100644 --- a/v2/pkg/runner/options.go +++ b/v2/pkg/runner/options.go @@ -165,16 +165,13 @@ func ParseOptions() *Options { // Check if stdin pipe was given options.Stdin = fileutil.HasStdin() - // Read the inputs and configure the logging - options.configureOutput() - if options.Version { gologger.Info().Msgf("Current Version: %s\n", version) gologger.Info().Msgf("Subfinder Config Directory: %s", configDir) os.Exit(0) } - options.preProcessOptions() + options.preProcessDomains() if !options.Silent { showBanner() @@ -235,7 +232,7 @@ func listSources(options *Options) { } } -func (options *Options) preProcessOptions() { +func (options *Options) preProcessDomains() { for i, domain := range options.Domain { options.Domain[i], _ = sanitize(domain) } diff --git a/v2/pkg/runner/runner.go b/v2/pkg/runner/runner.go index 83887ea94..d14dcb077 100644 --- a/v2/pkg/runner/runner.go +++ b/v2/pkg/runner/runner.go @@ -36,6 +36,7 @@ type Runner struct { // the configuration options, configuring sources, reading lists // and setting up loggers, etc. func NewRunner(options *Options) (*Runner, error) { + options.configureOutput() runner := &Runner{options: options} // Check if the application loading with any provider configuration, then take it