Skip to content

Commit

Permalink
added delivery in chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAle98 committed Aug 19, 2022
1 parent 6bb49e4 commit 8bfba5c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions implant/sliver/pivots/pivots.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,18 @@ func (p *NetConnPivot) write(message []byte) error {
}

total := 0
chunk := 1024
for total < len(message) {
n, err = p.conn.Write(message[total:])
if total+chunk <= len(message) {
n, err = p.conn.Write(message[total : total+chunk])
} else {
n, err = p.conn.Write(message[total:])
}
total += n
if err != nil {
// {{if .Config.Debug}}
//
log.Printf("[pivot] Error writing message: %v", err)
// {{end}}
//
return err
}
}
Expand Down

0 comments on commit 8bfba5c

Please sign in to comment.