Sajad 5200bcd94f
Whois Protocol Support (using rdap) (#1354)
* init rdap

* add an integration test, option to supply RDAP server to execute the request on

* add rdap protocolMappings

* add debug info, add IP, ASN query type support

* rename rdap to whois, Host to Query in template

* rename pending rdap to whois

* remove port from whois varaiables

* set Host variable even if input is not a parsable url
2021-12-16 17:08:02 +05:30

24 lines
532 B
Go

package main
import (
"github.com/projectdiscovery/nuclei/v2/pkg/testutils"
)
var whoisTestCases = map[string]testutils.TestCase{
"whois/basic.yaml": &whoisBasic{},
}
type whoisBasic struct{}
// Execute executes a test case and returns an error if occurred
func (h *whoisBasic) Execute(filePath string) error {
results, err := testutils.RunNucleiTemplateAndGetResults(filePath, "https://example.com", debug)
if err != nil {
return err
}
if len(results) != 1 {
return errIncorrectResultsCount(results)
}
return nil
}