MCPcopy
hub / github.com/projectdiscovery/uncover / Execute

Method Execute

integration-tests/source-test.go:19–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17type censysTestcases struct{}
18
19func (h censysTestcases) Execute() error {
20 token := os.Getenv("CENSYS_API_KEY")
21 if token == "" {
22 return errors.New("missing censys api key")
23 }
24 censysToken := fmt.Sprintf(`censys: [%s]`, token)
25 _ = os.WriteFile(ConfigFile, []byte(censysToken), 0644)
26 defer func() {
27 _ = os.RemoveAll(ConfigFile)
28 }()
29 results, err := testutils.RunUncoverAndGetResults(debug, "-censys", "'services.software.vendor=Grafana'")
30 if err != nil {
31 return err
32 }
33 return expectResultsGreaterThanCount(results, 0)
34}
35
36type shodanTestcases struct{}
37

Callers

nothing calls this directly

Calls 2

RunUncoverAndGetResultsFunction · 0.92

Tested by

no test coverage detected