Skip to content

Commit

Permalink
Change OTX to use the domain API
Browse files Browse the repository at this point in the history
  • Loading branch information
lc committed Oct 15, 2020
1 parent 3c0eb59 commit 5caa956
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion providers/otx.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package providers
import (
"encoding/json"
"fmt"
"strings"
)

type OTXProvider struct {
Expand Down Expand Up @@ -51,7 +52,13 @@ func (o *OTXProvider) Fetch(domain string, results chan<- string) error {
_ = resp.Body.Close()

for _, entry := range result.URLList {
results <- entry.URL
if o.IncludeSubdomains {
results <- entry.URL
} else {
if strings.EqualFold(domain, entry.Hostname) {
results <- entry.URL
}
}
}

if !result.HasNext {
Expand Down
2 changes: 1 addition & 1 deletion providers/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

const (
// Version of gau
Version = `1.0.6`
Version = `1.0.7`
// UserAgent for the HTTP Client
userAgent = "Mozilla/5.0 (compatible; gau/" + Version + "; https://github.com/lc/gau)"
)
Expand Down

0 comments on commit 5caa956

Please sign in to comment.