If saving fails, print_error and mention permissions

bug/bundler_fix
Jon Hart 2015-12-14 10:47:05 -08:00
parent 19acd366d6
commit e448bc3e27
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 6 additions and 2 deletions

View File

@ -76,8 +76,12 @@ class Metasploit3 < Msf::Auxiliary
data = redis_command('SET', key, content)
return unless data.include?('+OK')
data = redis_command('SAVE')
return unless data.include?('+OK')
print_good("#{peer} -- saved #{content.size} bytes inside of redis DB at #{path}")
if data.include?('+OK')
print_good("#{peer} -- saved #{content.size} bytes inside of redis DB at #{path}")
else
print_error("#{peer} -- failed to save #{content.size} bytes to #{path} (permissions?)")
return
end
# cleanup
# XXX: ensure that these get sent if we prematurely return if a previous command fails