Skip to content

Commit

Permalink
Merge pull request #851 from jamesgol/loot_file
Browse files Browse the repository at this point in the history
Catch error on 'loot remote' if file doesn't exist
  • Loading branch information
moloch-- authored Sep 7, 2022
2 parents 327f7c6 + 56d143b commit 40b99e8
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 40b99e8

Please sign in to comment.