Added version to user-agent string and prepared for next release

This commit is contained in:
Joona Hoikkala 2018-11-08 16:16:55 +02:00
parent a3c59eeb09
commit d869393b81
No known key found for this signature in database
GPG Key ID: D5AA86BBF9B29A5C
2 changed files with 3 additions and 2 deletions

View File

@ -2,5 +2,5 @@ package ffuf
const ( const (
//VERSION holds the current version number //VERSION holds the current version number
VERSION = "0.1" VERSION = "0.3"
) )

View File

@ -3,6 +3,7 @@ package runner
import ( import (
"bytes" "bytes"
"crypto/tls" "crypto/tls"
"fmt"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"strconv" "strconv"
@ -61,7 +62,7 @@ func (r *SimpleRunner) Execute(req *ffuf.Request) (ffuf.Response, error) {
} }
// Add user agent string if not defined // Add user agent string if not defined
if _, ok := req.Headers["User-Agent"]; !ok { if _, ok := req.Headers["User-Agent"]; !ok {
req.Headers["User-Agent"] = "Fuzz Faster You Fool" req.Headers["User-Agent"] = fmt.Sprintf("%s v%s", "Fuzz Faster U Fool", ffuf.VERSION)
} }
httpreq = httpreq.WithContext(r.config.Context) httpreq = httpreq.WithContext(r.config.Context)
for k, v := range req.Headers { for k, v := range req.Headers {