Skip to content

Commit

Permalink
Add version information.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Oct 25, 2018
1 parent d505d00 commit 948136f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# ref: https://vic.demuzere.be/articles/golang-makefile-crosscompile/
LD_FLAGS := -s -w
BIN_DIR := build
BIN_NAME := godoh

K := $(shell openssl rand -hex 16)
V := $(shell git rev-parse --short HEAD)
LD_FLAGS := -s -w -X=github.com/sensepost/godoh/cmd.Version=$(V)

default: keywarn clean darwin linux windows pack integrity

Expand Down
7 changes: 6 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
"github.com/spf13/cobra"
)

// Version is the version of godoh
var Version string

var dnsDomain string
var dnsProviderName string
var dnsProvider dnsclient.Client
Expand All @@ -22,7 +25,9 @@ var dnsProvider dnsclient.Client
var rootCmd = &cobra.Command{
Use: "godoh",
Short: "A DNS (over-HTTPS) C2",
Long: `A DNS (over-HTTPS) C2 by @leonjza from @sensepost`,
Long: `A DNS (over-HTTPS) C2
Version: ` + Version + `
By @leonjza from @sensepost`,
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down

0 comments on commit 948136f

Please sign in to comment.