From aa26405c237defcf0fed178778307f52205e39d3 Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Thu, 20 Mar 2014 17:33:09 -0400 Subject: [PATCH] Cleanup an expression and avoid fail_with --- modules/auxiliary/scanner/http/ntlm_info_enumeration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb index b9d1d16ccc..24f965194a 100644 --- a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb +++ b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb @@ -41,7 +41,7 @@ class Metasploit3 < Msf::Auxiliary return end end - if datastore['TARGET_URIS_FILE'] and datastore['TARGET_URIS_FILE'].length > 0 + if (datastore['TARGET_URIS_FILE'] && !datastore['TARGET_URIS_FILE'].blank?) File.open(datastore['TARGET_URIS_FILE'], 'rb').each_line do |line| test_uri = line.chomp test_path = normalize_uri(test_uri) @@ -52,7 +52,7 @@ class Metasploit3 < Msf::Auxiliary end end elsif not datastore['TARGET_URI'] - fail_with(Failure::BadConfig, "Either TARGET_URI or TARGET_URIS_FILE must be specified.") + print_error("Either TARGET_URI or TARGET_URIS_FILE must be specified.") end end