MCPcopy Create free account
hub / github.com/cloudflare/cfssl / runWorker

Method runWorker

cli/scan/scan.go:53–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (ctx *context) runWorker() {
54 for host := range ctx.hosts {
55 fmt.Printf("Scanning %s...\n", host)
56 results, err := scan.Default.RunScans(host, ctx.c.IP, ctx.c.Family, ctx.c.Scanner, ctx.c.Timeout)
57 fmt.Printf("=== %s ===\n", host)
58 if err != nil {
59 log.Error(err)
60 } else {
61 printJSON(results)
62 }
63 }
64 ctx.Done()
65}
66
67func parseCSV(hosts []string, csvFile string, maxHosts int) ([]string, error) {
68 f, err := os.Open(csvFile)

Callers 1

newContextFunction · 0.95

Calls 3

ErrorFunction · 0.92
printJSONFunction · 0.85
RunScansMethod · 0.80

Tested by

no test coverage detected