Skip to content

Commit 7bd549a

Browse files
author
Vex Woo
committed
Merge pull request #6 from jhart-r7/pr/fixup-6416
Fixup redis_server PR 6416
2 parents 9714923 + eef1544 commit 7bd549a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/auxiliary/scanner/redis/redis_server.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ def initialize(info = {})
2828
end
2929

3030
def run_host(_ip)
31-
print_status("Scanning IP: #{peer}")
31+
vprint_status("Scanning IP: #{peer}")
3232
begin
3333
connect
3434
data = redis_command('PING')
35-
report_service(:host => rhost,
36-
:port => rport,
37-
:name => "redis server",
38-
:info => data)
39-
rescue ::Exception => e
40-
print_error("Unable to connect: #{e}")
35+
report_service(host: rhost, port: rport, name: "redis server", info: data)
36+
print_good("#{peer} -- found redis")
37+
rescue Rex::AddressInUse, Rex::HostUnreachable, Rex::ConnectionTimeout,
38+
Rex::ConnectionRefused, ::Timeout::Error, ::EOFError, ::Errno::ETIMEDOUT => e
39+
vprint_error("Unable to connect: #{e}")
4140
ensure
4241
disconnect
4342
end

0 commit comments

Comments
 (0)