forked from ropnop/kerbrute
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/ropnop/kerbrute/util" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Display version info and quit", | ||
Run: showVersion, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(versionCmd) | ||
} | ||
|
||
func showVersion(cmd *cobra.Command, args []string) { | ||
fmt.Printf("Kerbrute %v\nCommit: %v\nBuilt: %v with %v\n", util.Version, util.GitCommit, util.BuildDate, util.GoVersion) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,11 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/ropnop/kerbrute/cmd" | ||
"github.com/ropnop/kerbrute/util" | ||
) | ||
|
||
var ( | ||
version = "dev" | ||
commit = "none" | ||
date = "unknown" | ||
author = "Ronnie Flathers (@ropnop)" | ||
) | ||
|
||
func banner() { | ||
banner := ` | ||
__ __ __ | ||
/ /_____ _____/ /_ _______ __/ /____ | ||
/ //_/ _ \/ ___/ __ \/ ___/ / / / __/ _ \ | ||
/ ,< / __/ / / /_/ / / / /_/ / /_/ __/ | ||
/_/|_|\___/_/ /_.___/_/ \__,_/\__/\___/ | ||
` | ||
fmt.Printf("%v\nVersion: %v(%v) - %v\t%v\n\n", banner, version, commit, date, author) | ||
} | ||
|
||
func main() { | ||
banner() | ||
util.PrintBanner() | ||
cmd.Execute() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package util | ||
|
||
import "fmt" | ||
|
||
func PrintBanner() { | ||
banner := ` | ||
__ __ __ | ||
/ /_____ _____/ /_ _______ __/ /____ | ||
/ //_/ _ \/ ___/ __ \/ ___/ / / / __/ _ \ | ||
/ ,< / __/ / / /_/ / / / /_/ / /_/ __/ | ||
/_/|_|\___/_/ /_.___/_/ \__,_/\__/\___/ | ||
` | ||
fmt.Printf("%v\nVersion: %v(%v) - %v - %v\n\n", banner, Version, GitCommit, BuildDate, Author) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package util | ||
|
||
var ( | ||
Version = "dev" | ||
GitCommit string | ||
BuildDate string | ||
GoVersion string | ||
Author = "Ronnie Flathers @ropnop" | ||
) |