1
1
Fork 0
mirror of https://github.com/OJ/gobuster.git synced 2024-05-24 03:46:03 +02:00

better host header check

This commit is contained in:
firefart 2023-11-19 07:21:32 +01:00
parent 2e94f5c586
commit 73f6226f22

View File

@ -100,7 +100,7 @@ func (d *GobusterFuzz) ProcessWord(ctx context.Context, word string, progress *l
requestOptions.ModifiedHeaders = make([]libgobuster.HTTPHeader, len(d.options.Headers))
for i := range d.options.Headers {
// Host header can't be set via Headers, needs to be a separate field
if d.options.Headers[i].Name == "Host" {
if http.CanonicalHeaderKey(d.options.Headers[i].Name) == "Host" {
requestOptions.Host = strings.ReplaceAll(d.options.Headers[i].Value, FuzzKeyword, word)
continue
}