We always put results with format even if no verbose option is set

master
Víctor Zamanillo 2020-08-16 21:35:29 +02:00
parent b1044303cb
commit 6650e3665a
1 changed files with 12 additions and 19 deletions

View File

@ -77,10 +77,6 @@ func (r *Runner) EnumerateSingleDomain(ctx context.Context, domain, output strin
if r.options.RemoveWildcard { if r.options.RemoveWildcard {
resolutionPool.Tasks <- hostEntry resolutionPool.Tasks <- hostEntry
} }
if !r.options.Verbose {
gologger.Silentf("%s\n", subdomain)
}
} }
} }
// Close the task channel only if wildcards are asked to be removed // Close the task channel only if wildcards are asked to be removed
@ -111,11 +107,8 @@ func (r *Runner) EnumerateSingleDomain(ctx context.Context, domain, output strin
outputter := NewOutputter(r.options.JSON) outputter := NewOutputter(r.options.JSON)
// TODO: pasar al Outputter
// If verbose mode was used, then now print all the // If verbose mode was used, then now print all the
// found subdomains on the screen together. // found subdomains on the screen together.
duration := durafmt.Parse(time.Since(now)).LimitFirstN(maxNumCount).String()
if r.options.Verbose {
var err error var err error
if r.options.HostIP { if r.options.HostIP {
err = outputter.WriteHostIP(foundResults, os.Stdout) err = outputter.WriteHostIP(foundResults, os.Stdout)
@ -130,9 +123,9 @@ func (r *Runner) EnumerateSingleDomain(ctx context.Context, domain, output strin
gologger.Errorf("Could not verbose results for %s: %s\n", domain, err) gologger.Errorf("Could not verbose results for %s: %s\n", domain, err)
return err return err
} }
}
// Show found subdomain count in any case. // Show found subdomain count in any case.
duration := durafmt.Parse(time.Since(now)).LimitFirstN(maxNumCount).String()
if r.options.RemoveWildcard { if r.options.RemoveWildcard {
gologger.Infof("Found %d subdomains for %s in %s\n", len(foundResults), domain, duration) gologger.Infof("Found %d subdomains for %s in %s\n", len(foundResults), domain, duration)
} else { } else {