diff --git a/client/command/execute.go b/client/command/execute.go index f23e747b1a..c1b590e828 100644 --- a/client/command/execute.go +++ b/client/command/execute.go @@ -18,7 +18,9 @@ package command import ( "context" "fmt" + "strings" + "github.com/bishopfox/sliver/client/spin" "github.com/bishopfox/sliver/protobuf/rpcpb" "github.com/bishopfox/sliver/protobuf/sliverpb" "github.com/desertbit/grumble" @@ -41,12 +43,17 @@ func execute(ctx *grumble.Context, rpc rpcpb.SliverRPCClient) { args = ctx.Args[1:] } output := ctx.Flags.Bool("silent") + ctrl := make(chan bool) + msg := fmt.Sprintf("Executing %s %s...", cmdPath, strings.Join(args, " ")) + go spin.Until(msg, ctrl) exec, err := rpc.Execute(context.Background(), &sliverpb.ExecuteReq{ Request: ActiveSession.Request(ctx), Path: cmdPath, Args: args, Output: !output, }) + ctrl <- true + <-ctrl if err != nil { fmt.Printf(Warn+"%s", err) } else if !output {