Print multiple attributes on individual rows
This commit is contained in:
parent
97f75c19e4
commit
4a51e028d8
|
@ -53,12 +53,22 @@ module Msf
|
|||
tbl = Rex::Text::Table.new(
|
||||
'Header' => entry[:dn].first,
|
||||
'Indent' => 1,
|
||||
'Columns' => %w[Name Attributes]
|
||||
'Columns' => %w[Name Attributes],
|
||||
'ColProps' => { 'Name' => { 'Strip' => false } },
|
||||
'SortIndex' => -1,
|
||||
'WordWrap' => false
|
||||
)
|
||||
|
||||
entry.each_key do |attr|
|
||||
entry.keys.sort.each do |attr|
|
||||
if format == 'table'
|
||||
tbl << [attr, entry[attr].join(' || ')] unless attr == :dn # Skip over DN entries for tables since DN information is shown in header.
|
||||
next if attr == :dn # Skip over DN entries for tables since DN information is shown in header.
|
||||
|
||||
tbl << [attr, entry[attr].first]
|
||||
if entry[attr].length > 1
|
||||
entry[attr][1...].each do |additional_attr|
|
||||
tbl << [ ' \\_', additional_attr]
|
||||
end
|
||||
end
|
||||
else
|
||||
tbl << [attr, entry[attr].join(' || ')] # DN information is not shown in CSV output as a header so keep DN entries in.
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue