From 0561928b924048a979c2dcb46d0f917c0a184d5a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Wed, 21 Aug 2013 00:54:08 -0500 Subject: [PATCH] Fix undefined method error [FixRM #8336] --- .../scanner/http/majordomo2_directory_traversal.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb b/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb index b4ead24215..1e089309fc 100644 --- a/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb +++ b/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb @@ -71,6 +71,11 @@ class Metasploit3 < Msf::Auxiliary 'uri' => uri + payload, }, 25) + if res.nil? + print_error("Connection timed out") + return + end + print_status("#{rhost}:#{rport} Trying URL " + payload ) if (res and res.code == 200 and res.body) @@ -93,6 +98,7 @@ class Metasploit3 < Msf::Auxiliary print_error("#{rhost}:#{rport} No HTML was returned") end else + # if res is nil, we hit this print_error("#{rhost}:#{rport} Unrecognized #{res.code} response") end i += 1;