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

Method Execute

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

Source from the content-addressed store, hash-verified

82type fofaTestcases struct{}
83
84func (h fofaTestcases) Execute() error {
85 token := os.Getenv("FOFA_API_KEY")
86 if token == "" {
87 return errors.New("missing fofa api key")
88 }
89 fofaToken := fmt.Sprintf(`fofa: [%s]`, token)
90 _ = os.WriteFile(ConfigFile, []byte(fofaToken), 0644)
91 defer func() {
92 _ = os.RemoveAll(ConfigFile)
93 }()
94 results, err := testutils.RunUncoverAndGetResults(debug, "-fofa", "'app=Grafana'")
95 if err != nil {
96 return err
97 }
98 return expectResultsGreaterThanCount(results, 0)
99}
100
101// type hunterTestcases struct{}
102

Callers

nothing calls this directly

Calls 2

RunUncoverAndGetResultsFunction · 0.92

Tested by

no test coverage detected