mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 12:45:27 +00:00
22 lines
543 B
Go
22 lines
543 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/testutils"
|
||
|
|
)
|
||
|
|
|
||
|
|
var offlineHttpTestcases = map[string]testutils.TestCase{
|
||
|
|
"offlinehttp/rfc-req-resp.yaml": &RfcRequestResponse{},
|
||
|
|
}
|
||
|
|
|
||
|
|
type RfcRequestResponse struct{}
|
||
|
|
|
||
|
|
// Execute executes a test case and returns an error if occurred
|
||
|
|
func (h *RfcRequestResponse) Execute(filePath string) error {
|
||
|
|
results, err := testutils.RunNucleiTemplateAndGetResults(filePath, "offlinehttp/data/", debug, "-passive")
|
||
|
|
if err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
return expectResultsCount(results, 1)
|
||
|
|
}
|