Skip to content

Commit

Permalink
Merge branch 'master' into debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rkervella committed Dec 1, 2020
2 parents 85c8b0f + 7bbe516 commit f91aaa6
Show file tree
Hide file tree
Showing 7 changed files with 347 additions and 26 deletions.
33 changes: 16 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ GO ?= go
ENV = CGO_ENABLED=1
TAGS = -tags osusergo,netgo,sqlite_omit_load_extension

#
# Version Information
#
VERSION = 1.1.2
COMPILED_AT = $(shell date +%s)
RELEASES_URL = https://api.github.com/repos/BishopFox/sliver/releases
PKG = github.com/bishopfox/sliver/client/version
GIT_DIRTY = $(shell git diff --quiet|| echo 'Dirty')
GIT_COMMIT = $(shell git rev-parse HEAD)
LDFLAGS = -ldflags "-s -w \
-X $(PKG).Version=$(VERSION) \
-X $(PKG).CompiledAt=$(COMPILED_AT) \
-X $(PKG).GithubReleasesURL=$(RELEASES_URL) \
-X $(PKG).GitCommit=$(GIT_COMMIT) \
-X $(PKG).GitDirty=$(GIT_DIRTY)"


#
# Prerequisites
Expand Down Expand Up @@ -59,23 +75,6 @@ endif
endif
# *** End Linux ***

#
# Version Information
#
VERSION = 1.1.2
COMPILED_AT = $(shell date +%s)
RELEASES_URL = https://api.github.com/repos/BishopFox/sliver/releases
PKG = github.com/bishopfox/sliver/client/version
GIT_DIRTY = $(shell git diff --quiet|| echo 'Dirty')
GIT_COMMIT = $(shell git rev-parse HEAD)
LDFLAGS = -ldflags "-s -w \
-X $(PKG).Version=$(VERSION) \
-X $(PKG).CompiledAt=$(COMPILED_AT) \
-X $(PKG).GithubReleasesURL=$(RELEASES_URL) \
-X $(PKG).GitCommit=$(GIT_COMMIT) \
-X $(PKG).GitDirty=$(GIT_DIRTY)"


#
# Targets
#
Expand Down
14 changes: 14 additions & 0 deletions client/command/bind-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (

consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/help"
"github.com/bishopfox/sliver/client/licenses"
"github.com/bishopfox/sliver/protobuf/rpcpb"

"github.com/desertbit/grumble"
Expand Down Expand Up @@ -1283,4 +1284,17 @@ func BindCommands(app *grumble.App, rpc rpcpb.SliverRPCClient) {
},
HelpGroup: consts.GenericHelpGroup,
})

app.AddCommand(&grumble.Command{
Name: consts.LicensesStr,
Help: "Open source licenses",
LongHelp: help.GetHelpFor(consts.LicensesStr),
Run: func(ctx *grumble.Context) error {
fmt.Println()
fmt.Println(licenses.All)
fmt.Println()
return nil
},
HelpGroup: consts.GenericHelpGroup,
})
}
24 changes: 16 additions & 8 deletions client/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,33 @@ const (

EventStr = "event"

ServerErrorStr = "server"
ServerErrorStr = "server-error"

// ConnectedEvent - Sliver Connected
SessionOpenedEvent = "connected"
SessionOpenedEvent = "session-connected"
// DisconnectedEvent - Sliver disconnected
SessionClosedEvent = "disconnected"
SessionClosedEvent = "session-disconnected"
// UpdateEvent - Sliver updated
SessionUpdateEvent = "updated"
SessionUpdateEvent = "session-updated"

// JoinedEvent - Player joined the game
JoinedEvent = "joined"
JoinedEvent = "client-joined"
// LeftEvent - Player left the game
LeftEvent = "left"
LeftEvent = "client-left"

// CanaryEvent - A DNS canary was triggered
CanaryEvent = "canary"

// StartedEvent - Job was started
JobStartedEvent = "started"
JobStartedEvent = "job-started"
// StoppedEvent - Job was stopped
JobStoppedEvent = "stopped"
JobStoppedEvent = "job-stopped"

// BuildCompletedEvent - Fires when a build completes
BuildCompletedEvent = "build-completed"

// ProfileEvent - Fires whenever there's a change to profiles
ProfileEvent = "profile"
)

// Commands
Expand Down Expand Up @@ -132,6 +138,8 @@ const (
BackdoorStr = "backdoor"
MakeTokenStr = "make-token"
GetEnvStr = "getenv"

LicensesStr = "licenses"
)

// Groups
Expand Down
5 changes: 5 additions & 0 deletions client/licenses/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Licenses
=========

Copies of OSS licenses to be included in binary distributions.

Loading

0 comments on commit f91aaa6

Please sign in to comment.