Skip to content

Commit

Permalink
Merge pull request #1634 from C-Sto/bugfix-execwindows
Browse files Browse the repository at this point in the history
check session mode correctly in windows exec
  • Loading branch information
rkervella authored Apr 22, 2024
2 parents 5e992e0 + a3c353b commit 6a30b8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/command/exec/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func ExecuteCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Executing %s %s ...", cmdPath, strings.Join(args, " ")), ctrl)
if token || hidden || ppid != 0 {
if session.OS != "windows" {
if (session != nil && session.OS != "windows") || (beacon != nil && beacon.OS != "windows") {
con.PrintErrorf("The token, hide window, and ppid options are not valid on %s\n", session.OS)
return
}
Expand Down

0 comments on commit 6a30b8a

Please sign in to comment.