2021-12-16 17:08:02 +05:30
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2023-10-17 17:44:13 +05:30
|
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/testutils"
|
2021-12-16 17:08:02 +05:30
|
|
|
)
|
|
|
|
|
|
2023-07-28 18:50:57 +03:00
|
|
|
var whoisTestCases = []TestCaseInfo{
|
2023-08-04 20:21:22 +05:30
|
|
|
{Path: "protocols/whois/basic.yaml", TestCase: &whoisBasic{}},
|
2021-12-16 17:08:02 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
2021-12-17 07:25:46 +01:00
|
|
|
return expectResultsCount(results, 1)
|
2021-12-16 17:08:02 +05:30
|
|
|
}
|