diff --git a/cmd/root.go b/cmd/root.go index 63a1746..1d35d95 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,6 +5,7 @@ import ( "github.com/spf13/cobra" "os" + version "github.com/hahwul/mzap/pkg/version" zap "github.com/hahwul/mzap/pkg/zap" homedir "github.com/mitchellh/go-homedir" "github.com/spf13/viper" @@ -16,7 +17,6 @@ var options zap.OptionsZAP // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "mzap", - Short: "Multiple target/agent ZAP scanning", } // Execute adds all child commands to the root command and sets flags appropriately. @@ -29,6 +29,7 @@ func Execute() { } func init() { + version.Banner() cobra.OnInitialize(initConfig) // Here you will define your flags and configuration settings. diff --git a/pkg/version/banner.go b/pkg/version/banner.go new file mode 100644 index 0000000..a399257 --- /dev/null +++ b/pkg/version/banner.go @@ -0,0 +1,19 @@ +package version + +import ( + "fmt" + "os" +) + +func Banner(){ + fmt.Fprintln(os.Stderr," ,/") + fmt.Fprintln(os.Stderr," ,'/") + fmt.Fprintln(os.Stderr," ,' /") + fmt.Fprintln(os.Stderr," ,' /_____,") + fmt.Fprintln(os.Stderr," .'____ ,' MZAP") + fmt.Fprintln(os.Stderr," / ,' [ Multiple target/agent ZAP scanning ]") + fmt.Fprintln(os.Stderr," / ,' [ "+VERSION+" ] [ by @hahwul ]") + fmt.Fprintln(os.Stderr," /,'") + fmt.Fprintln(os.Stderr," /'") + fmt.Fprintln(os.Stderr,"") +}