Skip to content

Commit 7a16f28

Browse files
committed
2 parents 3dd7fdf + b95d579 commit 7a16f28

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

modules/auxiliary/scanner/imap/imap_version.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ def initialize
2222

2323
def run_host(ip)
2424
begin
25-
res = connect
25+
connect
2626
banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
2727
print_status("#{ip}:#{rport} IMAP #{banner_sanitized}")
2828
report_service(:host => rhost, :port => rport, :name => "imap", :info => banner)
2929
rescue ::Rex::ConnectionError
30+
rescue ::EOFError
31+
print_error("#{ip}:#{rport} - The service failed to respond")
3032
rescue ::Exception => e
31-
print_error("#{rhost}:#{rport} #{e} #{e.backtrace}")
33+
print_error("#{ip}:#{rport} - #{e} #{e.backtrace}")
3234
end
3335
end
3436

modules/auxiliary/scanner/pop3/pop3_version.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ def initialize
2525

2626
def run_host(ip)
2727
begin
28-
res = connect
28+
connect
2929
banner = sock.get_once(-1, 30)
3030
banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
3131
print_status("#{ip}:#{rport} POP3 #{banner_sanitized}")
3232
report_service(:host => rhost, :port => rport, :name => "pop3", :info => banner)
3333
rescue ::Rex::ConnectionError
34+
rescue ::EOFError
35+
print_error("#{ip}:#{rport} - The service failed to respond")
3436
rescue ::Exception => e
35-
print_error("#{rhost}:#{rport} #{e} #{e.backtrace}")
37+
print_error("#{ip}:#{rport} - #{e} #{e.backtrace}")
3638
end
3739
end
3840

0 commit comments

Comments
 (0)