HavocFramework / Havoc

The Havoc Framework.
GNU General Public License v3.0
6.3k stars 905 forks source link

Host Header Configuration #462

Closed d0UBleW closed 4 months ago

d0UBleW commented 4 months ago

Added Listener HTTP HostHeader field to be configurable via profile.

Configuring Host header via Headers field does not work as expected as the gin package parses the Host header to Context.Request.Host instead of Context.Request.Header. The fix is to use existing HTTPConfig.HostHeader field from the listener configuration and compare it to Context.Request.Host.

As for setup using redirector, the HTTP request Host header field could be retrieved from X-Forwarded-Host since it is mentioned to be de-facto standard on mdn web docs