diff --git a/modules/auxiliary/gather/nuuo_cms_file_download.rb b/modules/auxiliary/gather/nuuo_cms_file_download.rb index 8272727578..4f68127d34 100644 --- a/modules/auxiliary/gather/nuuo_cms_file_download.rb +++ b/modules/auxiliary/gather/nuuo_cms_file_download.rb @@ -82,9 +82,14 @@ password NUCMS2007! to unzip them.") if datastore['FILE'] != nil filedata = nucs_download_file(datastore['FILE']) filename = datastore['FILE'].gsub('..\\', '') - path = store_loot(filename, "application/octet-stream", datastore['RHOST'], - filedata, filename, "File downloaded from Nuuo CMS server") - print_good("Downloaded #{filename} to #{path}") + + if filedata != nil and filedata.length > 0 + path = store_loot(filename, "application/octet-stream", datastore['RHOST'], + filedata, filename, "File downloaded from Nuuo CMS server") + print_good("Downloaded #{filename} to #{path}") + else + print_error("Failed to download \"#{filename}\", are you sure it exists?") + end end end end