mirror of https://github.com/daffainfo/nuclei.git
Misc
parent
bfaea5b89d
commit
09a2d88364
|
@ -209,10 +209,10 @@ func generateDNSVariables(domain string) map[string]interface{} {
|
|||
|
||||
domainName := strings.Join([]string{parsed.SLD, parsed.TLD}, ".")
|
||||
return map[string]interface{}{
|
||||
"{{FQDN}}": domain,
|
||||
"{{RDN}}": domainName,
|
||||
"{{DN}}": parsed.SLD,
|
||||
"{{TLD}}": parsed.TLD,
|
||||
"{{SD}}": parsed.TRD,
|
||||
"FQDN": domain,
|
||||
"RDN": domainName,
|
||||
"DN": parsed.SLD,
|
||||
"TLD": parsed.TLD,
|
||||
"SD": parsed.TRD,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ import (
|
|||
func TestGenerateDNSVariables(t *testing.T) {
|
||||
vars := generateDNSVariables("www.projectdiscovery.io")
|
||||
require.Equal(t, map[string]interface{}{
|
||||
"{{FQDN}}": "www.projectdiscovery.io",
|
||||
"{{RDN}}": "projectdiscovery.io",
|
||||
"{{DN}}": "projectdiscovery",
|
||||
"{{TLD}}": "io",
|
||||
"{{SD}}": "www",
|
||||
"FQDN": "www.projectdiscovery.io",
|
||||
"RDN": "projectdiscovery.io",
|
||||
"DN": "projectdiscovery",
|
||||
"TLD": "io",
|
||||
"SD": "www",
|
||||
}, vars, "could not get dns variables")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue