|
5 | 5 | "os"
|
6 | 6 | "path"
|
7 | 7 | "sort"
|
| 8 | + "strings" |
8 | 9 |
|
9 | 10 | "github.com/fatih/color"
|
10 | 11 | "github.com/j3ssie/osmedeus/core"
|
@@ -155,22 +156,26 @@ func generalCheck() error {
|
155 | 156 |
|
156 | 157 | // check core programs
|
157 | 158 | var err error
|
158 |
| - // if _, err = utils.RunCommandWithErr("jaeles -h"); err != nil { |
159 |
| - // color.Red("[-] Core program setup incorrectly") |
160 |
| - // return fmt.Errorf("error checking core programs: %v", "jaeles") |
161 |
| - // } |
| 159 | + var errorBinary []string |
162 | 160 | if _, err = utils.RunCommandWithErr("timeout --help"); err != nil {
|
163 |
| - color.Red("[-] Core program setup incorrectly") |
164 |
| - return fmt.Errorf("error checking core programs: %v", "timeout") |
| 161 | + errorBinary = append(errorBinary, "timeout") |
165 | 162 | }
|
166 | 163 | if _, err = utils.RunCommandWithErr("amass -h"); err != nil {
|
167 |
| - color.Red("[-] Core program setup incorrectly") |
168 |
| - return fmt.Errorf("error checking core programs: %v", "amass") |
| 164 | + errorBinary = append(errorBinary, "amass") |
| 165 | + } |
| 166 | + if _, err = utils.RunCommandWithErr(fmt.Sprintf("%s -h", path.Join(options.Env.BinariesFolder, "subfinder"))); err != nil { |
| 167 | + errorBinary = append(errorBinary, "subfinder") |
169 | 168 | }
|
170 |
| - _, err = utils.RunCommandWithErr(fmt.Sprintf("%s -h", path.Join(options.Env.BinariesFolder, "httprobe"))) |
171 |
| - if err != nil { |
| 169 | + if _, err = utils.RunCommandWithErr(fmt.Sprintf("%s -h", path.Join(options.Env.BinariesFolder, "httprobe"))); err != nil { |
| 170 | + errorBinary = append(errorBinary, "httprobe") |
| 171 | + } |
| 172 | + if _, err = utils.RunCommandWithErr(fmt.Sprintf("%s -h", path.Join(options.Env.BinariesFolder, "nuclei"))); err != nil { |
| 173 | + errorBinary = append(errorBinary, "nuclei") |
| 174 | + } |
| 175 | + |
| 176 | + if len(errorBinary) > 0 { |
172 | 177 | color.Red("[-] Core program setup incorrectly")
|
173 |
| - return fmt.Errorf("error checking core programs: %v", fmt.Sprintf("%s -h", path.Join(options.Env.BinariesFolder, "httprobe"))) |
| 178 | + return fmt.Errorf("error checking core programs: %v", color.HiCyanString(strings.Join(errorBinary, ", "))) |
174 | 179 | }
|
175 | 180 | fmt.Printf("[+] Health Check Core Programs: %s\n", color.GreenString("✔"))
|
176 | 181 |
|
@@ -237,7 +242,7 @@ func listFlows() error {
|
237 | 242 | table.SetHeader([]string{"Flow Name", "Description"})
|
238 | 243 | table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
|
239 | 244 | table.SetColWidth(120)
|
240 |
| - table.AppendBulk(content) // Add Bulk Data |
| 245 | + table.AppendBulk(content) |
241 | 246 | table.Render()
|
242 | 247 |
|
243 | 248 | h := color.HiCyanString("\nUsage:\n")
|
@@ -273,7 +278,7 @@ func listDefaultModules() error {
|
273 | 278 | table.SetHeader([]string{"Module Name", "Description"})
|
274 | 279 | table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
|
275 | 280 | table.SetColWidth(120)
|
276 |
| - table.AppendBulk(content) // Add Bulk Data |
| 281 | + table.AppendBulk(content) |
277 | 282 | table.Render()
|
278 | 283 |
|
279 | 284 | h := color.HiCyanString("\nModule Usage:\n")
|
|
0 commit comments