Check if we actually downloaded a file

GSoC/Meterpreter_Web_Console
Pedro Ribeiro 2019-01-30 21:56:11 +07:00 committed by GitHub
parent bb9f50c771
commit a0f63629b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -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