fix nil error in HttpTrace

GSoC/Meterpreter_Web_Console
Christian Mehlmauer 2018-05-26 10:04:26 +02:00
parent 835281c7cc
commit f17140bdc3
No known key found for this signature in database
GPG Key ID: DCF54A05D6E62591
1 changed files with 10 additions and 2 deletions

View File

@ -314,8 +314,12 @@ module Exploit::Remote::HttpClient
print_line('#' * 20)
print_line('# Response:')
print_line('#' * 20)
if res.nil?
print_line("No response received")
else
print_line(res.to_terminal_output)
end
end
res
rescue ::Errno::EPIPE, ::Timeout::Error => e
@ -360,8 +364,12 @@ module Exploit::Remote::HttpClient
print_line('#' * 20)
print_line('# Response:')
print_line('#' * 20)
if res.nil?
print_line("No response received")
else
print_line(res.to_terminal_output)
end
end
disconnect(c) if disconnect
res
rescue ::Errno::EPIPE, ::Timeout::Error => e