We always put results with format even if no verbose option is set
parent
b1044303cb
commit
6650e3665a
|
@ -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,28 +107,25 @@ 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()
|
var err error
|
||||||
if r.options.Verbose {
|
if r.options.HostIP {
|
||||||
var err error
|
err = outputter.WriteHostIP(foundResults, os.Stdout)
|
||||||
if r.options.HostIP {
|
} else {
|
||||||
err = outputter.WriteHostIP(foundResults, os.Stdout)
|
if r.options.RemoveWildcard {
|
||||||
|
err = outputter.WriteHostNoWildcard(foundResults, os.Stdout)
|
||||||
} else {
|
} else {
|
||||||
if r.options.RemoveWildcard {
|
err = outputter.WriteHost(uniqueMap, os.Stdout)
|
||||||
err = outputter.WriteHostNoWildcard(foundResults, os.Stdout)
|
|
||||||
} else {
|
|
||||||
err = outputter.WriteHost(uniqueMap, os.Stdout)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
gologger.Errorf("Could not verbose results for %s: %s\n", domain, err)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
gologger.Errorf("Could not verbose results for %s: %s\n", domain, 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 {
|
||||||
|
|
Loading…
Reference in New Issue