Skip to content

Commit

Permalink
Catch error on 'loot remote' if file doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgol committed Sep 7, 2022
1 parent 327f7c6 commit 56d143b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions implant/sliver/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ func prepareDownload(path string, filter string, recurse bool) ([]byte, bool, in
to download a single file
*/
fileInfo, err := os.Stat(path + filter)
if err != nil {
return nil, false, 0, 1, err
}
if err == nil && !fileInfo.IsDir() {
// Then this is a single file
rawData, err := os.ReadFile(path + filter)
Expand Down

0 comments on commit 56d143b

Please sign in to comment.