Skip to content

Commit

Permalink
bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
lc committed Oct 15, 2020
1 parent 0490240 commit 50a22b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"bufio"
"crypto/tls"
"flag"
"fmt"
"io"
Expand All @@ -13,8 +14,7 @@ import (
"strings"
"sync"
"time"
"crypto/tls"


"github.com/lc/gau/output"
"github.com/lc/gau/providers"
)
Expand Down Expand Up @@ -98,7 +98,7 @@ func main() {
maxRetries := flag.Uint("retries", 5, "amount of retries for http client")
useProviders := flag.String("providers", "wayback,otx,commoncrawl", "providers to fetch urls for")
version := flag.Bool("version", false, "show gau version")
proxy := flag.String("p", "", "use proxy")
proxy := flag.String("p", "", "HTTP proxy to use")
output := flag.String("o", "", "filename to write results to")
jsonOut := flag.Bool("json", false, "write output as json")
randomAgent := flag.Bool("random-agent", false, "use random user-agent")
Expand All @@ -117,7 +117,7 @@ func main() {
domains = append(domains, s.Text())
}
}

tr := &http.Transport{
DialContext: (&net.Dialer{
Timeout: 5 * time.Second,
Expand All @@ -134,13 +134,13 @@ func main() {

config := providers.Config{
Verbose: *verbose,
RandomAgent: *randomAgent,
RandomAgent: *randomAgent,
MaxRetries: *maxRetries,
IncludeSubdomains: *includeSubs,
Output: *output,
JSON: *jsonOut,
Client: &http.Client{
Timeout: time.Second * 15,
Timeout: time.Second * 15,
Transport: tr,
},
Providers: strings.Split(*useProviders, ","),
Expand Down
8 changes: 4 additions & 4 deletions providers/provider.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package providers

import (
"net/http"
"math/rand"
"net/http"
"time"
)

const (
// Version of gau
Version = `1.0.5`
Version = `1.0.6`
// UserAgent for the HTTP Client
userAgent = "Mozilla/5.0 (compatible; gau/" + Version + "; https://github.com/lc/gau)"
)
Expand Down Expand Up @@ -58,13 +58,13 @@ func (c *Config) MakeRequest(url string) (resp *http.Response, err error) {
if err != nil {
return nil, err
}

if c.RandomAgent {
req.Header.Set("User-Agent", getUserAgent())
} else {
req.Header.Add("User-Agent", userAgent)
}

resp, err = c.Client.Do(req)
if err != nil {
if retries == 0 {
Expand Down

0 comments on commit 50a22b9

Please sign in to comment.