1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
package main
import (
"fmt"
"log"
"os"
"runtime/debug"
"github.com/OJ/gobuster/v3/cli/dir"
"github.com/OJ/gobuster/v3/cli/dns"
"github.com/OJ/gobuster/v3/cli/fuzz"
"github.com/OJ/gobuster/v3/cli/gcs"
"github.com/OJ/gobuster/v3/cli/s3"
"github.com/OJ/gobuster/v3/cli/tftp"
"github.com/OJ/gobuster/v3/cli/vhost"
"github.com/OJ/gobuster/v3/libgobuster"
"github.com/urfave/cli/v2"
"go.uber.org/automaxprocs/maxprocs"
)
func main() {
if _, err := maxprocs.Set(); err != nil {
fmt.Printf("Error on gomaxprocs: %v\n", err) // nolint forbidigo
}
cli.VersionPrinter = func(_ *cli.Context) {
fmt.Printf("gobuster version %s\n", libgobuster.VERSION) // nolint:forbidigo
if info, ok := debug.ReadBuildInfo(); ok {
fmt.Printf("Build info:\n") // nolint forbidigo
fmt.Printf("%s", info) // nolint forbidigo
}
}
app := &cli.App{
Name: "gobuster",
Usage: "the tool you love",
UsageText: "gobuster command [command options]",
Authors: []*cli.Author{
{
Name: "Christian Mehlmauer (@firefart)",
},
{
Name: "OJ Reeves (@TheColonial)",
},
},
Version: libgobuster.GetVersion(),
Commands: []*cli.Command{
dir.Command(),
vhost.Command(),
dns.Command(),
fuzz.Command(),
tftp.Command(),
s3.Command(),
gcs.Command(),
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
|