From 92781a66d35234073e1bad85c23085c70a2ecbd5 Mon Sep 17 00:00:00 2001 From: lc Date: Sun, 14 Nov 2021 20:57:40 -0600 Subject: [PATCH] fix(gau): change error handling for commoncrawl, bump retry count --- .gau.toml | 2 +- cmd/gau/main.go | 2 +- pkg/providers/providers.go | 2 +- runner/runner.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gau.toml b/.gau.toml index 8b64daa..0b4847d 100644 --- a/.gau.toml +++ b/.gau.toml @@ -1,6 +1,6 @@ threads = 2 verbose = false -retries = 5 +retries = 15 subdomains = false providers = ["gau","commoncrawl","otx","urlscan"] blacklist = ["ttf","woff","svg","png","jpg"] diff --git a/cmd/gau/main.go b/cmd/gau/main.go index 6449076..2344b80 100644 --- a/cmd/gau/main.go +++ b/cmd/gau/main.go @@ -33,7 +33,7 @@ func main() { gau := &runner.Runner{} if err = gau.Init(config, pMap); err != nil { - log.Fatal(err) + log.Warn(err) } results := make(chan string) diff --git a/pkg/providers/providers.go b/pkg/providers/providers.go index bb97826..a2022e5 100644 --- a/pkg/providers/providers.go +++ b/pkg/providers/providers.go @@ -5,7 +5,7 @@ import ( "github.com/valyala/fasthttp" ) -const Version = `2.0.5` +const Version = `2.0.6` // Provider is a generic interface for all archive fetchers type Provider interface { diff --git a/runner/runner.go b/runner/runner.go index 66fe394..d4c88a5 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -40,7 +40,7 @@ func (r *Runner) Init(c *providers.Config, providerMap ProvidersMap) error { case "commoncrawl": cc, err := commoncrawl.New(c, filters) if err != nil { - return fmt.Errorf("error instantiating client: %v\n", err) + return fmt.Errorf("error instantiating commoncrawl: %v\n", err) } r.providers = append(r.providers, cc) } @@ -51,7 +51,7 @@ func (r *Runner) Init(c *providers.Config, providerMap ProvidersMap) error { // Starts starts the worker func (r *Runner) Start(domains chan string, results chan string) { - for i := uint(0); i < r.config.Threads; i++ { // TODO: get thread count dynamically + for i := uint(0); i < r.config.Threads; i++ { r.wg.Add(1) go func() { defer r.wg.Done()