mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:45:27 +00:00
* 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
24 lines
532 B
Go
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
|
|
}
|