Skip to content

Commit

Permalink
Merge pull request #1568 from BishopFox/fix/download
Browse files Browse the repository at this point in the history
Fix download RPC
  • Loading branch information
rkervella authored Jan 24, 2024
2 parents 0a31daf + 12d6c13 commit d0dc42e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions implant/sliver/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,11 @@ func prepareDownload(path string, filter string, recurse bool, maxBytes int64, m

fileInfo, err := os.Stat(path + filter)

if err != nil && os.IsNotExist(err) {
// Then the file does not exist
return nil, false, 0, 1, err
}

if err == nil && !fileInfo.IsDir() {
// Then this is a single file
fileHandle, err := os.Open(path + filter)
Expand Down

0 comments on commit d0dc42e

Please sign in to comment.