(c *cli.Context)
| 31 | } |
| 32 | |
| 33 | func run(c *cli.Context) error { |
| 34 | pluginOpts := gobusters3.NewOptions() |
| 35 | |
| 36 | httpOptions, err := internalcli.ParseBasicHTTPOptions(c) |
| 37 | if err != nil { |
| 38 | return err |
| 39 | } |
| 40 | pluginOpts.BasicHTTPOptions = httpOptions |
| 41 | |
| 42 | pluginOpts.MaxFilesToList = c.Int("max-files") |
| 43 | pluginOpts.ShowFiles = c.Bool("show-files") |
| 44 | |
| 45 | globalOpts, err := internalcli.ParseGlobalOptions(c) |
| 46 | if err != nil { |
| 47 | return err |
| 48 | } |
| 49 | |
| 50 | log := libgobuster.NewLogger(globalOpts.Debug) |
| 51 | |
| 52 | plugin, err := gobusters3.New(&globalOpts, pluginOpts, log) |
| 53 | if err != nil { |
| 54 | return fmt.Errorf("error on creating gobusters3: %w", err) |
| 55 | } |
| 56 | |
| 57 | if err := internalcli.Gobuster(c.Context, &globalOpts, plugin, log); err != nil { |
| 58 | log.Debugf("%#v", err) |
| 59 | return fmt.Errorf("error on running gobuster: %w", err) |
| 60 | } |
| 61 | return nil |
| 62 | } |
nothing calls this directly
no test coverage detected