Skip to content

Commit

Permalink
Deserialize to the proper message, and don't reuse message in respons…
Browse files Browse the repository at this point in the history
…e. Fixes Screenshot not working. #610
  • Loading branch information
rkervella committed Feb 23, 2022
1 parent ee7d36d commit 2b286ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions implant/sliver/handlers/rpc-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func ifconfig() *sliverpb.Ifconfig {
}

func screenshotHandler(data []byte, resp RPCResponse) {
sc := &sliverpb.Screenshot{}
sc := &sliverpb.ScreenshotReq{}
err := proto.Unmarshal(data, sc)
if err != nil {
// {{if .Config.Debug}}
Expand All @@ -185,9 +185,9 @@ func screenshotHandler(data []byte, resp RPCResponse) {
// {{if .Config.Debug}}
log.Printf("Screenshot Request")
// {{end}}

sc.Data = screen.Screenshot()
data, err = proto.Marshal(sc)
scRes := &sliverpb.Screenshot{}
scRes.Data = screen.Screenshot()
data, err = proto.Marshal(scRes)

resp(data, err)
}
Expand Down

0 comments on commit 2b286ae

Please sign in to comment.