Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gau): change error handling for commoncrawl, bump retry count #54

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gau.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion cmd/gau/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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()
Expand Down