mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
fix: host JSON field now returns hostname instead of IP (#2333)
- Changed 'host' field to return actual hostname (e.g., example.com) - Added new 'host_ip' field for the resolved/dialed IP address - Fixes semantic issue where 'host' was incorrectly returning IP
This commit is contained in:
+2
-1
@@ -2330,7 +2330,8 @@ retry:
|
||||
Pipeline: pipeline,
|
||||
HTTP2: http2,
|
||||
Method: method,
|
||||
Host: ip,
|
||||
Host: parsed.Hostname(),
|
||||
HostIP: ip,
|
||||
A: ips4,
|
||||
AAAA: ips6,
|
||||
CNAMEs: cnames,
|
||||
|
||||
@@ -59,6 +59,7 @@ type Result struct {
|
||||
ContentType string `json:"content_type,omitempty" csv:"content_type" mapstructure:"content_type"`
|
||||
Method string `json:"method,omitempty" csv:"method" mapstructure:"method"`
|
||||
Host string `json:"host,omitempty" csv:"host" mapstructure:"host"`
|
||||
HostIP string `json:"host_ip,omitempty" csv:"host_ip" mapstructure:"host_ip"`
|
||||
Path string `json:"path,omitempty" csv:"path" mapstructure:"path"`
|
||||
FavIconMMH3 string `json:"favicon,omitempty" csv:"favicon" mapstructure:"favicon"`
|
||||
FavIconMD5 string `json:"favicon_md5,omitempty" csv:"favicon_md5" mapstructure:"favicon_md5"`
|
||||
|
||||
Reference in New Issue
Block a user