mirror of
https://github.com/OJ/gobuster.git
synced 2024-09-27 14:00:40 +02:00
60 lines
1.2 KiB
Go
60 lines
1.2 KiB
Go
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"
|
|
)
|
|
|
|
func main() {
|
|
cli.VersionPrinter = func(cCtx *cli.Context) {
|
|
fmt.Printf("gobuster version %s\n", libgobuster.VERSION)
|
|
if info, ok := debug.ReadBuildInfo(); ok {
|
|
fmt.Printf("Build info:\n")
|
|
fmt.Printf("%s", info)
|
|
}
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|