1
1
mirror of https://github.com/OJ/gobuster.git synced 2024-11-15 08:45:21 +01:00

better host header check

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

@ -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
}