()
| 51 | } |
| 52 | |
| 53 | func (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 | |
| 67 | func parseCSV(hosts []string, csvFile string, maxHosts int) ([]string, error) { |
| 68 | f, err := os.Open(csvFile) |
no test coverage detected