-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNAME not displayed with -ports flag #604
Comments
The difference comes from the following snippet: + gologger.Info().Msgf("[-] About to get DNS data of domain=%s", domain)
ips, cnames, err := getDNSData(hp, domain)
if err != nil {
ips = append(ips, ip)
}
+ gologger.Info().Msgf("[-] IPs=%#+v, cnames=%#+v, err=%v", ips, cnames, err) $ echo "www.dnsimple.com" | httpx -cname -ports 80,443
[INF] [-] About to get DNS data of domain=https://www.dnsimple.com:443
[INF] [-] About to get DNS data of domain=https://www.dnsimple.com:80
[INF] [-] IPs=[]string{}, cnames=[]string(nil), err=<nil>
http://www.dnsimple.com
[INF] [-] IPs=[]string{}, cnames=[]string(nil), err=<nil>
https://www.dnsimple.com
...
$ echo "www.dnsimple.com" | httpx -cname
[INF] [-] About to get DNS data of domain=www.dnsimple.com
[INF] [-] IPs=[]string{"104.245.210.170"}, cnames=[]string{"dnsimple.com"}, err=<nil>
https://www.dnsimple.com [dnsimple.com] The difference between valid and empty results comes from the argument with which fastdialer's GetDNSData method is being called. The hostnames I used below are the ones httpx passes to it as you can see in the above debug logs I added to httpx. Here is a minimal reproducer: $ go run ./cmd/fastdialer/main.go
[] []
[104.245.210.170] [] package main
import (
"fmt"
"github.com/projectdiscovery/fastdialer/fastdialer"
)
func main() {
fd, err := fastdialer.NewDialer(fastdialer.DefaultOptions)
if err != nil {
panic(err)
}
data, err := fd.GetDNSData("https://www.dnsimple.com:443")
if err != nil {
panic(err)
}
fmt.Println(data.A, data.AAAA)
data, err = fd.GetDNSData("www.dnsimple.com")
if err != nil {
panic(err)
}
fmt.Println(data.A, data.AAAA)
} |
Hi @Mzack9999 @ehsandeep - based on the above, is fastdialer's If we go with the last one, which is the one that sounds right to me, the fix goes in httpx by cleaning up the hostname before passing it to fastdialer. Thanks! |
HTTPX Version : v1.2.1
Hi,
When the
-ports
option is used with-cname
it is not displayed anymoreCurrent Behavior:
Expected Behavior:
That the cname is also displayed with the
-ports
optionSteps To Reproduce:
Regards
The text was updated successfully, but these errors were encountered: