Land #7262, FLUSHALL support for redis/file_upload

bug/bundler_fix
William Vu 2016-08-31 23:45:18 -05:00
commit 8b9661d8e4
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 9 additions and 1 deletions

View File

@ -40,7 +40,8 @@ class MetasploitModule < Msf::Auxiliary
[ [
OptPath.new('LocalFile', [false, 'Local file to be uploaded']), OptPath.new('LocalFile', [false, 'Local file to be uploaded']),
OptString.new('RemoteFile', [false, 'Remote file path']), OptString.new('RemoteFile', [false, 'Remote file path']),
OptBool.new('DISABLE_RDBCOMPRESSION', [true, 'Disable compression when saving if found to be enabled', true]) OptBool.new('DISABLE_RDBCOMPRESSION', [true, 'Disable compression when saving if found to be enabled', true]),
OptBool.new('FLUSHALL', [true, 'Run flushall to remove all redis data before saving', false])
] ]
) )
end end
@ -83,6 +84,13 @@ class MetasploitModule < Msf::Auxiliary
end end
end end
if datastore['FLUSHALL']
data = redis_command('FLUSHALL')
unless data.include?('+OK')
print_warning("#{peer} -- failed to flushall(); continuing")
end
end
# set a key in this db that contains our content # set a key in this db that contains our content
# XXX: this does not work well (at all) if the content we are uploading is # XXX: this does not work well (at all) if the content we are uploading is
# multiline. It also probably doesn't work well if the content isn't # multiline. It also probably doesn't work well if the content isn't