Clean up the if.nils?
parent
398e8463b1
commit
e066d86d41
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue