mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-09-11 17:46:08 +03:00
adding support for unsafe host header
This commit is contained in:
parent
671837eb38
commit
5787fbd949
@ -23,6 +23,7 @@ import (
|
||||
"github.com/projectdiscovery/httpx/common/slice"
|
||||
"github.com/projectdiscovery/httpx/common/stringz"
|
||||
"github.com/projectdiscovery/mapcidr"
|
||||
"github.com/projectdiscovery/rawhttp"
|
||||
"github.com/remeh/sizedwaitgroup"
|
||||
)
|
||||
|
||||
@ -78,6 +79,14 @@ func main() {
|
||||
options.rawRequest = string(rawRequest)
|
||||
}
|
||||
|
||||
// disable automatic host header for rawhttp if manually specified
|
||||
if options.Unsafe {
|
||||
_, ok := httpxOptions.CustomHeaders["Host"]
|
||||
if ok {
|
||||
rawhttp.AutomaticHostHeader(false)
|
||||
}
|
||||
}
|
||||
|
||||
scanopts.Method = options.Method
|
||||
protocol := "https"
|
||||
scanopts.VHost = options.VHost
|
||||
|
Loading…
Reference in New Issue
Block a user