diff --git a/lib/msf/core/exploit/http/client.rb b/lib/msf/core/exploit/http/client.rb index a7194c8bb1..21f5373773 100644 --- a/lib/msf/core/exploit/http/client.rb +++ b/lib/msf/core/exploit/http/client.rb @@ -314,7 +314,11 @@ module Exploit::Remote::HttpClient print_line('#' * 20) print_line('# Response:') print_line('#' * 20) - print_line(res.to_terminal_output) + if res.nil? + print_line("No response received") + else + print_line(res.to_terminal_output) + end end res @@ -360,7 +364,11 @@ module Exploit::Remote::HttpClient print_line('#' * 20) print_line('# Response:') print_line('#' * 20) - print_line(res.to_terminal_output) + if res.nil? + print_line("No response received") + else + print_line(res.to_terminal_output) + end end disconnect(c) if disconnect res