From 0d2d5d69a32c2010c15e6d971d512850cbd39a36 Mon Sep 17 00:00:00 2001 From: Jeff Foley Date: Thu, 1 Feb 2024 13:36:21 -0500 Subject: [PATCH] small updates to the enum subcommand --- cmd/amass/enum.go | 2 ++ cmd/amass/main.go | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd/amass/enum.go b/cmd/amass/enum.go index 088b7dd21..7888eea05 100644 --- a/cmd/amass/enum.go +++ b/cmd/amass/enum.go @@ -208,6 +208,8 @@ func runEnumCommand(clArgs []string) { if finished == 5 { close(done) } + } else { + finished = 0 } } case message := <-messages: diff --git a/cmd/amass/main.go b/cmd/amass/main.go index ff172f5d7..55ccb49e6 100644 --- a/cmd/amass/main.go +++ b/cmd/amass/main.go @@ -160,17 +160,17 @@ func getWordList(reader io.Reader) ([]string, error) { } func createSession(ustr string, c *client.Client, cfg *config.Config) (uuid.UUID, error) { - if token, err := c.CreateSession(cfg); err == nil { - return token, err - } - - if u, err := url.Parse(ustr); err == nil { - if host := u.Hostname(); host == "localhost" || host == "127.0.0.1" { - _ = launch.LaunchEngine() - time.Sleep(30 * time.Second) + for i := 0; i < 10; i++ { + if token, err := c.CreateSession(cfg); err == nil { + return token, err } + if u, err := url.Parse(ustr); err == nil && i == 0 { + if host := u.Hostname(); host == "localhost" || host == "127.0.0.1" { + _ = launch.LaunchEngine() + } + } + time.Sleep(30 * time.Second) } - return c.CreateSession(cfg) }