Clean up the if.nils?

bug/bundler_fix
Tod Beardsley 2014-01-23 17:34:42 -06:00
parent 398e8463b1
commit e066d86d41
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
2 changed files with 3 additions and 5 deletions

View File

@ -184,7 +184,7 @@ module LDAP
values = get_values_from_ber(ber, field)
values_result = ""
values_result = values.join(',') unless values.nil?
values_result = values.join(',') if values
vprint_status("Values #{values}")
field_results << values_result
@ -235,7 +235,7 @@ module LDAP
def get_values_from_ber(ber_data, field)
field_offset = ber_data.index(field)
if field_offset.nil?
unless field_offset
vprint_status("Field not found in BER: #{field}")
return nil
end

View File

@ -63,9 +63,7 @@ class Metasploit3 < Msf::Post
max_search = datastore['MAX_SEARCH']
q = query(search_filter, max_search, fields)
if q.nil? or q[:results].empty?
return
end
return if q.nil? or q[:results].empty?
# Results table holds raw string data
results_table = Rex::Ui::Text::Table.new(