Cleanup to_s output

bug/bundler_fix
David Maloney 2013-02-11 17:08:14 -06:00
parent 949eb08062
commit adfd26eb2d
2 changed files with 10 additions and 2 deletions

View File

@ -88,6 +88,10 @@ require 'rex/compat'
# Platforms
require 'rex/platforms'
#SSLScan
require 'rex/sslscan/scanner'
require 'rex/sslscan/result'
# Overload the Kernel.sleep() function to be thread-safe
Kernel.class_eval("

View File

@ -164,7 +164,8 @@ class Result
table = Rex::Ui::Text::Table.new(
'Header' => 'SSL Ciphers',
'Indent' => 1,
'Columns' => ['Status', 'Weak', 'SSL Version', 'Key Length', 'Cipher']
'Columns' => ['Status', 'Weak', 'SSL Version', 'Key Length', 'Cipher'],
'SortIndex' => -1
)
ciphers.each do |cipher|
if cipher[:weak]
@ -172,8 +173,11 @@ class Result
else
weak = ' '
end
table << [cipher[:status], weak , cipher[:version], cipher[:key_length], cipher[:cipher]]
table << [cipher[:status].to_s.capitalize, weak , cipher[:version], cipher[:key_length], cipher[:cipher]]
end
# Sort by SSL Version, then Key Length, and then Status
table.rows.sort_by!{|row| [row[0],row[2],row[3]]}
text = "#{table.to_s}"
if @cert
text <<" \n\n #{@cert.to_text}"