Skip to content

Commit 579342c

Browse files
committed
Land rapid7#8955, Fix error messages on telnet_encrypt_overflow.rb
2 parents 66d6ac4 + 27a517e commit 579342c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/auxiliary/scanner/telnet/telnet_encrypt_overflow.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,15 @@ def run_host(ip)
124124
)
125125

126126
end
127-
rescue ::Rex::ConnectionError
127+
rescue ::Rex::ConnectionError, ::Errno::ECONNRESET => e
128+
print_error("A network issue has occurred: #{e.message}")
129+
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
128130
rescue Timeout::Error
129131
print_error("#{target_host}:#{rport} Timed out after #{to} seconds")
132+
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
130133
rescue ::Exception => e
131134
print_error("#{target_host}:#{rport} Error: #{e} #{e.backtrace}")
135+
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
132136
ensure
133137
disconnect
134138
end

0 commit comments

Comments
 (0)