Skip to content

Commit

Permalink
unblock execute command if no output is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicBreuker committed Mar 7, 2023
1 parent dfcbdf7 commit 5ab52bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion implant/sliver/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,12 +607,16 @@ func executeHandler(data []byte, resp RPCResponse) {
}
} else {
err = cmd.Start()
cmd.Wait()
if err != nil {
execResp.Response = &commonpb.Response{
Err: fmt.Sprintf("%s", err),
}
}

go func() {
cmd.Wait()
}()

if cmd.Process != nil {
execResp.Pid = uint32(cmd.Process.Pid)
}
Expand Down

0 comments on commit 5ab52bc

Please sign in to comment.