| skipped 115 lines |
116 | 116 | | } |
117 | 117 | | |
118 | 118 | | func runDetail(input string, options core.Options) []string { |
| 119 | + | if options.Scan.Flat { |
| 120 | + | return directDetail(input, options) |
| 121 | + | } |
| 122 | + | if input == "" { |
| 123 | + | return []string{} |
| 124 | + | } |
| 125 | + | if len(strings.Split(input, " - ")) == 1 { |
| 126 | + | return []string{} |
| 127 | + | } |
| 128 | + | |
119 | 129 | | host := strings.Split(input, " - ")[0] |
120 | 130 | | ports := strings.Split(input, " - ")[1] |
121 | 131 | | core.BannerF("Run detail scan on: ", fmt.Sprintf("%v %v", host, ports)) |
| skipped 1 lines |
123 | 133 | | } |
124 | 134 | | |
125 | 135 | | func directDetail(input string, options core.Options) []string { |
| 136 | + | if input == "" { |
| 137 | + | return []string{} |
| 138 | + | } |
| 139 | + | if len(strings.Split(input, ":")) == 1 { |
| 140 | + | return []string{} |
| 141 | + | } |
126 | 142 | | host := strings.Split(input, ":")[0] |
127 | 143 | | ports := strings.Split(input, ":")[1] |
128 | 144 | | core.BannerF("Run detail scan on: ", fmt.Sprintf("%v %v", host, ports)) |
| skipped 49 lines |