MCPcopy
hub / github.com/OJ/gobuster / run

Function run

cli/s3/s3.go:33–62  ·  view source on GitHub ↗
(c *cli.Context)

Source from the content-addressed store, hash-verified

31}
32
33func 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}

Callers

nothing calls this directly

Calls 5

DebugfMethod · 0.95
NewOptionsFunction · 0.92
NewLoggerFunction · 0.92
NewFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected