From f17140bdc379850921b19bc789a4ae3e93df78ca Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Sat, 26 May 2018 10:04:26 +0200 Subject: [PATCH] fix nil error in HttpTrace --- lib/msf/core/exploit/http/client.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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