Check for threads & switch info log to warn

This commit is contained in:
perp 2024-07-09 17:29:22 +01:00
parent 8a667a9065
commit 4028682b9d

View File

@ -47,6 +47,11 @@ var rootCmd = &cobra.Command{
zerolog.SetGlobalLevel(zerolog.InfoLevel) zerolog.SetGlobalLevel(zerolog.InfoLevel)
} }
// No threads found
if opts.Threads == 0 {
opts.Threads = 1
}
// Set domains // Set domains
opts.Domains = args opts.Domains = args
@ -150,8 +155,7 @@ var rootCmd = &cobra.Command{
// Check wildcard // Check wildcard
found := run.Wildcard(domain) found := run.Wildcard(domain)
// Print detection log.Warn().
log.Info().
Str("domain", domain). Str("domain", domain).
Str("detected", strconv.FormatBool(found)). Str("detected", strconv.FormatBool(found)).
Msg("Wildcard detection") Msg("Wildcard detection")
@ -163,7 +167,6 @@ var rootCmd = &cobra.Command{
// Go through domains // Go through domains
for domain, count := range domains { for domain, count := range domains {
// Print count
log.Info().Str("subdomains", fmt.Sprintf("%d", count)).Msg(domain) log.Info().Str("subdomains", fmt.Sprintf("%d", count)).Msg(domain)
} }
}, },