nuclei/v2/cmd/integration-test/offline-http.go
Mzack9999 1c332bb85b
Improving RFC request/response passive parsing (#2192)
* Improving RFC request/response passive parsing

* adding test
2022-07-11 22:43:10 +05:30

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)
}