Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage #306

Merged
merged 6 commits into from
Dec 1, 2020
Merged

Stage #306

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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