Skip to content

Commit

Permalink
small updates to the enum subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Feb 1, 2024
1 parent ee8541d commit 0d2d5d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions cmd/amass/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ func runEnumCommand(clArgs []string) {
if finished == 5 {
close(done)
}
} else {
finished = 0
}
}
case message := <-messages:
Expand Down
18 changes: 9 additions & 9 deletions cmd/amass/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 0d2d5d6

Please sign in to comment.