Land #7262, FLUSHALL support for redis/file_upload
commit
8b9661d8e4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue