Move code out of begin/rescue block

bug/bundler_fix
Meatballs 2014-12-17 06:45:00 +00:00
parent dd63d793e5
commit 6a822cca61
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 15 additions and 14 deletions

View File

@ -74,16 +74,17 @@ class Metasploit3 < Msf::Post
begin begin
q = query(search_filter, max_search, fields) q = query(search_filter, max_search, fields)
if q.nil? || q[:results].empty?
print_status('No results returned.')
return
end
rescue ::RuntimeError, ::Rex::Post::Meterpreter::RequestError => e rescue ::RuntimeError, ::Rex::Post::Meterpreter::RequestError => e
# Can't bind or in a network w/ limited accounts # Can't bind or in a network w/ limited accounts
print_error(e.message) print_error(e.message)
return return
end end
if q.nil? || q[:results].empty?
print_status('No results returned.')
return
end
# Results table holds raw string data # Results table holds raw string data
results_table = Rex::Ui::Text::Table.new( results_table = Rex::Ui::Text::Table.new(
'Header' => "Domain Users", 'Header' => "Domain Users",