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

Function RunUncoverAndGetResults

testutils/integration.go:10–38  ·  view source on GitHub ↗
(debug bool, agent string, extra ...string)

Source from the content-addressed store, hash-verified

8)
9
10func RunUncoverAndGetResults(debug bool, agent string, extra ...string) ([]string, error) {
11 cmd := exec.Command("bash", "-c")
12 cmdLine := fmt.Sprintf("%s %s ", "./uncover", agent)
13 cmdLine += strings.Join(extra, " ")
14 cmd.Args = append(cmd.Args, cmdLine)
15 fmt.Println(cmd.Args)
16 if debug {
17 cmd.Args = append(cmd.Args, "-v")
18 cmd.Stderr = os.Stderr
19 fmt.Println(cmd.String())
20 } else {
21 cmd.Args = append(cmd.Args, "-silent")
22 }
23 data, err := cmd.Output()
24 if debug {
25 fmt.Println(string(data))
26 }
27 if err != nil {
28 return nil, err
29 }
30 var parts []string
31 items := strings.Split(string(data), "\n")
32 for _, i := range items {
33 if i != "" {
34 parts = append(parts, i)
35 }
36 }
37 return parts, nil
38}
39
40// TestCase is a single integration test case
41type TestCase interface {

Callers 15

ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92
ExecuteMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…