Merge pull request #6 from jhart-r7/pr/fixup-6416

Fixup redis_server PR 6416
This commit is contained in:
Vex Woo
2016-01-06 01:36:55 +08:00
@@ -28,16 +28,15 @@ class Metasploit3 < Msf::Auxiliary
end
def run_host(_ip)
print_status("Scanning IP: #{peer}")
vprint_status("Scanning IP: #{peer}")
begin
connect
data = redis_command('PING')
report_service(:host => rhost,
:port => rport,
:name => "redis server",
:info => data)
rescue ::Exception => e
print_error("Unable to connect: #{e}")
report_service(host: rhost, port: rport, name: "redis server", info: data)
print_good("#{peer} -- found redis")
rescue Rex::AddressInUse, Rex::HostUnreachable, Rex::ConnectionTimeout,
Rex::ConnectionRefused, ::Timeout::Error, ::EOFError, ::Errno::ETIMEDOUT => e
vprint_error("Unable to connect: #{e}")
ensure
disconnect
end