From 56d143b018897556d819380268106c6437d8e9c3 Mon Sep 17 00:00:00 2001 From: James Golovich Date: Tue, 6 Sep 2022 23:02:20 -0700 Subject: [PATCH] Catch error on 'loot remote' if file doesn't exist --- implant/sliver/handlers/handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/implant/sliver/handlers/handlers.go b/implant/sliver/handlers/handlers.go index 45bbd606a4..5830ff6026 100644 --- a/implant/sliver/handlers/handlers.go +++ b/implant/sliver/handlers/handlers.go @@ -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)