Cleanup to_s output
parent
949eb08062
commit
adfd26eb2d
|
@ -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("
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue